Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view changes made to files on a certain revision in Subversion

Tags:

svn

I am looking for a Subversion command which does the equivalent of

git show <commit-number> 
like image 861
krs Avatar asked Feb 12 '14 07:02

krs


People also ask

How do you find changed files in svn?

svn log then defaults to fetching the history of the directory at its current revision, and thus you don't see the newly committed changes. The solution here is to either update your working copy or explicitly provide a revision number to svn log by using the --revision ( -r ) option.

How do you find the difference between two svn revisions?

Display the differences between two paths. The ways you can use svn diff are: Use just svn diff'to display local modifications in a working copy. Display the changes made to TARGET s as they are seen in REV between two revisions.

Where is svn history stored?

They are stored in the svn:log property. You can add the --revprop flag to the various property commands to view & edit this property.

How do I view svn logs?

Examples. You can see the log messages for all the paths that changed in your working copy by running svn log from the top: $ svn log ------------------------------------------------------------------------ r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line Tweak.


2 Answers

With this command you will see all changes in the repository path/to/repo that were committed in revision <revision>:

svn diff -c <revision> path/to/repo 

The -c indicates that you would like to look at a changeset, but there are many other ways you can look at diffs and changesets. For example, if you would like to know which files were changed (but not how), you can issue

svn log -v -r <revision> 

Or, if you would like to show at the changes between two revisions (and not just for one commit):

svn diff -r <revA>:<revB> path/to/repo 
like image 192
Michael Schlottke-Lakemper Avatar answered Sep 18 '22 13:09

Michael Schlottke-Lakemper


The equivalent command in svn is:

svn log --diff -r revision

like image 45
Hongbo Liu Avatar answered Sep 21 '22 13:09

Hongbo Liu