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

Re: Accessing history after copy?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-02-24 19:11:16 CET

On Tue, 2004-02-24 at 11:56, Robert Guthrie wrote:

> My diff command outputs the entire file:
> rguthr@rguthr4:~/MySync/Writing$ svn diff -r245 A_Veil_Torn.lyx | head
> Index: A_Veil_Torn.lyx
> ===================================================================
> --- A_Veil_Torn.lyx (revision 0)
> +++ A_Veil_Torn.lyx (revision 266)

This is a known bug with 'svn diff', I believe. You're saying, "please
diff my working file with r245 of a certain repos path". Any other
subcommand would have said, "error: that path doesn't exist in r245".
But this particular usage of 'svn diff' instead says, "Oh, ok, the path
doesn't exist, so therefore I'll just show the whole file being
added." I don't like this behavior, but some other developers do.

 
> rguthr@rguthr4:~/MySync/Writing$ svn diff -r245:HEAD A_Veil_Torn.lyx
> svn:
> 'svn+ssh://me@my.server/home/subversion/personal/trunk/MySync/Writing/A_Veil_Torn.lyx'
> was not found in the repository at revision 245

Now, instead of asking for a comparison between a repository file and
working file, you're asking for a comparison between two repository
files: the path in r245, and the path in HEAD. And now svn is giving
a more intelligible error (what I wish it had done in the previous
case): that the path doesn't exist in r245.

The fundamental problem is still the fact that like every other
subcommand (other than 'svn log'), 'svn diff' doesn't follow rename/copy
history as it should. It's a very high priority for us to fix.

To do the diff you want, do a diff of two urls:

   $ svn diff oldURL@X newURL@HEAD

The trick is to use 'svn log -v A_Veil_Torn.lyx' to figure out the
precise (rev, path) coordinates of the older version of the file.
That's what you'll substitute in for 'oldURL' and 'X' above.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 24 19:15:42 2004

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.