cp -al and knits
John Arbash Meinel
john at arbash-meinel.com
Thu Apr 20 16:10:29 BST 2006
Matthieu Moy wrote:
> Hi,
>
> the old way to do cheap branches was to "cp -al" the branch directory.
>
> Is that still possible/recommandable with knit (which append to the file
> instead of overriding it).
>
> After a few experiments, it seems commiting to one branch adds to the
> revision store of the other branch, but without modifying its revision
> history (hardlinks are still broken on .bzr/branch/revision-history).
>
> As a result, it "still somewhat works", but seems very likely to break
> (the branch locks are not shared, so you might get concurrent accesses).
>
> I suppose "cp -al" should be mentionned as a _dangerous_ operation
> instead of a supported feature on the faq :
>
> http://bazaar-vcs.org/BzrFAQ#head-6ca7dc16717fb755dfba95fa77bfe261003e6261
>
> (anyway, repositories are a better replacement for that isn't it?)
>
I think the revision locking is the biggest reason why this is likely to
break stuff.
With the old code you had both atomic replacement, but also taking an OS
lock on a hardlinked file locks both branches.
With directory renames, you don't have that anymore. I think when we
were originally discussing knits, we were planning on using an OS lock
on each file as we were modifying it, which would mean that hardlinking
would still be safe.
But we ditched OS locks because of NFS and SFTP, so I think we need to
ditch hardlinked trees. We have repositories now, so they aren't as
important.
So I'm updating the Wiki to say that it isn't recommended anymore.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060420/9f37adf9/attachment.pgp
More information about the bazaar
mailing list