Brian Ray's Blog : MacDev/diffback.html

Thu, 18 Aug 2005

What's the DiffBack

The file merger app which ships with apple developer (/Developer/Applications/Utilities/FileMerge.app) is nice. However, as with all version control systems and desktop diff GUI, there may need to be some glue to hold things in place. Tonight, I wrote a little script to help launch diffs from version control into FileMerger (or any merger application).

Get the DiffBack.py Current Version.

You just run at the command line (or with some small tweaks can be put in IDE menus):

(your local repository) $ ./diffback.py <filename>

And what you will see is something like this:

http://brianray.chipy.org/images/filemergerss.png

This show the old version on the left (starts with BASE) and your working copy on the right. Do not save changes to the left version--it will be purged with the program exits.

Install

You may want to make changes to diffback.py. Just open the file with a text editor and change the default settings. Currently supports:

  • Macintosh, Window, and Unix. Basically, anything Python friendly. Of course, this was build on a mac.
  • Subversion or Concurrent Version System (CVS)
  • FileMerger.app (via opendiff), VIM (VI-iMproved), kdiff3

Requires: Python 2.2 or greater

You may also want to add it to somewhere in your system path, ie:

sudo ln -s  diffback.py  /opt/local/bin/diffback

Have fun. Please let me know if you have improvements bray (at) sent.com.

posted at: 00:26 | path: /MacDev | permanent link to this entry

Made with PyBlosxom