Hg and ClearCase and Windows and Symlinks (was: Handling thirdparty 'vendor' branches)

Georg-W. Koltermann gwk.rko at googlemail.com
Fri Jul 11 15:11:30 CDT 2008


Am Freitag, den 11.07.2008, 11:49 +0300 schrieb Dov Feldstern:
...
> (now the rest is off-topic: Sure, I hope to convert others at work to mercurial, 
> and maybe someday actually officially switch over. However, this will take time: 
> we have thousands of developers all over the world... Specifically, my current 
> showstopper from getting *anyone* else to use mercurial, is this: (a) Virtually 
> everyone at work develops on Windows. Now, ClearCase provides support for 
> symbolic links, even on Windows (by providing a virtual filesystem, maybe Samba 
> based?). So (b) our tree depends on symbolic links. Because of (b), after 
> converting our trees to a local filesystem (as in mercurial's working directory) 
> development can only work on a symbolic-links capable filesystem; and because of 
> (a), no one develops on such a system (I myself am working with CoLinux, so for 
> me it's possible; but converting everyone to Linux would be even harder, I 
> think, than converting them to mercurial). I'm working (slowly, in my spare 
> time) on an extension which I hope will provide symbolic link simulation, and 
> then maybe I'll be able to get some people to start playing around with this. 
> Probably hopeless, but worth a shot... ;) )

Hi Dov,

I'm in a not too different situation, having to work with ClearCase at
work, trying to get others to use Hg, evangelizing, scripting...

I have a set of scripts that mirror ClearCase history incrementally into
Hg, preserving checkin time/author/message, synthesizing Hg changesets
from single file changes in ClearCase.

I have a script that takes a Hg version and copies changed files back
into ClearCase, guarding against concurrent changes done to the same
files in ClearCase.

I have a Python hook script that creates symlinks in a Linux Hg clone,
and creates hard links instead in a Windows Hg clone.  Both is driven by
a text file containing the inventory of symlinks that came from
ClearCase.  Oh, due to the fact that I'm using hard links on Windows
this is of course limited to links of files.  Links of directories
aren't possible.

All these pieces are more or less hacked together and far from being a
product that I could publish, but they work for me.  If someone asks,
I'd be willing to share, just be warned they are hacks and I have very
limited time to document them and guide anyone.

At work I'm just trying to get some Windows users to use Hg (using Linux
exclusively myself).  I hope that can work out.  Recent fabulous tools
like TortoiseHg and Mercurial Eclipse give me a lot of hope; I'm afraid
I won't convince any Windows user by offering a command line interface
alone.

I'm attaching the Python hook script for managing links from the
descriptor text file.  It's pretty basic, but whatever, maybe it's
useful to someone.  It also contains some branch name convention
enforcing which I happen to bundle in the same script, that can be
ignored in this context.

--
Regards,
Georg.

P.S.: Giorgos, aren't you someone I know from a FreeBSD mailing list a
while ago?  I though I remember your name.  What a small world.  Hope
I'm not mixing things up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msc.py
Type: text/x-python
Size: 6914 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080711/af90e3b5/attachment.py 


More information about the Mercurial mailing list