Cloning and hard links under Windows

Bob Hood bhood2 at comcast.net
Tue Apr 3 15:02:18 UTC 2018


On 4/2/2018 7:50 PM, Matt Harbison wrote:
> 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.

Thanks, Matt.  I'll check that out.


>
>> 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.

I see.  That's probably the info I was looking for: As long as a merge is not 
committed, those hard links in .hg/ will not be affected, and I can destroy 
the clone without impacting the source repo.

Thanks for the response, Matt.




More information about the Mercurial mailing list