merging and reordering changes with mq
Radoslaw Szkodzinski
astralstorm at gorzow.mm.pl
Sat Nov 12 17:10:31 UTC 2005
Chris Mason wrote:
> On Sat, Nov 12, 2005 at 01:47:10PM +0100, Radoslaw Szkodzinski wrote:
><snip>
> Of the steps you've listed, the one most likely to dirty files/change
> mtimes is the part where we pop to a certain place in the series file.
> I don't see how that can be avoided during the fold.
>
The pop is a workaround for now. A true fold or reorder doesn't need to
pop at all.
Something like this:
(A - revision of the patch we fold into)
(B - patch we fold, the one given as a parameter)
- create a temporary directory in .hg
- checkout there A (only parts we're interested in - files modified by B)
- try to apply B in temp directory (with conflict resolution)
- try to apply everything else in the series in the temp dir (one by
one) only to the files changed by B - and refresh the patches as they go
- refresh A and other revisions
- copy only modified files (files from B) to repo root
- remove temporary directory
As you can see, we only touch files we really have to. The rest is
irrevelant. If a reject needs a modification of another file, we can add
another patch for that and fold it into the one which rejected.
--
GPG Key id: 0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
AstralStorm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20051112/0c543301/attachment-0001.asc>
More information about the Mercurial
mailing list