annotate tests/test-nested-repo.t @ 17103:5146de7bce96

convert: keep branch switching merges with ancestors (issue3340) When running convert with a filemap, merge parents which are ancestors of other parents are ignored. This is hardly a problem when parents belong to the same branch, but the result could be confusing when named branches are involved. With: -o-a1-a2-a3... <- A \ \ b1-b2-b3...-m- <- B If all b* revisions are discarded, it is useful to preserve 'm' even if it is empty after filtering to record the branch switch. This patch makes filemap preserve "ancestor parents" if there is no "non-ancestor parent" on the same branch than the merge revision. Remarks: - I am not completely convinced by the reasons given above and those detailed by Matt in this thread: http://selenic.com/pipermail/mercurial-devel/2012-May/040627.html The properties we try to preserve are not clearly defined. That said, I know this patch already helped someone on IRC and the tests output look reasonable. - This is a new version of the original "convert: filemap must preserve fast-forward merges" patch. It has exactly the same output for 2 parents merges, the additional complexity is here to handle more than two parents.
author Patrick Mezard <patrick@mezard.eu>
date Mon, 18 Jun 2012 18:19:28 +0200
parents f2719b387380
children 4cdec37f0018
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
1 $ hg init a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
2 $ cd a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
3 $ hg init b
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
4 $ echo x > b/x
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
5
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
6 Should print nothing:
2061
5987c1eac2ce support nested repositories.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
8 $ hg add b
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
9 $ hg st
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
10
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
11 Should fail:
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2982
diff changeset
12
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
13 $ hg st b/x
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13910
diff changeset
14 abort: path 'b/x' is inside nested repo 'b' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
15 [255]
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
16 $ hg add b/x
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13910
diff changeset
17 abort: path 'b/x' is inside nested repo 'b' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
18 [255]
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2982
diff changeset
19
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
20 Should fail:
2061
5987c1eac2ce support nested repositories.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
21
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
22 $ hg add b b/x
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13910
diff changeset
23 abort: path 'b/x' is inside nested repo 'b' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
24 [255]
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
25 $ hg st
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
26
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
27 Should arguably print nothing:
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
28
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
29 $ hg st b
5200
c7e8fe11f34a path_auditor: cache names of audited directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5158
diff changeset
30
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
31 $ echo a > a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
32 $ hg ci -Ama a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
33
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
34 Should fail:
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2982
diff changeset
35
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
36 $ hg mv a b
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13910
diff changeset
37 abort: path 'b/a' is inside nested repo 'b' (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
38 [255]
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5200
diff changeset
39 $ hg st
5158
d316124ebbea Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents: 2982
diff changeset
40
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
41 $ cd ..