Tags & production questions

Guido Ostkamp hg at ostkamp.fastmail.fm
Fri May 4 23:37:49 UTC 2007


> If you've got a script for your Clearcase conversion, please add it to 
> the wiki here:
>
> http://www.selenic.com/mercurial/wiki/index.cgi/RepositoryConversion

What I currently have is just a collection of more or less primitive Perl 
hacks that deal only with files in the ClearCase mainline. I have not yet 
found a way to detect renaming or removal of files or directories in 
ClearCase. And most important any branch and tag support is missing.

What I have works like this:

1. Find anything in Mainline edited later than a certain date (omit the 
date condition, if you want anything from the ground up) and put the 
resulting entries with fully qualified pathname into a file.

$ cleartool find /<your_project_dir> -version "brtype(main) && 
created_since(01-Jan-2007.00:00:00)" -exec "echo \$CLEARCASE_XPN" > 
~/created_since_2007_01_01

2. Call a tool that removes CHECKEDOUT and /main/0 elements and anything 
that is not a file (e.g. directories). For the remaining files, use 'stat' 
to obtain the date on the fully qualified pathname with version. Sort the 
files in ascending date order, creating a new list.

3. Call a tool that processes the new list. For each file in ClearCase, 
extract the relative pathname and recreate the path in the Mercurial 
working copy directory. Copy the versioned file to this directory omitting 
the version specification in the filename and overwriting any previously 
existing file with same name; additionally fetch metadata (author, 
logentry, date) from ClearCase. Call 'hg add' if necessary, finally call 
'hg commit' using this metadata.

Regarding the Branches and Tags I am afraid that the concepts of ClearCase 
and those of Mercurial are too different so that ClearCase branches most 
likely cannot be accurately modelled in Mercurial. For example, in 
ClearCase a file can be branched off from any version which means any 
point in time while in Mercurial all files branch at the same time.

>> I ended up with a Mercurial repository of ~950 Megabyte size (including 
>> ~500 MB working copy), which contained ~9200 files in ~1300 directories 
>> and had ~38000 changesets. A small number of files are binaries.
>>
>> As I said, this was only the main branch. We also have ~15 more 
>> branches with main development lines most of which are still maintained 
>> where each branch contains numerous maintenance releases made over the 
>> years which are 'tagged' with labels in ClearCase.
>>
>> Development mainly takes place on Sun servers running Solaris OS. In a 
>> professional environment, server disk space, which also has to be 
>> backed up at night, is very expensive - also the systems are used for a 
>> long time, and disks have thus not the sizes you are used to on a 
>> modern PC.
>
> Well, that's not not so much to do with being in a "professional 
> environment" as being blindered by ClearCase.

I don't understand your point. Can you please explain what you mean?

Do you think the disk footprint of checked out Mercurial repositories is 
better than those of ClearCase views?

Regards

Guido



More information about the Mercurial mailing list