简体   繁体   中英

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> )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM