Unison Part Deux

I finished the penultimate touches on using href="http://www.cis.upenn.edu/~bcpierce/unison/">unison for
mirroring directories I want mirrored. This involved the following
magic in my profile files so that emacs ediff handles the diffing and
merging (all on one line, of course):


# use ediff to merge with[out] ancestor (if the ancestor exists)
merge = Name *.txt -> perl -e “$a = ‘CURRENT1′; $b = ‘CURRENT2′; = ‘CURRENTARCHOPT’; $n = ‘NEW’; = =~ /^\W*$/ ? qq(gnudoit \”(ediff-merge-files \\\\\”$a\\\\\” \\\\\”$b\\\\\” nil \\\\\”$n\\\\\”)\”) : qq(gnudoit \”(ediff-merge-files-with-ancestor \\\\\”$a\\\\\” \\\\\”$b\\\\\” \\\\\”\\\\\” nil \\\\\”$n\\\\\”)\”); “;”

# ediff for diffing
diff = perl -e ” = CURRENT1; = CURRENT2; = qq(gnudoit \”(ediff-files \\\\\”\\\\\” \\\\\”\\\\\”)\”); “;”

I had dealt with three issues on the road to what I get with unison
out of the box and this state of near nirvana:

  • released unison has a bug in diff where some of the
    documented values are href="http://home.comcast.net/~andrex/unison/patches/2.12.0/diff-quoting.patch">not
    substituted properly.
  • the quoting and directory delimiting (/) are goofy, so use perl
    one-liner to do path handling
  • winclient (for xemacs) does not seem to allow -eval processing, so
    I needed to switch to gnuserv and gnudoit

Now I just need to get my sshd to work and I’ll be a replicating
fiend!

Leave a Comment