95

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

git show <commit-number>
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
krs
  • 1,467
  • 5
  • 17
  • 30

3 Answers3

139

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
  • 9
    Note that `path/to/repo` is not required if you have a working copy, which is the normal case (and implied by `git show`). Note also that `git show` compares against the local repo and not the remote, if there is one. – EML Jun 05 '17 at 10:44
20

The equivalent command in svn is:

svn log --diff -r revision

Hongbo Liu
  • 2,818
  • 1
  • 24
  • 18
9

Call this in the project:

svn diff -r REVNO:HEAD --summarize

REVNO is the start revision number and HEAD is the end revision number. If HEAD is equal to the last revision number, it can skip it.

The command returns a list with all files that are changed/added/deleted in this revision period.

The command can be called with the URL revision parameter to check changes like this:

svn diff -r REVNO:HEAD --summarize SVN_URL
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
bakalov
  • 311
  • 3
  • 4