Converting "home-made" revision control into Mercurial

Giuseppe Bilotta bilotta78 at hotpop.com
Fri May 5 11:24:24 CDT 2006


On Thu, 04 May 2006 15:34:18 -0700, Bryan O'Sullivan wrote:

> On Thu, 2006-05-04 at 23:16 +0200, Giuseppe Bilotta wrote:
> 
>> How hard would it be to make such a conversion?
> 
> This should be an hour or two of Python or Perl scripting, maybe a bit
> more if you use a shell instead.  The only bit that would be tricky is
> clustering files that got saved "around the same time" into a single
> commit.

I've given a look at the git-specific convert-repo script. If I get
the idea, the process is just a matter of creating a working directory
and repeating the following loop:

1. "check out" a revision from the old repository (i.e. copy the files
saved "around the same time") into the working directoy
2. hg add missing files (in my case there aren't any 'removals')
3. hg ci in the working directory (or skip 2. and run hg ci -A)
4. goto 1.

until all the revisions are done. Is this correct? In particular, I
was wondering if there isn't a way to insert 'virtual' revisions into
Mercurial without writing the files to disk (in this case by copying
them from their old name).

-- 
Giuseppe "Oblomov" Bilotta

"I'm never quite so stupid
 as when I'm being smart" --Linus van Pelt



More information about the Mercurial mailing list