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

RE: Checkout files from a deleted/moved directory: problem

From: Gale, David <David.Gale_at_Hypertherm.com>
Date: 2006-02-23 15:59:13 CET

(Again, returning discussion to the list.)
Jean-Yves Avenard wrote:
> I guess the book would make it easier to understand (at least for
> me) if it said something like: -r (or --revision) describe which
> revision OF THE FILE you need.
> while @REVISION describe the STRUCTURE of the directories.
>
> you need so specify both of there could be any ambiguities, such as
> the directory has been renamed earlier on etc...
>
> I still think that such distinction is unecessary, at a given
> revision a file only has one location, so you could expect subversion
> to know how to retrieve it without extra hint like peg revision.
> Maybe we'll see this in a future version of subversion

Yes, at a given revision, a file has only one revision; however, how do
you identify what file you're looking for? Subversion's support for
moving and replacing files makes this question more challenging. Yes,
if you just create and delete files, without moving or replacing them,
there's no ambiguity--across all revisions, there's only ever one file
named "foo". But, if you delete foo at revision 10, and then rename bar
to foo at revision 15, you run into problems: if you try to checkout foo
at revision 8, which file should subversion give--the file that was
named foo then, or the file that is currently named foo, but was called
bar at that point? Your request would make subversion always return the
file named foo at that point, requiring you to dig through logs to find
that the current foo was actually called bar back then, if that's the
file you really wanted to see.

You also seem to be under the impression that the -r and peg revisions
should always be equal; they don't need to be. 'svn cat -r 45 foo@27'
will give the version of the file that was named foo at revision 27 as
it existed in revision 45, regardless of what name changes have happened
between them.

-David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 23 16:02:51 2006

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