smerge


Introduction

At work I used to keep two different source control repositories in sync. This means I spent a ridiculous amount of time merging (at least four hours a week). I am a huge fan of ediff. Once you are used to markups of changes within the lines, it is hard to go back to other diff/merge tools.

While ediff is great for buffers, files, single directories, and 3 way merges, it falls down on large directory structures with small changes all over the place. You spend too much time descending into directories with no changes.

So I started using WinMerge. WinMerge is a great tool, but it had two problems. One, it is windows only. Two, it could no longer handle the large code base at work. Update: I believe the size limitations have since been fixed.

I contemplated writing my own WinMerge like tool in qt, but I do not enjoy writing GUIs. Then I got back to thinking about ediff and realized all I needed was a wrapper on top of ediff. So I started smerge.

It looks ugly, has many rough edges, and is missing quite a bit in the configuration and documentation department, but it is usable. I use smerge almost daily at work.

Requirements

  1. XEmacs or GNU Emacs
  2. ediff package
  3. GNU diff
  4. For GNU Emacs you must have my extent.el
  5. And of course, smerge.el!

How it Works

You give smerge two directories to start with. It then calls diff -r --brief on the two directories. The output is post-processed into three columns: only in directory 1, in both but different, only in directory 2.

In the left and right columns, you can copy the file to the other directory. In the middle column, mouse 1 and mouse 2 call ediff on the two files. mouse 3 opens a menu that lets you copy the file to the other directory.

 

Back to http://xemacs.seanm.ca/ or http://emacs.seanm.ca/.


Sean MacLennan
Last modified: Thu Dec 31 02:10:02 EST 2009