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

Fw: dev Digest 12 Jan 2007 02:35:11 -0000 Issue 2950

From: Ed Hillmann <edhillmann_at_yahoo.com>
Date: 2007-01-12 05:50:58 CET

Can I ask how the file was "restored"? Was it simply cat'ing the previous revision of the file to the same location of the working copy, svn adding and committing? If so, that's still not enough to warrant a restore in the repository. You have the luxury of knowing the file is the same object, the repository does not. If you read the Red Book's section on Peg Revisions, you'll see a perfectly valid scenario as to why having the same name and location in the repository doesn't necessarily mean that the objects are the same.

As I was curious with your situation, I played around with the following using SVN 1.4.2

- defined a new file (file3.txt)
- svn add file3.txt
- svn commit (r 110)
- svn rm file3.txt
- svn commit (r 111)
- svn copy -r 110 svn://wallaby/edhTest/trunk/src/file3.txt .

Now, if I look at my status, I have

ehillman@wallaby:/temp/trunk/src> svn status
A + file3.txt

So, I can see that it has been added and copied. In my mind, I have now told the repository not only do I want to add a file called file3.txt, but I am copying its details from a previous revision of a file. I can commit. Now when I do a svn log on file3.txt

ehillman@wallaby:/temp/trunk/src> svn log file3.txt
------------------------------------------------------------------------
r112 | (no author) | 2007-01-12 13:40:54 +1000 (Fri, 12 Jan 2007) | 1 line

Restoring file3.txt
------------------------------------------------------------------------
r110 | (no author) | 2007-01-12 13:36:33 +1000 (Fri, 12 Jan 2007) | 1 line

Adding file3.txt
------------------------------------------------------------------------

So, the only thing that I can see in this, that I'm guessing you'd like to see, is something in the log that states that the file didn't exist starting from r 111.

But, from my playing around, as long as you tell the repository enough information, you can most certainly find the full history of an object. If you don't provide enough details, however, the repository simply cannot assume any previous files that have already been removed are the same files, simply because they are named the same.

Ed
----- Original Message ----
From: "dev-digest-help@subversion.tigris.org" <dev-digest-help@subversion.tigris.org>
To: dev@subversion.tigris.org
Sent: Friday, 12 January, 2007 12:35:11 PM
Subject: dev Digest 12 Jan 2007 02:35:11 -0000 Issue 2950

> Brummer, Byron wrote:
    Show me a sane way to retrieve the full history of an object
    and I'll shut up.

Send instant messages to your online friends http://au.messenger.yahoo.com

Send instant messages to your online friends http://au.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 12 05:51:05 2007

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