Multiple undo again...

Jason Harris jason at jasonfharris.com
Sun Jun 6 19:17:55 CDT 2010


On Jun 7, 2010, at 1:27 AM, Christian Ebert wrote:

> * Martin Geisler on Friday, June 04, 2010 at 16:39:22 +0200
>> You can just hardlink all files (cp -al). I just tested with mq, and it
>> will break the hardlink before it modify .hg/patches/status. As long as
>> all the code is using the util.opener class for file access, then you
>> will be safe.
> 
> Beware that cp shipped with MacOS X does not provide the -a and
> -l options, hopefully there are some that correspond to them.

Thanks! Yep I discovered this. After digging into this yesterday, I found on OSX its actually not too difficult to compile up gnu cp. I did this, and it seems to work. However I think there may be issues to do with resource forks and other things on OSX.  Also you can replace 'cp -al a b' with 'cd a && find . -print | cpio -dpl ../b'

> In view of extended file attributes it might be better to use rsync
> (have a look at the -X/--xattrs option).

Yep. There is the rsync option as well I think in the end if its fast enough I'll be using that.

I have to test speed test these across a range of repositories, etc. Also with rsync I think there might be the potential to pre-cache the next "backup" and then only save the changes into that directory. Then I need to see if these are faster than actually just using Mercurial alone to do this by the .hg directory shuffling technique.

But if possible I will as you say be actually using rsync which to do the 'cp -al' that Martin suggested. (Martin actually mentioned rsync to me as well :) )

But thanks!

Cheers,
  Jas


More information about the Mercurial-devel mailing list