Subversion equivalent to Git's 'show' command?
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?
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.
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.
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> )
精彩评论