[darcs-users] Basic implementation of tla2darcs

Sacha Chua sacha at free.net.ph
Tue May 25 17:36:04 UTC 2004

I've written a simple patch converter and I've used it to migrate my
main arch-managed project over to darcs. So far, so good. This
requires a version of darcs that understands noninteractive log files.

You can get it from http://sacha.free.net.ph/notebook/darcs/tla2darcs/

You will need to set up the base directory first with something like

tla get sacha at free.net.ph--main/planner--dev--1.0--base-0 planner
cd planner
darcs initialize
darcs add .....
darcs record ....

Once you've set that up, you can use tla_convert_patch.pl to pull
patches in one by one.

tla_convert_patch.pl planner--dev--1.0--patch-1

Here's the incantation I used to pull all of the missing patches in:

tla missing --full | xargs -n 1 perl ../tla2darcs/tla_convert_patch.pl

To test the results, I used darcs get to get a copy in another
directory and then used diff -bur --exclude '*arch*' --exclude
'ChangeLog' to see if the two directories significantly differed.
Seemed okay.


- I haven't tried this with replayed patches from a different tree.

- Does not handle moved files. (Have to get around to actually using
  this feature...)

- Assumes the first {arch} entry is the patch log.

- Might not nicely deal with subdirectories.

- Probably not going to be a two-way tool any time soon, unless you
  want to hack it in.

Sacha Chua <sacha at free.net.ph> - Ateneo CS faculty geekette
interests: emacs, gnu/linux, making computer science education fun
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C

More information about the darcs-users mailing list