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

Re: Diff syntax changes for issue #1093

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2003-10-30 02:59:50 CET

At 4:35 PM -0500 10/29/03, Greg Hudson wrote:
>For background, read CMike's proposal at
>http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=48573 if
>you haven't already.

I need some help with "peg revision" and "operative revision [range]."

Mike says "peg" means "whatever we already do in a bunch of other
places," but I got lost chasing the pointers. I think maybe "peg" is
supposed to mean "the version the user is really thinking of when he
types the un-annotated path." (Often tricky to guess what the user
is thinking, but for example I agree with Greg's point #2, that WC is
a more obvious assumption than BASE for a working copy.)

There are places in this conversation when we say "peg" yet
ultimately want some version different from that. This might seem to
undermine my guess above, but I think the discussion is saying
something sort of like:
        establish the peg version
        identify the node of which this version is a part/descendant
        find the other version(s) of that node
so "peg" still means the same thing, we're just doing further tricks
once we've found it. Is that right?

In this discussion, I think "operative revision [range]" means "the
revision [range] over which the diff operation is requested; the
actual revisions to compare."

If that's all kinda right, then let me moosh it into a slightly
different shape:

* "peg" is all about (indirectly) choosing the _node_ to which the
operation applies, but choosing a _version_ based on some rules we
suppose to be intuitive, and then selecting the node of which this
version is a part.

* "operative" is all about selecting versions from out of that node,
on which to operate.

I think I can similarly moosh a lot of our discussion about diff
syntax into this: that it's very hard to keep revision info from
leaking between "choose the node" and "choose the versions within the
node."

And that said,

At 4:35 PM -0500 10/29/03, Greg Hudson also wrote:
> diff [-r M[:N]] [TARGET...]
>
>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),

This seems once again to muddle "find the node" and "pick the
versions," doesn't it? That is,
* I would think "peg to HEAD" a reasonable default for a URL
* as argued elsewhere, I want "-rM[:N] TARGET@PEG-R" back, to
preserve their separation

>the default ending rev is HEAD, and the peg rev
>is always HEAD.
>
> diff --old=OLD-TGT[@OLDREV] --new=NEW-TGT[@NEWREV] [PATH...]
>
>Compare OLD-TGT and NEW-TGT, restricted to the paths PATH...

Oops, sorry, I'm lost again. What's it mean, "compare X and Y,
restricted to Z"? Is the idea that X and Y might be directories,
that the comparison is implicitly recursive, that the path(s) are
paths within (both?) X and Y, and so that anything in X/Y which is
*not* named in the path-list should be ignored?

>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?"

Uuhh ... an attempt to anticipate my very question, I think, but I'm
not following the answer. Sorry. Maybe: "what's the complete diff
command to ask this question?"

>(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?".)

+1

>
> 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,

Err ... I can't fit those words into my understanding of "peg,"
above. If I got that right, I need help through "perform a pegged
diff of X between R1 and R2." Or maybe, I think *all* diffs are
pegged, albeit some explicitly and some implicitly.

-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835.8090
f: 650.228.2501
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 30 03:00:35 2003

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.