TeamWare to Mercurial history conversions

Since Google shows no options for converting TeamWare workspaces to Mercurial (beyond an OpenSolaris-specific incremental tool), and I had some scripts sitting around that can be used for this purpose, I am sharing them in the hopes that someone will find them useful. These scripts are by no means polished, and may or may not work for you as is.

Here is roughly what you need to do:

  1. Get your TW workspace unpacked somewhere, say /tmp/project-tw.
  2. Make sure you have installed: Perl, CVS, RCS, and Mercurial (0.9.5+).
  3. Install SCCS if you do not already have it. (You do not need TeamWare installed as the scripts just use the SCCS layer.) For Ubuntu 7.10 users, just use: sudo apt-get install cssc, and add /usr/lib/cssc to your $PATH.
  4. Download and make executable: sccs2exploded.pl
  5. First we convert the workspace into an "exploded" series of snapshots with some metadata. Run: sccs2exploded.pl --indir /tmp/project-tw --outdir /tmp/project-exploded
  6. Download and make executable: exploded2cvs.pl
  7. Run: cvs -d /tmp/project-cvs init
  8. Now we try to "implode" the snapshots into a CVS repository. (If you needed to do any cleanups of log messages etc., you could do that most easily on the exploded repository.) Run: exploded2cvs.pl --indir /tmp/project-exploded --outdir /tmp/project-cvs/module
  9. Run: cvs -d /tmp/project-cvs co module
  10. Run: hg convert module project-hg
  11. Inspect project-hg, your new Mercurial workspace. You may need to hg up -r tip -C to get to the "tip" revision. If there are some branches imported from TeamWare, you may need to see what they are using hg heads and resolve them using hg merge.

Good luck! I have run this procedure on Ubuntu on a small TeamWare workspace successfully, but for big projects there could well be some complications. Features and limitations:

  • File deletions (deleted_files) should be correctly imported.
  • Branches (lines of development) may be imported, though I don't really know a lot about this. YMMV.
  • File renames will not be imported, as CVS cannot represent this.
  • Freezepoints are not imported as tags, sorry.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

jglick

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today