[MERGE] Implement hard-link support for branch and checkout
John Arbash Meinel
john at arbash-meinel.com
Thu Dec 20 21:29:41 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
> Hi all,
>
> This patch implements hard-link support for branch and checkout,
> building on my previous accelerator_tree work.
>
> The primary advantage of this is space savings, not speed. But using
> hardlinks is 1.19 x as fast:
>
> branch --no-hardlink (best of 4)
> real 0m0.989s
> user 0m0.748s
> sys 0m0.212s
>
> branch --hardlink (best of 4)
> real 0m0.828s
> user 0m0.656s
> sys 0m0.152s
>
> Aaron
I'm pretty hesitant to support hardlinking working tree files. It just seems to
easy to mess up the wrong files. I could understand hardlinking .bzr/* files
when reasonable, because people won't edit them.
I know I had vim set up to break hardlinks because of Arch. But I've since
removed that because I like editing ~/bin/foo which is often a symlink, and I
don't want vim breaking my symlinks.
If we are going to do it, we need to watch out for crossing filesystems.
There are NTFS hardlinks which seem fairly well supported. So we could pull
that support in. We would need to be careful since even 'vfat' on linux doesn't
support hardlinks.
The code I've seen before used something like:
try:
os.link
except ???:
os.copy()
So it transparently handled whether the hardlinks were crossing filesystems.
I suppose if someone is explicitly requesting it....
But for now:
BB:abstain
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHat7FJdeBCYSNAAMRAj9NAJwNSyDpSn6v8ijblei+uuKkRHSPagCcCllU
xu2LEHNWJo6QMcJG/gAssiw=
=7Cc2
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list