Is there a command which will print the path of th

2019-04-28 12:45发布

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.

2条回答
孤傲高冷的网名
2楼-- · 2019-04-28 13:30

svn info?

查看更多
Root(大扎)
3楼-- · 2019-04-28 13:31
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
查看更多
登录 后发表回答