[英]Subversion equivalent to Git's 'show' command?
I like how you can see what went into a git with git show rev
我喜欢你如何使用
git show rev
查看git show rev
I haven't found an equivalent in Subversion.我还没有在 Subversion 中找到等价物。 It seems Subversion wants you to do a diff between two commits to get anything reasonable.
Subversion 似乎想让你在两次提交之间做一个差异来得到任何合理的东西。
Am I mistaken, or is there an equivalent to git show in svn to just see what went into a commit?我错了,还是 svn 中有一个相当于 git show 的东西来看看提交的内容?
svn diff -c rev
will show what changes happened in the specified revision. svn diff -c rev
将显示指定修订版中发生的更改。
svn log --diff -c rev
will show the diff and the commit information. svn log --diff -c rev
将显示差异和提交信息。
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.您可以使用
svn cat -r rev filename
执行此操作,其中“rev”是修订号,“filename”是文件的路径或 URL。 Check svn help cat
for more info.检查
svn help cat
以获取更多信息。
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. svn diff -c <commit>
将显示svn diff -c <commit>
所做的实际更改,但与 git show 不同的是,它不包含提交元数据。
What I ended up using to get something roughly equivalent to git show was我最终用来获得与 git show 大致相当的东西的是
( svn log -c <commit> ; svn diff -c <commit> )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.