Differences between revisions 1 and 2
Revision 1 as of 2006-12-19 06:09:35
Size: 2368
Editor: mpm
Comment:
Revision 2 as of 2006-12-19 06:12:35
Size: 2500
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

Tailor is a tool that supports conversion between a variety of systems. It's available at http://www.darcs.net/DarcsWiki/Tailor.

See RepositoryConversion for other conversion tools.

Tailor is a tool that supports conversion between a variety of systems. It's available at http://www.darcs.net/DarcsWiki/Tailor.

Example Tailor conversion from CVS

This is tested with Mercurial 0.7 and Tailor 0.9.18

 mkdir -p /path/to/hg/repo
 cd /path/to/hg/repo
 tailor -v --source-kind cvs --target-kind hg --repository $REP --module MODULENAME -r INITIAL > MODULENAME.tailor
 vi MODULENAME.tailor

Now you will at least need to change subdir from . to MODULENAME, and remove /MODULENAME from root-directory in the MODULENAME.tailor file. You will probably also want to add the line:

 patch-name-format =

at the end of the "project" section to get your cvs checkin comments in the patch summaries. Type man tailor and search for patch-name-format to learn more about this. When done editing the config file type:

 tailor --configfile MODULENAME.tailor

When this is done, you should have a working Mercurial repository that matches the trunk of the CVS archive you have been using. The --repository option gets passed to CVS via the -d option, so anything that works for $CVSROOT will for for --repository.

Be aware that the last stage of this script will take a long time to run. Also, local access to the CVS repository instead of remote access may make it significantly faster.

Things to know:

  • -D turns on debugging mode, printing each executed command. Good way to understand what Tailor is doing, but produces an invalid config file is used in the first tailor command above.

  • -v verbose, echo the changelogs as well as the commands being run (convenient for understanding progress)

  • Don't do the above process where /path/to/hg/ contains a cvs checkout in a directory with the same name as MODULENAME (as in, /path/to/hg/MODULENAME already exists). Weird things happen.

Tailor config files

A very convenient way to use Tailor is through ini style config files. An example file like the following could be used to convert from a cvs repo to a hg one:

[DEFAULT]
patch-name-format =
verbose = True
encoding = iso-8859-15

[mutt_hg]
root-directory = /home/brendan/hg/mutt
source = cvs:source
target = hg:target

[cvs:source]
module = mutt
repository = :pserver:anonymous@myproject.server.net:/cvsroot/mutt/cvs

[hg:target]
encoding = utf-8

Tailor (last edited 2012-05-14 21:19:01 by mpm)