“svn cat”的水银等价物是什么?

发布于 2024-10-04 10:27:37 字数 193 浏览 0 评论 0原文

我想以指定的修订版打印远程存储库中单个文件的内容。我怎样才能做到这一点?在 svn 中,它是:

svn cat <path to remote file>

update

我想避免的主要事情是克隆整个存储库;我正在使用的一些项目非常大,我只需要其中单个文件中的项目元数据。

I want to print the contents of a single file from a remote repository, at a specified revision. How can I do that? In svn, it'd be:

svn cat <path to remote file>

update

The main thing I want to avoid is cloning the entire repository; some of the ones I'm working with are quite large, and I just need project metadata from a single file within.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黑色毁心梦 2024-10-11 10:27:37

有两种方法可以实现您想要的操作:

  1. 在本地克隆存储库,然后对其执行适当的 hg cat -r REV FILE
  2. 使用可访问远程存储库的 Web 界面(

如果您没有) Web界面,然后你需要克隆。

There's two ways to do what you want:

  1. Clone the repository locally, and execute the appropriate hg cat -r REV FILE against it
  2. Use a web interface that gives access to the remote repository

If you don't have the web interface, then you need to clone.

念﹏祤嫣 2024-10-11 10:27:37

您可以使用 wget 或您喜欢的浏览器下载文件内容。例如,对于 bitbucket 存储库,URL 如下所示:

http://bitbucket.org/<user>/<project>/raw/<revision>/<filename>

对于 hgserve Web 界面,URL 如下所示:

http://<host>:<port>/raw-file/<revision>/<filename>

You may be able to download the file content with wget or your favorite browser. For example, for bitbucket repositories the URL looks like this:

http://bitbucket.org/<user>/<project>/raw/<revision>/<filename>

For the hg serve web interface, the URL looks like this:

http://<host>:<port>/raw-file/<revision>/<filename>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文