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

RE: Retrieve the full URL of a file given the revision number

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Mon, 26 Jan 2009 11:44:30 +0100

svn info <file> -r <revision>

 

Will give you the url of <file> in <revision> (following renames and copies,
etc).

 

# svn info CONTRIBUTERS.txt

 

=== In my workingcopy ===

 

# svn info CONTRIBUTERS.txt

Path: CONTRIBUTERS.txt

Name: CONTRIBUTERS.txt

URL: http://ankhsvn.open.collab.net/svn/ankhsvn/trunk/src/CONTRIBUTERS.txt

Repository Root: http://ankhsvn.open.collab.net/svn/ankhsvn

Repository UUID: ecf7f2a6-7b29-9143-b1c6-df2d17ec8657

Revision: 6038

Node Kind: file

Schedule: normal

Last Changed Author: rhuijben

Last Changed Rev: 5800

Last Changed Date: 2009-01-01 00:53:36 +0100 (do, 01 jan 2009)

Text Last Updated: 2009-01-05 14:38:53 +0100 (ma, 05 jan 2009)

Checksum: 82252ffc9b930ce004312edaab30a6ae

 

=== In revision 2000 ===

# svn info CONTRIBUTERS.txt -r 2000

Path: CONTRIBUTERS

Name: CONTRIBUTERS

URL: http://ankhsvn.open.collab.net/svn/ankhsvn/trunk/src/CONTRIBUTERS

Repository Root: http://ankhsvn.open.collab.net/svn/ankhsvn

Repository UUID: ecf7f2a6-7b29-9143-b1c6-df2d17ec8657

Revision: 2000

Node Kind: file

Last Changed Author: Arild

Last Changed Rev: 1735

Last Changed Date: 2004-10-04 19:23:14 +0200 (ma, 04 okt 2004)

 

As you can see the file CONTRIBUTERS.txt was originally called CONTRIBUTERS.

 

(You can also use the url to a file instead of a local working copy path).

 

 

But in many cases the real question is: why do you need the url at a
specific point in time?

 

Almost every subversion command allows specifying peg revisions:

 

Eg.

 

svn info file_at_RR -r SS

 

Retrieves information on the file that was known as file in revision RR, as
it was in revision SS. Normally you only need the url at some specific
poiont when you are performing url calculations yourself.

 

Thanks,

                Bert

 

 

From: Jay Jesus Amorin [mailto:jay.amorin_at_gmail.com]
Sent: zaterdag 24 januari 2009 20:32
To: users_at_subversion.tigris.org
Subject: Retrieve the full URL of a file given the revision number

 

Hi,

Is there a way to retrieve the full url of a file given the revision number
in svn.
The result would be something like this
file:///path/to/the/file/in/the/repository or
https://path/to/the/file/in/the/repository.

Thanks.

Jay

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1054265

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-26 20:02:00 CET

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.