Cloning and hard links under Windows
Matt Harbison
mharbison72 at gmail.com
Tue Apr 3 01:50:31 UTC 2018
On Mon, 02 Apr 2018 17:10:57 -0400, Bob Hood <bhood2 at comcast.net> wrote:
> 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.
It sounds like you want the ability to have multiple independent
checkouts, so it seems like the share extension would be useful.
> 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.
I'm a bit confused. The only hardlinks should be under .hg/, not the
working copy. Nothing under .hg/ should be affected by a failed merge.
That doesn't happen until the commit.
> 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!
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list