[PATCH 1 of 2] mq: reset self.added after the mq transaction instead of inside qimport

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Jul 12 05:37:29 CDT 2010


On Mon, Jul 12, 2010 at 11:59, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> # HG changeset patch
> # User Nicolas Dumazet <nicdumz.commits at gmail.com>
> # Date 1278924923 -32400
> # Branch stable
> # Node ID cc85aed7e8df69d1fca77899dc8aadf30b147197
> # Parent  ee876e42dd742f4dd7d9309cd964733c45e75af6
> mq: reset self.added after the mq transaction instead of inside qimport
>
> It seems wiser to reset mq.added at the end of the mq transaction instead of at
> the beginning of a qimport call: this way, calling several times qimport()
> without saving mq state in-between does not overwrite the previous value of
> mq.added (this happens, for example in rebase, where we import several patches
> in a batch before calling .save_dirty() )

Sounds good. Are we exposing callers relying on the old behavior to
any new risks?

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list