|
From: | John Meinel |
Subject: | Re: [Gnu-arch-users] Re: Automatic Disconnected Operation |
Date: | Mon, 25 Oct 2004 11:07:05 -0500 |
User-agent: | Mozilla Thunderbird 0.8 (Windows/20040913) |
John Goerzen wrote:
On 2004-10-25, Stefan Monnier <address@hidden> 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".Here's how that would work in darcs:1. I do a darcs get to download the repository 2. I hack around, using "darcs record" to commit each change Changes are only saved locally. 3. When I have a network connection again, I "darcs push" to upload my changes to the server.How does it handle the case where someone else has committed patches to the same branch in the mean time. Of course it can try to reorder those patches using its patch-algebra (which is quite handy in this particular case), but what if there's a real conflict?I don't know, but I bet someone in here knows the answer. I suspect it would generate an error if it couldn't handle the situation automatically. If I knew someone else commits to the repository on the network (in my case, I know that nobody else does), I would probably do a darcs pull before my darcs push to grab any changes and integrate them.
I believe in the case of darcs, each checked out copy contains the full revision history. Because darcs doesn't really do patch ordering (it does dependencies, but not the same as Arch's always increasing numbers), it works a little differently. I'm not sure how darcs names things to prevent conflicts. But each working copy keeps track of what patches have been applied versus any other working tree. I think really what is desired here is a local archive, and then some way to "star-merge" each change back into the main archive, preserving the changesets. As a semi-clumsy way to do it: $ NETWORK="network-archive/project... " $ LOCAL="local-archive/local-project..." $ tla tag -S $NETWORK $LOCAL $ tla get $LOCAL proj $ cd proj hack hack $ tla commit hack hack $ tla commit ... $ cd .. $ tla get $NETWORK netproj $ cd netproj $ for p in `tla revisions $LOCAL`; do tla star-merge $p $NETWORK tla cat-archive-log $p > `tla make-log` tla commit done I haven't tested this, and it seems pretty reasonable to talk to Aaron Bentley to have something like this checked into fai as a helper routine. Kind of a "merge all of my changes, one-by-one". John =:->
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |