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

Re: Revision defaults to peg-rev, inconsistently [was: svn bug]

From: Michael Sinz <Michael.Sinz_at_sinz.org>
Date: 2005-12-27 05:59:37 CET

Malcolm Rowe wrote:
>>>>We should be consistent though. Apart from 'cat', which of the commands
>>>>that accept a peg-revision default to -rPEGREV if no revision argument
>>>>is provided (and which don't)?
>>>Operative rev defaults to peg rev:
>>> cat
>>> export
>>> info
>>> ls
>>> propget
>>> proplist
>>>Operative rev defaults to HEAD:
>>> blame
>>> co (bug: @pegrev not trimmed off default wc pathname)
>>> diff (second operative rev defaults to HEAD)
>>>Does not appear to support peg revs even though it could:
>>> cp
>>> log
>>> switch


> Looks like the peg-revs have it - and I agree, that's a much more
> useful implementation. I'd certainly be happy switching blame and diff
> to infer the operative revision from the pegrev if none was provided.
> ('svn blame -rHEAD foo@X' would get the old behaviour).
> 'diff' might be a bit tricky (we've pontentially got two paths and
> revisions to deal with), but it shouldn't be impossible. 'blame' I'd
> imagine should be trivial to fix.

I would watch out with diff - there are examples in the book and code that
depends on the current diff behavior (which is somewhat confusing when
used with --old/--new and peg revisions *and* the -r option... (Not really,
but many users have had questions about the exact behavior there.)

The second rev does not go to HEAD if there is no -r option - just to
add confusion to the mix. If you use -r with one revision the second part (:M)
defaults to HEAD. (As per the help text in section 1)

So the behavior of diff seems to be correct with the only confusing bit being
what happens when you specify a -r with only a single revision *and* --old/--new
with peg revision on --new...

Michael Sinz                     Technology and Engineering Director/Consultant
"Starting Startups"                                mailto:michael.sinz@sinz.org
My place on the web                            http://www.sinz.org/Michael.Sinz
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 27 06:01:07 2005

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.