[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Issue #1093: diff syntax changes for history following

From: Josh Pieper <jpieper_at_andrew.cmu.edu>
Date: 2004-05-05 22:14:15 CEST

Working with sussman I am trying to finish up issue #1093 - make
subcommands follow copy history. As it stands now, all subcommands do
this, with the exception of diff, merge, and perhaps log [1]. To make
diff and merge work, UI changes are necessary in order to handle all
the cases of peg revision and operating revision ranges. This has
been discussed previously in the following threads:

([PATCH] Fix for Issue #1093 (pre-release))
http://www.contactor.se/~dast/svn/archive-2003-10/1405.shtml

(Diff syntax changes for issue #1093)
http://www.contactor.se/~dast/svn/archive-2003-10/1511.shtml

(Issue #1093.)
http://www.contactor.se/~dast/svn/archive-2003-12/0499.shtml

In these threads it seemed as if a consensus was reached as to the UI
for diff, so I will describe it here again using mostly Greg Hudson's
words. Once we can come to an agreement on the syntax, work can
continue.

  1. diff [-r M[:N]] [TARGET[@REV]...]
  
     Each target may be a path or URL, but it is invalid to specify a
     URL with no -r option. Perform a pegged diff for each target. For
     paths, the default starting rev is BASE, the default ending rev
     is WC, and the peg rev is always WC. For URLs, there is no
     default starting rev (-r option must be present), the default peg
     revision is HEAD. The default end revision for URLs was not
     decided. [2]

  2. diff --old=OLD-TGT[@OLDREV] --new=NEW-TGT[@NEWREV] [PATH...]

     Compare OLD-TGT and NEW-TGT, restricted to the paths PATH... if
     given. Can be used to answers questions like "what changes were
     made to libsvn_ra_dav between the 0.32 branch and the trunk?"
     (Limitation: if libsvn_ra_dav was renamed between the 0.32 branch
     and the trunk, the user will have to go find out how; we can't
     answer complex questions like "what was the name of
     /trunk/subversion/libsvn_ra_dav under /branches/0.32?".)

  3. diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]

     Syntactic sugar for 'diff --old=OLD-URL@OLDREV
     --new=NEW-URL@NEWREV'. Easily distinguishable from the first
     usage because you can't use URLs without a -r option. Note "svn
     diff URL@R1 URL@R2" is rather different from "svn diff -rR1:R2
     URL", because the latter performs a pegged diff of URL@HEAD
     between R1 and R2, while the former looks up URL's pathname
     independently in R1 and R2 and diffs the results.
                               
Is this syntax agreeable to everyone? Are there any threads or
important points that I've missed?

-Josh
                               

Notes:

[1] - 'svn log' follows copy history, but the peg revision is limited
to be the youngest revision of the operative revision range.

[2] - Greg originally proposed never mixing the -r notation with the
@REV notation in :
http://www.contactor.se/~dast/svn/archive-2003-10/1511.shtml
but then later changed his mind in:
http://www.contactor.se/~dast/svn/archive-2003-10/1520.shtml

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 5 22:14:38 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.