You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Joey Hess <jo...@kitenet.net> on 2003/11/12 03:51:22 UTC

how to diff against an version prior to a file move?

I have a file, bin/svnfix, that is in subversion. It was svn mv'd from
bin/cvsfix a while ago. Long before that (when it was still in cvs), I
checked in what is now revision 739. I want to see what changed in that
revision. svn log shows the commit message for 739, but it is not very
useful.

joey@dragon:~/bin>svn diff -r 739:738 svnfix
svn: Filesystem has no item
svn: 'svn+ssh://kitenet.net/home/svn/joey/trunk/bin/svnfix' was not
found in the repository at either revision 739 or 738

joey@dragon:~/bin>svn diff -r 739:738 cvsfix
svn: Can't find an entry
svn: convert_to_url: 'cvsfix' is not versioned

joey@dragon:~/bin>svn diff -r 739:738
svn+ssh://kitenet.net/home/svn/joey/trunk/bin/cvsfix
svn: Filesystem has no item
svn: 'svn+ssh://kitenet.net/home/svn/joey/trunk/bin/cvsfix' was not
found in the repository at either revision 739 or 738

I'm pretty sure that trunk/bin/cvsfix is the original name it had in the
repository. What am I supposed to do to get at the old version of the
file?

-- 
see shy jo

Re: how to diff against an version prior to a file move?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Joey Hess wrote:
> Joey Hess wrote:
> 
>>joey@dragon:~/bin>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/trunk/
>>joey@dragon:~/bin>
>>
>>Yep, no changes to that directory in that rev.
> 
> 
> So let's diff the whole repo instead!
> 
> joey@dragon:~/bin>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/
> Index: bintrunk/cvsfix
> ===================================================================
> --- bintrunk/cvsfix     (revision 738)
> +++ bintrunk/cvsfix     (revision 739)
> 
> (BTW does that need to transfer the whole repo, or does the diff
> happen on the server?)

The actual diff (generating the unified diff output) is done client 
side, but determining what files have changed is server side, since the 
repository contains enough information to tell you what files were 
modified in that revision.

> Aha! That would be the name I told cvs2svn to use, since it cannot
> yet support --trunk=trunk/bin.
> 
> Now someone *please* tell me there is a better way to deal with this
> kind of file move and diff.
> 

Currently, I'm not aware of a better way to go about it.  I think 
there's been some discussion of this on the dev list lately though, so 
things may improve in the future.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: how to diff against an version prior to a file move?

Posted by Joey Hess <jo...@kitenet.net>.
Joey Hess wrote:
> joey@dragon:~/bin>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/trunk/
> joey@dragon:~/bin>
> 
> Yep, no changes to that directory in that rev.

So let's diff the whole repo instead!

joey@dragon:~/bin>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/
Index: bintrunk/cvsfix
===================================================================
--- bintrunk/cvsfix     (revision 738)
+++ bintrunk/cvsfix     (revision 739)

(BTW does that need to transfer the whole repo, or does the diff
happen on the server?)

Aha! That would be the name I told cvs2svn to use, since it cannot
yet support --trunk=trunk/bin.

Now someone *please* tell me there is a better way to deal with this
kind of file move and diff.

-- 
see shy jo

Re: how to diff against an version prior to a file move?

Posted by Joey Hess <jo...@kitenet.net>.
Garrett Rooney wrote:
> What does 'svn log -v -r 739 svn+ssh://kitenet.net/home/svn/joey/' tell 
> you about the files that were changed in that revision?

It shows only a M on cvsfix.

> It seems like  something like:
> $ svn diff -r 738:739 
> svn+ssh://kitenet.net/home/svn/joey/trunk/bin/cvsfix
> 
> should work...  although if it isn't you might also try

I showed the output of that in my original mail, it does not work.

I also tried it with --notice-ancestry: "Filesystem has no item"

> $ svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/
> 
> if you don't know precisely what file changed, you can just diff the 
> whole repos for that revision, and it should show the change to that 
> file in the diff output.

joey@dragon:~>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/trunk/bin
svn: Filesystem has no item

joey@dragon:~/bin>svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/trunk/
joey@dragon:~/bin>

Yep, no changes to that directory in that rev. I'm left thinking it
must have moved from somewhere else in a later rev, but durned if I can
figure out how to find where it was at that point in time, without
checking out the whole repository cirta revision 738 and running find
on it.

I understand that every file in a svn repository has a unique id
associated with it. Would there be some way to tell svn diff to use
that unique id instead of whatever path the file had way back when?

-- 
see shy jo

Re: how to diff against an version prior to a file move?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 11, 2003, at 10:51 PM, Joey Hess wrote:

> I'm pretty sure that trunk/bin/cvsfix is the original name it had in 
> the
> repository. What am I supposed to do to get at the old version of the
> file?

What does 'svn log -v -r 739 svn+ssh://kitenet.net/home/svn/joey/' tell 
you about the files that were changed in that revision?  It seems like 
something like:

$ svn diff -r 738:739 
svn+ssh://kitenet.net/home/svn/joey/trunk/bin/cvsfix

should work...  although if it isn't you might also try

$ svn diff -r 738:739 svn+ssh://kitenet.net/home/svn/joey/

if you don't know precisely what file changed, you can just diff the 
whole repos for that revision, and it should show the change to that 
file in the diff output.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org