Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: is it possible to get svn info for a given revision number of a branch

Tags:

Is it possible to get svn info for a branch for a specific revision number. For example if the latest working copy of a branch has revision number 56, can I get info for the same branch for revsion number 32.

like image 808
sidharth sharma Avatar asked Jan 28 '13 05:01

sidharth sharma


People also ask

How does svn revision number work?

Unlike most version control systems, Subversion's revision numbers apply to the entire repository tree, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change.

How do I checkout a specific version of svn?

If you want to write a script which requires no input, you should use the official Subversion command line client instead. checkout a working copy in REV revision: svn checkout --revision REV https://svn.example.com/svn/MyRepo/trunk/ svn checkout https://svn.example.com/svn/MyRepo/trunk/@REV.


2 Answers

There are two options available to get informatioon about past revisions:

  • svn log -r <rev number> <url>: the commit message of a specified revision and url
  • svn info -r <rev number> <url>: some technical information about a specified revision and url

An example: svn log -r 5628 https://repo.exampl.org/prod/branches/info/conf/config

It is all described in the help messages built into the svn command: svn help or svn help info...

like image 173
arkascha Avatar answered Sep 22 '22 03:09

arkascha


Assuming you are in a working copy, you can just do the following:

Get commit info:

svn log -c <rev number>

Get commit info with file list:

svn log -c <rev number> -v

Get full file diff:

svn diff -c <rev number>
like image 31
zeroimpl Avatar answered Sep 23 '22 03:09

zeroimpl