Cloning and hard links under Windows
Steve - Gadget Barnes
gadgetsteve at hotmail.com
Tue Apr 3 05:06:43 UTC 2018
On 03/04/2018 02:50, 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.
>
>> 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
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
If you simply copy your entire, pristine, repository to new filesystem
and then perform your pull it should work just fine. (This is the nature
of distributed version control systems). You could even have a python
script to do it for you ;-) if you liked.
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
---
This email has been checked for viruses by AVG.
http://www.avg.com
More information about the Mercurial
mailing list