[darcs-users] Use diff3 for external merges

Stefan Monnier monnier at iro.umontreal.ca
Tue Apr 1 21:46:21 UTC 2008


The doc mentions many other tools, but not the mother of all merge
tools, diff3.  So here's what I use:

   ALL external-merge diff3-darcs %o -Am %1 %a %2

together with a script `diff3-darcs' which does:

   #!/bin/sh
   output="$1"; shift
   diff3 "$@" >"$output"
   [ "$?" -le 1 ]

Hopefully, this can make it into the doc?

I wish DaRCS was a bit more clever, so that an external script
isn't necessary.  E.g. if the command line doesn't mention "%o", assume
the output will go to stdout (the other problem is that diff3 returns
a status of 1 in case there were conflicts, and 2 in case of errors).

Of course, even better would be for DaRCS's builtin merge tool to use
standard diff3 markers rather than reinvent the wheel.


        Stefan



More information about the darcs-users mailing list