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

Re: Difference between "--revision xyz" and "@xyz" ?

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: 2006-10-09 18:36:42 CEST

On 10/9/2006 8:50 AM, Daniel Gehriger wrote:
> Duncan Murdoch wrote:
>> The @ identifies the name of a file, the --revision identifies which
>> revision to look at. There may be multiple unrelated files in your
>> repository named test.h (e.g. if you delete it, and later add a new one
>> with the same name). The @ says you want the file that was called
>> test.h in revision 1234. Then the --revision says you want a particular
>> revision of that file, not necessarily the same one.
> If I understand correctly, this means that, given the following repos:

I'd suggest making a little test repos, to play with these things. But
my guesses are below:
> r1: import of file-1.h, file-2.h
> r2: rename "file-1.h" into "file-1a.h" => file-1a.h, file-2.h
> r3: rename "file-2.h" into "file-1.h" => file-1a.h, file-1.h
> then
> [1] svn cat .../file-1.h --revision 1
> returns file-2.h of rev 1 because the filename identifies "file-1.h of
> the HEAD revision, and subversion returns rev 1 of that file, which was
> named "file-2.h" in rev 1;


> and
> [2] svn cat .../file-1.h@1
> return "file-1.h" of rev 1;

I think not. file-1.h@1 was deleted in r2. Since you didn't specify a
revision, svn will look for the HEAD, and won't find it.

> and finally:
> [2] svn cat .../file-1.h@1 --revision 3
> returns "file-1a.h" of rev 3.

Same problem here. That file was deleted, and doesn't exist in rev 3.

I think what people would like (with "true renames") would be for [2]
and the other [2] ;-) to give the same thing, namely "file-1a.h" of rev
3, but I don't think that's what you'll get in current svn. svn knows
that file-1a.h came from file-1.h@1, but it doesn't know that file-1.h@1
became file-1a.h, because it thinks you just did a copy and delete.

Duncan Murdoch

> Correct ?
> - Daniel

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 9 18:37:44 2006

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

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