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

Re: svn cat on deleted file doesn't seem to work

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: 2006-12-08 08:34:39 CET

On Friday 08 December 2006 08:14, Andrew wrote:
> % svn update # be sure we're up to date
> At revision 15.
> % svn list -r 15 # as expected - does not include arraylist.cs
> assert.cs
> % svn list -r 11 # as expected - includes arraylist.cs
> arraylist.cs
> assert.cs
> % svn cat -r 11 arraylist.cs # why can't I cat arraylist.cs?
> svn: 'arraylist.cs' has no URL
> % svn cat -r 11 assert.cs # works fine
> (assert.cs's contents)

You will have to use so-called peg-revisions. In order to understand that, the
first thing that svn looks at is the file, in this case the file
is 'arraylist.cs'. Since that file doesn't exist in the context of the
current revision, it gives up.

Now, the reason it doesn't even look at the '-r 11' is that this in ambiguous,
think about the case that the file changed name and a different file occupied
the same spot (i.e. name) in that time or similar things.

Think of a file in a repository as a chain (let's ignore the fact that it can
also be a tree) of revisions, starting at creation and ending when it is
deleted (or at the current revision). Revisions might change both data or
positions. In order to solve your issue, you need to specify _exactly_ _one_
of the chains in the repository and you do that by supplying exactly one path
at one revision. In some cases, svn simply assumes the revision to be HEAD,
relieving you of that task, for the others you use peg revisions:

  svn log arraylist.cs@11

From that reference point, you can then use '-r11' to get a certain revision.


           Visit our website at <http://www.satorlaser.de/>
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 8 08:35:22 2006

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.