【问题标题】:Is there a command which will print the path of the file in the repo-browser in the command line?是否有一个命令可以在命令行的 repo-browser 中打印文件的路径?
【发布时间】:2010-11-06 02:37:03
【问题描述】:

是否有一个命令可以在命令行中打印 repo-browser 中文件的路径?

SVN diff 只打印文件名。

谢谢。

【问题讨论】:

  • 你问的是 TortoiseSVN 吗?

标签: svn file command-line path command


【解决方案1】:
svn info path/to/filename

将向您显示几条信息。您要查找的是 URL 和存储库根目录:

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

URL 是文件的绝对位置,Repository Root 是存储库的基本 URL。 URL 将始终以 Repository Root 的地址开头,因此如果从 URL 的开头修剪 Repository Root,则剩下的是文件在存储库中的相对位置。在这种情况下,那是

/trunk/ui/mydialog.h

【讨论】:

    【解决方案2】:

    svn info?

    【讨论】:

      猜你喜欢
      • 2010-11-06
      • 1970-01-01
      • 1970-01-01
      • 2021-10-02
      • 1970-01-01
      • 1970-01-01
      • 2022-10-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多