Duncan Murdoch wrote:
> 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:
>
Done... I started with two files, "file-1.h" and "file-2.h", each file
containing its own filename as a text string.
> 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;
>
> Right.
We are both wrong:
# svn cat file:///tmp/testrepos/file-1.h --revision 1
file-2.h
>
>>
>> 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.
I win:
# svn cat file:///tmp/testrepos/file-1.h_at_1
file-1.h
>
>>
>> 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.
You are right:
# svn cat file:///tmp/testrepos/file-1.h_at_1 --revision 3
svn: Unable to find repository location for
'file:///tmp/testrepos/file-1.h' in revision 3
I now understand that SVN can "walk backwards" through renames, but not
forwards...
Thanks for your input!
- 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:59:32 2006