How to organize a 'central repository'

Brian Wallis brian.wallis at infomedix.com.au
Mon Mar 31 20:07:34 CDT 2008


On 01/04/2008, at 5:57 AM, David I. wrote:
> Brian,
>
> Could you post some info on how you got Tailor configured to  
> convert your repository?
>

Certainly!

I've attached a zip file with three tailor config files and two  
scripts in it (hope this works on the mailing list, it is small,  
about 3K, if not I will post the files in a subsequent message).

I figured that this would be better than describing it, the devil is  
definitely in the details with the tailor configuration. Michael  
Smith's config that he posted earlier got me onto the right track  
(Thanks Michael!) to specifying the revision correctly to tailor,  
there are many combinations you can try and not all will give  
sensible results.

Basically I am following the procedure described at http:// 
www.selenic.com/mercurial/wiki/index.cgi/TailorCVSBranches

There is a config file for head and one for each of the branches that  
I am converting and there are two shell scripts, one for the initial  
import to Hg and another to do regular updates from CVS into the Hg  
repositories.  I only want two of 8 branches in our CVS repo and only  
want history since 1/1/2007. Tailor does all of this quite well.

In the scripts you will see a couple of dates used to find the  
mercurial change numbers of the branch points. Finding these dates  
requires careful examination of the cvs rlog output and some  
knowledge of when the branch was created, CVS does not track this info.

I create (and update) three repositories, one for head and one for  
each branch. I then create (and update) a combined repository. I  
haven't decided which way to go in production yet but am swaying to  
using a repository per branch.

I have tailor version 0.9.30 and Hg 0.9.5. Tailor has been slightly  
modified to force the encoding, I couldn't get encoding to work with  
the configuration flags. I also have a slightly hacked version of CVS  
to remove the infamous sleep (around line 520 in update.c)

A full load from the CVS repo takes about 6 hours and an update takes  
about 40 minutes.

Note:
*** I do *NOT* use the cvsps backend, I am using the direct CVS  
interface. I have tried a few of the available conversion tools  
(tailor, hg convert, fromcvs, convert-repo)  and found that any that  
used cvsps would end up with corrupted branches for our repository.  
cvsps is trying to create changesets from an incomplete set of data  
and it just doesn't work reliably in our case.

*** This (usage of cvsps) is the main reason why I cannot use the  
builtin ConvertExtension. The other main reason is that there is not  
enough control built into the ConvertExtension to filter out stuff  
from the source repo (ie: only history since 1/1/2007 and only two of  
the 8 branches. It also loads all the tags but they are bogus and so  
more dangerous in than out)

*** I do not get any tags converted with Tailor. This is a bit of a  
nuisance but the tags in our CVS repo defy any attempt to convert  
them. We have had a long running release process that causes the  
almost random movement of tags on individual files. This is one of  
the practices I will stamp out with a change to mercurial!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tailor_files.zip
Type: application/zip
Size: 3286 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080401/06e62fda/attachment.zip 
-------------- next part --------------


Brian Wallis
InfoMedix
p: 3 8615 4553 | f: 3 8615 4501 | e: brian.wallis at infomedix.com.au
Level 5, 451 Little Bourke Street, Melbourne VIC 3000





More information about the Mercurial mailing list