Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a command which will print the path of the file in the repo-browser in the command line?

Is there a command which will print the path of the file in the repo-browser in the command line?

SVN diff only prints the file name.

Thank you.

like image 765
Jarvis Avatar asked Jun 26 '09 10:06

Jarvis


2 Answers

svn info path/to/filename

will show you several pieces of information. The ones you're looking for are URL and Repository Root:

$ svn info mydialog.h
[...]
URL: http://svn.server.net/my-repo/trunk/ui/mydialog.h
Repository Root: http://svn.server.net/my-repo
[...]

URL is the absolute position of the file, and Repository Root is the base URL of the repository. URL will always start with the address of Repository Root, so if you trim Repository Root from the start of URL, you're left with the relative position of the file inside the repository. In this case, that's

/trunk/ui/mydialog.h
like image 152
balpha Avatar answered Sep 19 '22 23:09

balpha


svn info?

like image 40
Maciej Łebkowski Avatar answered Sep 17 '22 23:09

Maciej Łebkowski