[PATCH] parsers: it should check the other interesting before decreasing ninteresting (issue3984)
Chingis Dugarzhapov
chingis.dug at gmail.com
Thu Jul 25 12:38:00 UTC 2013
Hi Elson,
The result of hg log -r "ancestors(10,9)" for 2.2.2 and 2.6.3+patch is
different for me:
2.2.2:
# hg log -r
"ancestor(10,9)"
changeset: 4:f303d6efbf44
branch: foo
parent: 2:d0f226159ee1
user: Tavis Elliott <telliott at apptio.com>
date: Wed Jul 17 09:11:23 2013 -0700
summary: Added e, modified c
2.6.3+patch:
# hg log -r
"ancestor(10,9)"
changeset: 6:67c8c7ad41bf
branch: foo
parent: 2:d0f226159ee1
user: Tavis Elliott <telliott at apptio.com>
date: Wed Jul 17 09:07:13 2013 -0700
summary: added d, changed c
It means that
assert set(ancs) = old
in revision 18988:5bae936764bb still silently fails. Is it normal?
Note that both 4 and 6 are on the same branch foo (from test case), and
they are on the same distance from root.
On Thu, Jul 25, 2013 at 11:53 AM, <elson.wei at gmail.com> wrote:
> # HG changeset patch
> # User Wei, Elson <elson.wei at gmail.com>
> # Date 1374744953 -28800
> # Thu Jul 25 17:35:53 2013 +0800
> # Branch stable
> # Node ID 024085d8dd13dcc4db48c7f99ed04c1ca5864597
> # Parent 32e502b26983eaa89574835a024a9b035ad72bf4
> parsers: it should check the other interesting before decreasing
> ninteresting (issue3984)
>
> diff --git a/mercurial/parsers.c b/mercurial/parsers.c
> --- a/mercurial/parsers.c
> +++ b/mercurial/parsers.c
> @@ -1359,10 +1359,10 @@
> if (nsp == sp)
> continue;
> seen[p] = nsp;
> + interesting[sp] -= 1;
> + if (interesting[sp] == 0 &&
> interesting[nsp] > 0)
> + ninteresting -= 1;
> interesting[nsp] += 1;
> - interesting[sp] -= 1;
> - if (interesting[sp] == 0)
> - ninteresting -= 1;
> }
> }
> interesting[sv] -= 1;
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20130725/cc0fb41a/attachment-0002.html>
More information about the Mercurial-devel
mailing list