[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Automatic Disconnected Operation
From: |
Aaron Bentley |
Subject: |
Re: [Gnu-arch-users] Automatic Disconnected Operation |
Date: |
Mon, 25 Oct 2004 14:29:59 -0400 |
User-agent: |
Mozilla Thunderbird 0.5 (X11/20040309) |
John Goerzen wrote:
Lately I hve been poking around with darcs a bit, and the one really
nice thing about it is that it can automatically work "disconnected".
The mirrors/tags approach
=========================
I'd actually combine both approaches. On your desktop or server, keep a
mirror of your laptop's archive, and on your laptop, keep a mirror of
your remote archive.
Whenever you plan to hack on your laptop, do a full archive-mirror to it
(that way, you can hack on *anything* in the archive, not just what you
predict you'll want). When you come back, mirror to the desktop/server.
Keep long-running working trees on your laptop. When you want to work
on them, just star-merge the latest changes from your other archive.
I think it's fine to have a monolithic patch containing several "remote
revisions". The merged patches will be noted in the new-patches header
and log-for-merge output, so if you keep a mirror of your remote
repository, all interested parties will be able to see the individual
patches.
But if you really do want separate commits, John Meinel's suggestion of
a replay-and-commit script is a good one. Yes, I'd be happy to stick
that in Fai or aba.
So that's not too much typing-- it's an archive-mirror, a star-merge and
a commit on each end.
If the merge commands supported mixed versions, you could replace the
star-merge with a tag command. That would avoid the redundant commits
and faithfully reproduce the history. Fai's "merge" and "update"
commands are safe for use with mixed versions, but no one can agree on
what "replay" should do with them.
The swap-mirror approach
========================
If this is a single-commiter archive, there are also somewhat more
dangerous options like mirror-swapping. Since the difference between a
master repository and a mirror is a single file, you can easily convert
one into the other. So:
- turn local into a mirror
- archive-mirror local -> remote
- turn remote into the master archive
It's important to ensure that
- the mirror is up to date before you convert it into the master
- there is at most one master at any given time.
Aaron
--
Aaron Bentley
Director of Technology
Panometrics, Inc.