Subversion 相当于 Git 的“show”;命令?

发布于 2024-09-12 20:44:19 字数 172 浏览 18 评论 0原文

我喜欢用 git show rev 查看 git 中的内容,

我在 Subversion 中还没有找到类似的东西。看起来 Subversion 希望你在两次提交之间进行差异以获得合理的结果。

我是否弄错了,或者是否有相当于 svn 中的 git show 来查看提交内容?

I like how you can see what went into a git with git show rev

I haven't found an equivalent in Subversion. It seems Subversion wants you to do a diff between two commits to get anything reasonable.

Am I mistaken, or is there an equivalent to git show in svn to just see what went into a commit?

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

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

发布评论

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

评论(3

眼中杀气 2024-09-19 20:44:19

svn diff -c rev 将显示指定修订版中发生的更改。

svn log --diff -c rev 将显示 diff 和提交信息。

svn diff -c rev will show what changes happened in the specified revision.

svn log --diff -c rev will show the diff and the commit information.

少跟Wǒ拽 2024-09-19 20:44:19

我认为您想查看的不是提交中的文件列表,而是查看提交中文件本身的内容。您可以使用 svn cat -r rev filename 来执行此操作,其中“rev”是修订号,“filename”是文件的路径或 URL。检查 svn help cat 获取更多信息。

I take it you want to see not the list of files in the commit, but the contents of a file itself as it was in the commit. You can do this with svn cat -r rev filename, where "rev" is the revision number and "filename" is the path or URL to the file. Check svn help cat for more info.

日裸衫吸 2024-09-19 20:44:19

svn diff -c将向您显示提交所做的实际更改,但与 git show 不同的是,它不会包含提交元数据。

我最终用来得到大致相当于 git show 的东西是

( svn log -c; svn diff -c)

svn diff -c <commit> will show you the actual changes made by a commit, but unlike git show it won't include the commit metadata.

What I ended up using to get something roughly equivalent to git show was

( svn log -c <commit> ; svn diff -c <commit> )

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