Clear Case to Mercurial Conversion??
Mark A. Flacy
mflacy at verizon.net
Wed Dec 19 05:36:41 UTC 2007
On 2007.12.18 18:41, Saravanan Shanmugham (sarvi) wrote:
> Has anybody imported ClearCase source into mercurial.My team needs to
> develop on a couple of components that are currently
> hosted on ClearCase. But we would like to create a Mercurial
> repository
> from the Clearcase View/Branch and then work out of Mercurial.
> I couldn't find any tool to do that. I did see mention in the archives
> that some one had written scripts to do this, couldn't find a pointer
> to
> it.
If you have a single view/branch that you intend to modify and have
access to the patch command, then it is fairly trivial to do.
If you intend to mirror several branches in the same Hg view, you won't
get much help from me.
I rsync a UCM dynamic view from work to home so that I may work upon it
without being tunneled into work the entire time. I "hg commit -A"
after the rsync so that my home copy matches work. I do whatever I have
to do, checking in as needed. When done, I "hg export
[some_set_of_change_sets] >some_file", scp "some_file" to my work
machine, and run a command that simply does...
grep "diff -r" /tmp/workstuff.diff | cut -c38- | xargs cleartool co -nc
patch -p1 </tmp/workstuff.diff
...where "/tmp/workstuff.diff" is the result of "hg export" that I
copied to my work machine.
*Obviously* that script does not properly handle the addition and
removal of files from the view as well as requiring you to be in a
specific directory where the "patch" command will work. The additions
and deletions have been rare enough in my case that I simply hand manage
those events. Your mileage may vary.
--
Mark A. Flacy
More information about the Mercurial
mailing list