Subversion 相当于 Git 的“show”;命令?
我喜欢用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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.我认为您想查看的不是提交中的文件列表,而是查看提交中文件本身的内容。您可以使用 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. Checksvn help cat
for more info.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> )