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

半城伤御伤魂 提交于 2019-12-07 03:35:53

问题


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.


回答1:


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



回答2:


svn info?



来源:https://stackoverflow.com/questions/1048356/is-there-a-command-which-will-print-the-path-of-the-file-in-the-repo-browser-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!