Mercurial > hg
annotate tests/test-debugrename.t @ 44450:7d5455b988ec stable
discovery: avoid wrong detection of multiple branch heads (issue6256)
This fix the code using obsolescence markers to remove "to be obsoleted" heads
during the detection of new head creation from push. The code turned out to not
use the branch information at all. This lead changeset from different branch to
be detected as new head on unrelated branch.
The code fix is actually quite simple. New tests have been added to covers
these cases.
Differential Revision: https://phab.mercurial-scm.org/D8259
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 06 Mar 2020 23:27:28 +0100 |
parents | 5d9bc49b0b1e |
children | 55c6ebd11cb9 |
rev | line source |
---|---|
12285
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
1 $ hg init |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
2 $ echo a > a |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
3 $ hg ci -Am t |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
4 adding a |
4637 | 5 |
12285
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
6 $ hg mv a b |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
7 $ hg ci -Am t1 |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
8 $ hg debugrename b |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
9 b renamed from a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
4637 | 10 |
12285
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
11 $ hg mv b a |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
12 $ hg ci -Am t2 |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
13 $ hg debugrename a |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
14 a renamed from b:37d9b5d994eab34eda9c16b195ace52c7b129980 |
4637 | 15 |
12285
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
16 $ hg debugrename --rev 1 b |
5d9bc49b0b1e
tests: unify test-debugrename
Adrian Buehlmann <adrian@cadifra.com>
parents:
4637
diff
changeset
|
17 b renamed from a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
4637 | 18 |