是否有一个命令将在命令行中的repo浏览器中打印文件的路径? [英] Is there a command which will print the path of the file in the repo-browser in the command line?

查看:186
本文介绍了是否有一个命令将在命令行中的repo浏览器中打印文件的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有命令将在命令行中在repo浏览器中打印文件的路径?

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

SVN diff只打印文件名。

SVN diff only prints the file name.


推荐答案

svn info path/to/filename

会显示几个信息。您要查找的是URL和存储库根:

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是文件的绝对位置,存储库的基本URL。 URL将始终以Repository Root的地址开头,因此如果从URL的开头修剪Repository Root,则会留下存储库中文件的相对位置。在这种情况下,这是

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

这篇关于是否有一个命令将在命令行中的repo浏览器中打印文件的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆