Keeping 2 disconnected sites in sync

Bryan O'Sullivan bos at serpentine.com
Tue Jun 20 20:09:49 CDT 2006


On Tue, 2006-06-20 at 22:23 +0100, Paul Moore wrote:

> A third option might be to use hg bundle and email bundles between the
> sites. But I can't see how to do this, as I get the impression that hg
> bundle needs to see the target repository in order to decide what
> changesets to include.

As an alternative, you could clone a copy of your repo, some number of
revs earlier ("hg clone -rXXX"), then bundle based on that.  The goal
would be to have that local clone contain a (possibly complete) subset
of all the changes you know are on the far end, then bundle based on
that local clone, and email yourself the bundle.  Of course, if you end
up with the local copy of that remote repo having changes that aren't in
the remote repo, the bundle will be useless, so this is a somewhat
brittle approach.

> I'm starting to think that the USB key approach is the best - using
> Mercurial's better support for disconnected operation and better
> merging to deal with my lousy discipline :-)

This is definitely the easiest and most reliable thing to do, assuming
you have no other means of connectivity.  As I mentioned in another
message, using rsync to put stuff onto the USB disk would mean that you
wouldn't even have to commit half-baked changes.  (Using rsync to get
changes off the drive would also work, but is less safe, since it could
make local work vanish.  You should rsync to a temporary location that
you know is safe instead.)

	<b



More information about the Mercurial mailing list