Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn -- Time since last merge

I am in need of a "time since last merge" report. We have a single branch where changes from other branches are integrated. To keep everyone in sync, we encourage branch masters to perform a merge from integration line to their respective branches.

I am working on a post-commit hook that will send a report every time a commit is done on integration line that explains:

  1. source branch
  2. time since last merge between integration and other branches

svn mergeinfo is the starting point, but what other commands will help me get this info?

like image 325
publicRavi Avatar asked Dec 07 '10 16:12

publicRavi


2 Answers

svn log gives you the figure semi-straight.

If all merging is done on the highest possible directory level (as is best practice), then execute the following command:

svn log -g https://myrepos.tld/branches/single-private-feature-branch

you will get the usualy history plus revisions that were merged into this branch. Look for the string "Merged via: ". The first hit will be the last merge into this branch. You can optionally fetch the log entry of the revision given to make sure it is comming from the integration branch and was not merged from some other place.

All this can be done with simple shellscripting.

Hope it helps :)

C

like image 59
Christoph Strasen Avatar answered Oct 13 '22 00:10

Christoph Strasen


There are a number of tools available to do SVN reporting. Many of them are mentioned in the answer to this question: What reporting is available for svn?

like image 39
Michael Dillon Avatar answered Oct 13 '22 01:10

Michael Dillon