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

Re: Peg revision question

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 5 Mar 2010 23:26:17 +0100

On Fri, Mar 5, 2010 at 10:01 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> Mark Phippard wrote:
>> Copy is a little different.  For that, I would like to be able to
>> specifically ask SVN to do it, which is what you are saying here.  If
>> an item is moved, I do not think you should even have to ask.
>
> Agreed.
>
>> If you
>> know a URL/Rev where something existed you ought to be able to just
>> get the entire history of that item, but to do that, I think we would
>> need a first class notion of moving something.
>
> In theory, the repository layer could say "I see that this item was copied
> away and deleted from this path at the same time."  In practice, "deleted at
> the same time" isn't as easy to detect as we'd like.  (I've been doing some
> thinking in these parts off and on ... toying with the cost/benefit of
> storing an explicit end-of-life marker on a line of history.  But I don't
> like where the 'cost' part leads me.)

If I'm not mistaken, exactly the same issue occurs with a simple
delete (no copies or moves involved). This can be very annoying if
you're trying to find out in what revision an item was deleted (and
why (log message) and by which author). Also, you cannot see any other
log entry that happened after the peg revision (except by trial and
error, specifying further rev numbers until you hit a "not found").
Usually people remember some revision in which the item was still
present, but that can be several thousand revisions ago...

Example scenario:
$ cd test
$ svnadmin create repos1
$ mkdir wc1
$ svn mkdir file:///c:/test/repos1/trunk -mtest
Committed revision 1.

$ cd wc1
$ svn co file:///c:/research/testrepos/repos1/trunk .
Checked out revision 1.

$ echo test > superfile.txt
$ svn add superfile.txt
A superfile.txt

$ svn commit -m"adding superfile.txt"
Adding superfile.txt
Transmitting file data .
Committed revision 2.

$ svn rm superfile.txt
D superfile.txt

$ svn commit -m"removing superfile.txt"
Deleting superfile.txt

Committed revision 3.

$ svn log file:///c:/research/testrepos/repos1/trunk/superfile.txt_at_2
------------------------------------------------------------------------
r2 | User | 2010-03-05 23:05:15 +0100 (vr, 05 mrt 2010) | 1 line

adding superfile.txt
------------------------------------------------------------------------

# Great, but I'm not seeing the log entry in which it was deleted ...
nor any other interesting revisions that happened to superfile.txt
after 2

$ svn log -r 1:HEAD file:///c:/research/testrepos/repos1/trunk/superfile.txt_at_2
svn: File not found: revision 3, path '/trunk/superfile.txt'

# :-(

Regards,
Johan
Received on 2010-03-05 23:26:51 CET

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