craig campbell

My First GitHub Repository : show-missing-revs

created June 30, 2010 at 10:38 pm
updated July 1, 2010 at 8:56 pm
I signed up for GitHub a little while ago, but hadn't used the site for anything until just now.

I want to be more open about sharing my code with the world, and I was inspired by the irony of posting a Subversion utility script on GitHub.

As far as what the script does, it is for finding what revisions in one branch are missing in another.
I will give a brief overview:

Let's say you are developing a product in trunk and it is time for the 1.2 release. You create a 1.2 branch from trunk, push it out to the world, and begin developing version 1.3 in trunk. After 1.2 is released you start getting tons of bug reports. You work feverishly to fix the bugs in the 1.2 branch but sometimes forget to merge your bugfixes back into trunk. A month later, you are about ready to release version 1.3 from trunk, but some of the bugs you have already fixed in the 1.2 branch were never merged back into trunk. If they don't get merged you risk reintroducing bugs you have already fixed!

How on earth are you going to find out what revisions you forgot to merge?

Subversion has a way of doing this, but all it gives you is the revision numbers. Using my script you get the revision number, the user who made the commit, and the first line of the commit message. You have the option to target a specific user.

Using the script looks a little like this:
cd /path/to/trunk sh /path/to/show_missing_revs.sh -b 1.2 -u craig

That will output something like:
displaying revisions in 1.2 branch by craig that have not yet been merged to trunk r127 | craig | added awesome stuff r143 | craig | fixed broken awesome stuff r144 | craig | removed debug statement

Hopefully someone will find this useful.

You can find it on GitHub at http://github.com/ccampbell/show-missing-revs.

0 comments