[issue3157] Hardlinked clone is evil

Jason King bugs at mercurial.selenic.com
Thu Dec 15 18:02:48 CST 2011


New submission from Jason King <jking at oneloop.com>:

Every once in a while I noticed that my repo was completely corrupted
requiring me to pull the entire repo from our central repository.  I finally
determined the cause: hardlinked clone.

I understand that --pull is the solution, but I would like to explain why I
think this is still a bug.  

My situation occurred in the following manner...
I needed to send my source code to a middleware library support.  So I
cloned my repository and then proceeded to delete the .hg folder so that I
could zip up the source code and send it to support.  Unbeknownst to me, I
just corrupted my entire original repository because all of the hardlinked
files were deleted.

I consider this to be a bug because the less harmful system is to have
--pull be the default not the exception.  Additionally, the hardlinks are
removed as soon as the cloned repo is modified.  I don't really know of a
situation where someone will create a clone and plan to never modify it and
never delete it.  So the benefit of using hardlinks appear to be fleeting at
best and pure evil at worst.  Finally, if someone is dealing with a
situation where hardlinks are somehow beneficial, then the research required
to find the --hardlink parameter will make them experienced enough to use it.

Please consider my bug for resolution.

Thanks,
Jason

----------
messages: 18320
nosy: Jason King
priority: bug
status: unread
title: Hardlinked clone is evil

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3157>
____________________________________________________


More information about the Mercurial-devel mailing list