Cloning and hard links under Windows
Bob Hood
bhood2 at comcast.net
Mon Apr 2 21:10:57 UTC 2018
Hey, guys.
I'm starting to think ahead to an upcoming role as "Release Manager" where I
will be following a modified GitFlow paradigm, and merging and pulling
changesets from an integration branch into a release branch. When I attempt a
merge from an unknown branch, I will usually personally create a clone of the
repository on a separate file system (so it's a complete clone) and then, if
the merge fails for any reason, I simply destroy the cloned folder without
polluting my own local working copy. If it succeeds, I push upstream, and
then delete the cloned folder anyway.
This action of cloning under Windows can take 5-10 minutes on my machine. For
a single instance, that's bearable. However, if I'm going to be doing this
multiple times a day, that time will stack up.
I tried a clone on the same file system, and it took < 1min to complete, but
it is also "linking" instead of copying. I ran through the cloned working
copy, looking for the hard links that Mercurial created, and it looks like
some key management files are hard linked to the original repository. I'm
worried that a failed merge would pollute these files, which would mean that
my original "pristine" copy would also become questionable even if I
subsequently destroy the working clone.
My question is: Can I retain the speed of the clone that I get with hard
linking (i.e., same file system), and then just make independent copies of the
files that are hard linked in the clone to have a completely separate working
copy in a timely fashion? I'd really rather not have to use the "--pull"
protocol each time I need to attempt merges.
Thanks!
More information about the Mercurial
mailing list