author | Augie Fackler <augie@google.com> |
Thu, 15 Aug 2019 14:54:39 -0400 | |
changeset 42767 | 624d86262e14 |
parent 42621 | 99ebde4fec99 |
child 45906 | 95c4cca641f6 |
permissions | -rw-r--r-- |
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
1 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
2 |
$ HGMERGE=true; export HGMERGE |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
3 |
$ echo '[extensions]' >> $HGRCPATH |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
4 |
$ echo 'convert =' >> $HGRCPATH |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
5 |
$ glog() |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
6 |
> { |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19863
diff
changeset
|
7 |
> hg log -G --template '{rev} "{desc}" files: {files}\n' "$@" |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
8 |
> } |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
9 |
$ hg init source |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
10 |
$ cd source |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
11 |
$ echo foo > foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
12 |
$ echo baz > baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
13 |
$ mkdir -p dir/subdir |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
14 |
$ echo dir/file >> dir/file |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
15 |
$ echo dir/file2 >> dir/file2 |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
16 |
$ echo dir/file3 >> dir/file3 # to be corrupted in rev 0 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
17 |
$ echo dir/subdir/file3 >> dir/subdir/file3 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
18 |
$ echo dir/subdir/file4 >> dir/subdir/file4 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
19 |
$ hg ci -d '0 0' -qAm '0: add foo baz dir/' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
20 |
$ echo bar > bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
21 |
$ echo quux > quux |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
22 |
$ echo dir/file4 >> dir/file4 # to be corrupted in rev 1 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
23 |
$ hg copy foo copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
24 |
$ hg ci -d '1 0' -qAm '1: add bar quux; copy foo to copied' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
25 |
$ echo >> foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
26 |
$ hg ci -d '2 0' -m '2: change foo' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
27 |
$ hg up -qC 1 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
28 |
$ echo >> bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
29 |
$ echo >> quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
30 |
$ hg ci -d '3 0' -m '3: change bar quux' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
31 |
created new head |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
32 |
$ hg up -qC 2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
33 |
$ hg merge -qr 3 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
34 |
$ echo >> bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
35 |
$ echo >> baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
36 |
$ hg ci -d '4 0' -m '4: first merge; change bar baz' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
37 |
$ echo >> bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
38 |
$ echo 1 >> baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
39 |
$ echo >> quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
40 |
$ hg ci -d '5 0' -m '5: change bar baz quux' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
41 |
$ hg up -qC 4 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
42 |
$ echo >> foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
43 |
$ echo 2 >> baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
44 |
$ hg ci -d '6 0' -m '6: change foo baz' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
45 |
created new head |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
46 |
$ hg up -qC 5 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
47 |
$ hg merge -qr 6 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
48 |
$ echo >> bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
49 |
$ hg ci -d '7 0' -m '7: second merge; change bar' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
50 |
$ echo >> foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
51 |
$ hg ci -m '8: change foo' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
52 |
$ glog |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
53 |
@ 8 "8: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
54 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
55 |
o 7 "7: second merge; change bar" files: bar baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
56 |
|\ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
57 |
| o 6 "6: change foo baz" files: baz foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
58 |
| | |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
59 |
o | 5 "5: change bar baz quux" files: bar baz quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
60 |
|/ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
61 |
o 4 "4: first merge; change bar baz" files: bar baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
62 |
|\ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
63 |
| o 3 "3: change bar quux" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
64 |
| | |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
65 |
o | 2 "2: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
66 |
|/ |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
67 |
o 1 "1: add bar quux; copy foo to copied" files: bar copied dir/file4 quux |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
68 |
| |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
69 |
o 0 "0: add foo baz dir/" files: baz dir/file dir/file2 dir/file3 dir/subdir/file3 dir/subdir/file4 foo |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
70 |
|
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
71 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
72 |
final file versions in this repo: |
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
73 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
74 |
$ hg manifest --debug |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
75 |
9463f52fe115e377cf2878d4fc548117211063f2 644 bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
76 |
94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
77 |
7711d36246cc83e61fb29cd6d4ef394c63f1ceaf 644 copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
78 |
3e20847584beff41d7cd16136b7331ab3d754be0 644 dir/file |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
79 |
75e6d3f8328f5f6ace6bf10b98df793416a09dca 644 dir/file2 |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
80 |
e96dce0bc6a217656a3a410e5e6bec2c4f42bf7c 644 dir/file3 |
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
81 |
6edd55f559cdce67132b12ca09e09cee08b60442 644 dir/file4 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
82 |
5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir/subdir/file3 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
83 |
57a1c1511590f3de52874adfa04effe8a77d64af 644 dir/subdir/file4 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
84 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
85 |
bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
86 |
$ hg debugrename copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
87 |
copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
15243
1e9451476bf8
tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents:
14151
diff
changeset
|
88 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
89 |
$ cd .. |
19862
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
90 |
|
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
91 |
|
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
92 |
Test interaction with startrev and verify that changing it is handled properly: |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
93 |
|
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
94 |
$ > empty |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
95 |
$ hg convert --filemap empty source movingstart --config convert.hg.startrev=3 -r4 |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
96 |
initializing destination movingstart repository |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
97 |
scanning source... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
98 |
sorting... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
99 |
converting... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
100 |
1 3: change bar quux |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
101 |
0 4: first merge; change bar baz |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
102 |
$ hg convert --filemap empty source movingstart |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
103 |
scanning source... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
104 |
sorting... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
105 |
converting... |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
106 |
3 5: change bar baz quux |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
107 |
2 6: change foo baz |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
108 |
1 7: second merge; change bar |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
109 |
warning: af455ce4166b3c9c88e6309c2b9332171dcea595 parent 61e22ca76c3b3e93df20338c4e02ce286898e825 is missing |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
110 |
warning: cf908b3eeedc301c9272ebae931da966d5b326c7 parent 59e1ab45c888289513b7354484dac8a88217beab is missing |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
111 |
0 8: change foo |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
112 |
|
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
113 |
|
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
114 |
splitrepo tests |
42455ebbab9f
convert: fix crash when filemap filtering is changed
Mads Kiilerich <madski@unity3d.com>
parents:
17852
diff
changeset
|
115 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
116 |
$ splitrepo() |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
117 |
> { |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
118 |
> msg="$1" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
119 |
> files="$2" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
120 |
> opts=$3 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
121 |
> echo "% $files: $msg" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
122 |
> prefix=`echo "$files" | sed -e 's/ /-/g'` |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
123 |
> fmap="$prefix.fmap" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
124 |
> repo="$prefix.repo" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
125 |
> for i in $files; do |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12529
diff
changeset
|
126 |
> echo "include $i" >> "$fmap" |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
127 |
> done |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
128 |
> hg -q convert $opts --filemap "$fmap" --datesort source "$repo" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
129 |
> hg up -q -R "$repo" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
130 |
> glog -R "$repo" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
131 |
> hg -R "$repo" manifest --debug |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
132 |
> } |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
133 |
$ splitrepo 'skip unwanted merges; use 1st parent in 1st merge, 2nd in 2nd' foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
134 |
% foo: skip unwanted merges; use 1st parent in 1st merge, 2nd in 2nd |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
135 |
@ 3 "8: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
136 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
137 |
o 2 "6: change foo baz" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
138 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
139 |
o 1 "2: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
140 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
141 |
o 0 "0: add foo baz dir/" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
142 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
143 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
144 |
$ splitrepo 'merges are not merges anymore' bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
145 |
% bar: merges are not merges anymore |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
146 |
@ 4 "7: second merge; change bar" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
147 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
148 |
o 3 "5: change bar baz quux" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
149 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
150 |
o 2 "4: first merge; change bar baz" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
151 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
152 |
o 1 "3: change bar quux" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
153 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
154 |
o 0 "1: add bar quux; copy foo to copied" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
155 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
156 |
9463f52fe115e377cf2878d4fc548117211063f2 644 bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
157 |
$ splitrepo '1st merge is not a merge anymore; 2nd still is' baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
158 |
% baz: 1st merge is not a merge anymore; 2nd still is |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
159 |
@ 4 "7: second merge; change bar" files: baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
160 |
|\ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
161 |
| o 3 "6: change foo baz" files: baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
162 |
| | |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
163 |
o | 2 "5: change bar baz quux" files: baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
164 |
|/ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
165 |
o 1 "4: first merge; change bar baz" files: baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
166 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
167 |
o 0 "0: add foo baz dir/" files: baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
168 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
169 |
94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
170 |
$ splitrepo 'we add additional merges when they are interesting' 'foo quux' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
171 |
% foo quux: we add additional merges when they are interesting |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
172 |
@ 8 "8: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
173 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
174 |
o 7 "7: second merge; change bar" files: |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
175 |
|\ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
176 |
| o 6 "6: change foo baz" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
177 |
| | |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
178 |
o | 5 "5: change bar baz quux" files: quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
179 |
|/ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
180 |
o 4 "4: first merge; change bar baz" files: |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
181 |
|\ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
182 |
| o 3 "3: change bar quux" files: quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
183 |
| | |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
184 |
o | 2 "2: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
185 |
|/ |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
186 |
o 1 "1: add bar quux; copy foo to copied" files: quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
187 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
188 |
o 0 "0: add foo baz dir/" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
189 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
190 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
191 |
bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
192 |
$ splitrepo 'partial conversion' 'bar quux' '-r 3' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
193 |
% bar quux: partial conversion |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
194 |
@ 1 "3: change bar quux" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
195 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
196 |
o 0 "1: add bar quux; copy foo to copied" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
197 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
198 |
b79105bedc55102f394e90a789c9c380117c1b4a 644 bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
199 |
db0421cc6b685a458c8d86c7d5c004f94429ea23 644 quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
200 |
$ splitrepo 'complete the partial conversion' 'bar quux' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
201 |
% bar quux: complete the partial conversion |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
202 |
@ 4 "7: second merge; change bar" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
203 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
204 |
o 3 "5: change bar baz quux" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
205 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
206 |
o 2 "4: first merge; change bar baz" files: bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
207 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
208 |
o 1 "3: change bar quux" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
209 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
210 |
o 0 "1: add bar quux; copy foo to copied" files: bar quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
211 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
212 |
9463f52fe115e377cf2878d4fc548117211063f2 644 bar |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
213 |
bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
214 |
$ rm -r foo.repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
215 |
$ splitrepo 'partial conversion' 'foo' '-r 3' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
216 |
% foo: partial conversion |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
217 |
@ 0 "0: add foo baz dir/" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
218 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
219 |
2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
220 |
$ splitrepo 'complete the partial conversion' 'foo' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
221 |
% foo: complete the partial conversion |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
222 |
@ 3 "8: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
223 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
224 |
o 2 "6: change foo baz" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
225 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
226 |
o 1 "2: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
227 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
228 |
o 0 "0: add foo baz dir/" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
229 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
230 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
231 |
$ splitrepo 'copied file; source not included in new repo' copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
232 |
% copied: copied file; source not included in new repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
233 |
@ 0 "1: add bar quux; copy foo to copied" files: copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
234 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
235 |
2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
236 |
$ hg --cwd copied.repo debugrename copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
237 |
copied not renamed |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
238 |
$ splitrepo 'copied file; source included in new repo' 'foo copied' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
239 |
% foo copied: copied file; source included in new repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
240 |
@ 4 "8: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
241 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
242 |
o 3 "6: change foo baz" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
243 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
244 |
o 2 "2: change foo" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
245 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
246 |
o 1 "1: add bar quux; copy foo to copied" files: copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
247 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
248 |
o 0 "0: add foo baz dir/" files: foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
249 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
250 |
7711d36246cc83e61fb29cd6d4ef394c63f1ceaf 644 copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
251 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
252 |
$ hg --cwd foo-copied.repo debugrename copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
253 |
copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
17851
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
254 |
|
21054
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
255 |
verify the top level 'include .' if there is no other includes: |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
256 |
|
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
257 |
$ echo "exclude something" > default.fmap |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
258 |
$ hg convert -q --filemap default.fmap -r1 source dummydest2 |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
259 |
$ hg -R dummydest2 log --template '{rev} {node|short} {desc|firstline}\n' |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
260 |
1 61e22ca76c3b 1: add bar quux; copy foo to copied |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
261 |
0 c085cf2ee7fe 0: add foo baz dir/ |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
262 |
|
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
263 |
$ echo "include somethingelse" >> default.fmap |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
264 |
$ hg convert -q --filemap default.fmap -r1 source dummydest3 |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
265 |
$ hg -R dummydest3 log --template '{rev} {node|short} {desc|firstline}\n' |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
266 |
|
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
267 |
$ echo "include ." >> default.fmap |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
268 |
$ hg convert -q --filemap default.fmap -r1 source dummydest4 |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
269 |
$ hg -R dummydest4 log --template '{rev} {node|short} {desc|firstline}\n' |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
270 |
1 61e22ca76c3b 1: add bar quux; copy foo to copied |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
271 |
0 c085cf2ee7fe 0: add foo baz dir/ |
fffa9f17c3ef
tests: coverage of convert and filemap include and the default of include all
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
272 |
|
17851
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
273 |
ensure that the filemap contains duplicated slashes (issue3612) |
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
274 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
275 |
$ cat > renames.fmap <<EOF |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
276 |
> include dir |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
277 |
> exclude dir/file2 |
17851
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
278 |
> rename dir dir2//dir3 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
279 |
> include foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
280 |
> include copied |
17797
e4da793998bf
convert: normalize paths in filemaps (issue3612)
Huayang <huayang@fb.com>
parents:
17175
diff
changeset
|
281 |
> rename foo foo2/ |
e4da793998bf
convert: normalize paths in filemaps (issue3612)
Huayang <huayang@fb.com>
parents:
17175
diff
changeset
|
282 |
> rename copied ./copied2 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
283 |
> exclude dir/subdir |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
284 |
> include dir/subdir/file3 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
285 |
> EOF |
37420
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
286 |
#if reporevlogstore |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
287 |
$ rm source/.hg/store/data/dir/file3.i |
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
288 |
$ rm source/.hg/store/data/dir/file4.i |
37420
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
289 |
#endif |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
290 |
#if reposimplestore |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
291 |
$ rm -rf source/.hg/store/data/dir/file3 |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
292 |
$ rm -rf source/.hg/store/data/dir/file4 |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
293 |
#endif |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
294 |
$ hg -q convert --filemap renames.fmap --datesort source dummydest |
37420
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
295 |
abort: data/dir/file3.i@e96dce0bc6a2: no match found! (reporevlogstore !) |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
296 |
abort: data/dir/file3/index@e96dce0bc6a2: no node! (reposimplestore !) |
14151
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
297 |
[255] |
1fe82c93b8e2
convert: also catch missing revlogs when introduced in repo roots
Mads Kiilerich <mads@kiilerich.com>
parents:
13968
diff
changeset
|
298 |
$ hg -q convert --filemap renames.fmap --datesort --config convert.hg.ignoreerrors=1 source renames.repo |
37420
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
299 |
ignoring: data/dir/file3.i@e96dce0bc6a2: no match found (reporevlogstore !) |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
300 |
ignoring: data/dir/file4.i@6edd55f559cd: no match found (reporevlogstore !) |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
301 |
ignoring: data/dir/file3/index@e96dce0bc6a2: no node (reposimplestore !) |
84e7d2d8c098
tests: port test-convert-filemap.t to simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
302 |
ignoring: data/dir/file4/index@6edd55f559cd: no node (reposimplestore !) |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
303 |
$ hg up -q -R renames.repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
304 |
$ glog -R renames.repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
305 |
@ 4 "8: change foo" files: foo2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
306 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
307 |
o 3 "6: change foo baz" files: foo2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
308 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
309 |
o 2 "2: change foo" files: foo2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
310 |
| |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
311 |
o 1 "1: add bar quux; copy foo to copied" files: copied2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
312 |
| |
17852 | 313 |
o 0 "0: add foo baz dir/" files: dir2/dir3/file dir2/dir3/subdir/file3 foo2 |
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
314 |
|
17851
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
315 |
$ hg -R renames.repo verify |
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
316 |
checking changesets |
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
317 |
checking manifests |
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
318 |
crosschecking files in changesets and manifests |
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
319 |
checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39111
diff
changeset
|
320 |
checked 5 changesets with 7 changes to 4 files |
17851
7aa7380691b8
verify: tolerate repeated slashes in a converted repo (issue3665)
Bryan O'Sullivan <bryano@fb.com>
parents:
17175
diff
changeset
|
321 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
322 |
$ hg -R renames.repo manifest --debug |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
323 |
d43feacba7a4f1f2080dde4a4b985bd8a0236d46 644 copied2 |
17852 | 324 |
3e20847584beff41d7cd16136b7331ab3d754be0 644 dir2/dir3/file |
325 |
5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir2/dir3/subdir/file3 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
326 |
9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
327 |
$ hg --cwd renames.repo debugrename copied2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
328 |
copied2 renamed from foo2:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
329 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
330 |
copied: |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
331 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
332 |
$ hg --cwd source cat copied |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
333 |
foo |
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
334 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
335 |
copied2: |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
336 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
337 |
$ hg --cwd renames.repo cat copied2 |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
338 |
foo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
339 |
|
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
340 |
filemap errors |
5379
d3e51dc804f8
mercurial_source: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
341 |
|
12529
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
342 |
$ cat > errors.fmap <<EOF |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
343 |
> include dir/ # beware that comments changes error line numbers! |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
344 |
> exclude /dir |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
345 |
> rename dir//dir /dir//dir/ "out of sync" |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
346 |
> include |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
347 |
> EOF |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
348 |
$ hg -q convert --filemap errors.fmap source errors.repo |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
349 |
errors.fmap:3: superfluous / in include '/dir' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
350 |
errors.fmap:3: superfluous / in rename '/dir' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
351 |
errors.fmap:4: unknown directive 'out of sync' |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
352 |
errors.fmap:5: path to exclude is missing |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
353 |
abort: errors in filemap |
00e7a7fdae7d
tests: unify test-convert-filemap
Matt Mackall <mpm@selenic.com>
parents:
11680
diff
changeset
|
354 |
[255] |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
355 |
|
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
356 |
test branch closing revision pruning if branch is pruned |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
357 |
|
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
358 |
$ hg init branchpruning |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
359 |
$ cd branchpruning |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
360 |
$ hg branch foo |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
361 |
marked working directory as branch foo |
15615 | 362 |
(branches are permanent and global, did you want a bookmark?) |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
363 |
$ echo a > a |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
364 |
$ hg ci -Am adda |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
365 |
adding a |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
366 |
$ hg ci --close-branch -m closefoo |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
367 |
$ hg up 0 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
368 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
369 |
$ hg branch empty |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
370 |
marked working directory as branch empty |
15615 | 371 |
(branches are permanent and global, did you want a bookmark?) |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
372 |
$ hg ci -m emptybranch |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
373 |
$ hg ci --close-branch -m closeempty |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
374 |
$ hg up 0 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
375 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
376 |
$ hg branch default |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
377 |
marked working directory as branch default |
15615 | 378 |
(branches are permanent and global, did you want a bookmark?) |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
379 |
$ echo b > b |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
380 |
$ hg ci -Am addb |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
381 |
adding b |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
382 |
$ hg ci --close-branch -m closedefault |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
383 |
$ cat > filemap <<EOF |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
384 |
> include b |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
385 |
> EOF |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
386 |
$ cd .. |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
387 |
$ hg convert branchpruning branchpruning-hg1 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
388 |
initializing destination branchpruning-hg1 repository |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
389 |
scanning source... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
390 |
sorting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
391 |
converting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
392 |
5 adda |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
393 |
4 closefoo |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
394 |
3 emptybranch |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
395 |
2 closeempty |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
396 |
1 addb |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
397 |
0 closedefault |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
398 |
$ glog -R branchpruning-hg1 |
24216
4bb348ae43cb
log: display closing-branch nodes as "_" (BC)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
23835
diff
changeset
|
399 |
_ 5 "closedefault" files: |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
400 |
| |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
401 |
o 4 "addb" files: b |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
402 |
| |
24216
4bb348ae43cb
log: display closing-branch nodes as "_" (BC)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
23835
diff
changeset
|
403 |
| _ 3 "closeempty" files: |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
404 |
| | |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
405 |
| o 2 "emptybranch" files: |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
406 |
|/ |
24216
4bb348ae43cb
log: display closing-branch nodes as "_" (BC)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
23835
diff
changeset
|
407 |
| _ 1 "closefoo" files: |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
408 |
|/ |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
409 |
o 0 "adda" files: a |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
410 |
|
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
411 |
|
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
412 |
exercise incremental conversion at the same time |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
413 |
|
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
414 |
$ hg convert -r0 --filemap branchpruning/filemap branchpruning branchpruning-hg2 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
415 |
initializing destination branchpruning-hg2 repository |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
416 |
scanning source... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
417 |
sorting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
418 |
converting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
419 |
0 adda |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
420 |
$ hg convert -r4 --filemap branchpruning/filemap branchpruning branchpruning-hg2 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
421 |
scanning source... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
422 |
sorting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
423 |
converting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
424 |
0 addb |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
425 |
$ hg convert --filemap branchpruning/filemap branchpruning branchpruning-hg2 |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
426 |
scanning source... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
427 |
sorting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
428 |
converting... |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
429 |
3 closefoo |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
430 |
2 emptybranch |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
431 |
1 closeempty |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
432 |
0 closedefault |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
433 |
$ glog -R branchpruning-hg2 |
24216
4bb348ae43cb
log: display closing-branch nodes as "_" (BC)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
23835
diff
changeset
|
434 |
_ 1 "closedefault" files: |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
435 |
| |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
436 |
o 0 "addb" files: b |
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12743
diff
changeset
|
437 |
|
41180
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
438 |
Include directives dropped empty commits, but other directives don't |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
439 |
|
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
440 |
$ cat > branchpruning/exclude_filemap <<EOF |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
441 |
> exclude a |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
442 |
> EOF |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
443 |
$ hg convert --filemap branchpruning/exclude_filemap branchpruning branchpruning-hg-exclude |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
444 |
initializing destination branchpruning-hg-exclude repository |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
445 |
scanning source... |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
446 |
sorting... |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
447 |
converting... |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
448 |
5 adda |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
449 |
4 closefoo |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
450 |
3 emptybranch |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
451 |
2 closeempty |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
452 |
1 addb |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
453 |
0 closedefault |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
454 |
|
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
455 |
$ glog -R branchpruning-hg-exclude |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
456 |
_ 3 "closedefault" files: |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
457 |
| |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
458 |
o 2 "addb" files: b |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
459 |
|
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
460 |
_ 1 "closeempty" files: |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
461 |
| |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
462 |
o 0 "emptybranch" files: |
69804c040a04
convert: don't drop commits that are empty in the source when using --filemap
Matt Harbison <matt_harbison@yahoo.com>
parents:
41179
diff
changeset
|
463 |
|
17174
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
464 |
|
19863
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
465 |
Test rebuilding of map with unknown revisions in shamap - it used to crash |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
466 |
|
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
467 |
$ cd branchpruning |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
468 |
$ hg up -r 2 |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
469 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
470 |
$ hg merge 4 |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
471 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
472 |
(branch merge, don't forget to commit) |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
473 |
$ hg ci -m 'merging something' |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
474 |
$ cd .. |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
475 |
$ echo "53792d18237d2b64971fa571936869156655338d 6d955580116e82c4b029bd30f321323bae71a7f0" >> branchpruning-hg2/.hg/shamap |
25125
bd625cd4e5e7
progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24216
diff
changeset
|
476 |
$ hg convert --filemap branchpruning/filemap branchpruning branchpruning-hg2 --debug --config progress.debug=true |
19863
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
477 |
run hg source pre-conversion action |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
478 |
run hg sink pre-conversion action |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
479 |
scanning source... |
41179
77088fa862df
convert: add missing numcommits() override to hg sources
Matt Harbison <matt_harbison@yahoo.com>
parents:
39489
diff
changeset
|
480 |
scanning: 1/7 revisions (14.29%) |
19863
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
481 |
sorting... |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
482 |
converting... |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
483 |
0 merging something |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
484 |
source: 2503605b178fe50e8fbbb0e77b97939540aa8c87 |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
485 |
converting: 0/1 revisions (0.00%) |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
486 |
unknown revmap source: 53792d18237d2b64971fa571936869156655338d |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
487 |
run hg sink post-conversion action |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
488 |
run hg source post-conversion action |
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
489 |
|
daeab82fa644
convert: fix crash when existing converted revision didn't come from source
Mads Kiilerich <madski@unity3d.com>
parents:
19862
diff
changeset
|
490 |
|
17174
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
491 |
filemap rename undoing revision rename |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
492 |
|
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
493 |
$ hg init renameundo |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
494 |
$ cd renameundo |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
495 |
$ echo 1 > a |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
496 |
$ echo 1 > c |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
497 |
$ hg ci -qAm add |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
498 |
$ hg mv -q a b/a |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
499 |
$ hg mv -q c b/c |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
500 |
$ hg ci -qm rename |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
501 |
$ echo 2 > b/a |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
502 |
$ echo 2 > b/c |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
503 |
$ hg ci -qm modify |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
504 |
$ cd .. |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
505 |
|
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
506 |
$ echo "rename b ." > renameundo.fmap |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
507 |
$ hg convert --filemap renameundo.fmap renameundo renameundo2 |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
508 |
initializing destination renameundo2 repository |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
509 |
scanning source... |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
510 |
sorting... |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
511 |
converting... |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
512 |
2 add |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
513 |
1 rename |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
514 |
filtering out empty revision |
25571
1abfe639a70c
convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents:
25125
diff
changeset
|
515 |
repository tip rolled back to revision 0 (undo convert) |
17174
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
516 |
0 modify |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
517 |
$ glog -R renameundo2 |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
518 |
o 1 "modify" files: a c |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
519 |
| |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
520 |
o 0 "add" files: a c |
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
521 |
|
32b2e6d641e4
convert: make filemap renames consistently override revision renames
Wagner Bruna <wbruna@yahoo.com>
parents:
15615
diff
changeset
|
522 |
|
17175 | 523 |
|
17103
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
524 |
test merge parents/empty merges pruning |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
525 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
526 |
$ glog() |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
527 |
> { |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19863
diff
changeset
|
528 |
> hg log -G --template '{rev}:{node|short}@{branch} "{desc}" files: {files}\n' "$@" |
17103
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
529 |
> } |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
530 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
531 |
test anonymous branch pruning |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
532 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
533 |
$ hg init anonymousbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
534 |
$ cd anonymousbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
535 |
$ echo a > a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
536 |
$ echo b > b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
537 |
$ hg ci -Am add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
538 |
adding a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
539 |
adding b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
540 |
$ echo a >> a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
541 |
$ hg ci -m changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
542 |
$ hg up 0 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
543 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
544 |
$ echo b >> b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
545 |
$ hg ci -m changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
546 |
created new head |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
547 |
$ hg up 1 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
548 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
549 |
$ hg merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
550 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
551 |
(branch merge, don't forget to commit) |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
552 |
$ hg ci -m merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
553 |
$ cd .. |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
554 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
555 |
$ cat > filemap <<EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
556 |
> include a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
557 |
> EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
558 |
$ hg convert --filemap filemap anonymousbranch anonymousbranch-hg |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
559 |
initializing destination anonymousbranch-hg repository |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
560 |
scanning source... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
561 |
sorting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
562 |
converting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
563 |
3 add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
564 |
2 changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
565 |
1 changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
566 |
0 merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
567 |
$ glog -R anonymousbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
568 |
@ 3:c71d5201a498@default "merge" files: |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
569 |
|\ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
570 |
| o 2:607eb44b17f9@default "changeb" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
571 |
| | |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
572 |
o | 1:1f60ea617824@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
573 |
|/ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
574 |
o 0:0146e6129113@default "add" files: a b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
575 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
576 |
$ glog -R anonymousbranch-hg |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
577 |
o 1:cda818e7219b@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
578 |
| |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
579 |
o 0:c334dc3be0da@default "add" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
580 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
581 |
$ cat anonymousbranch-hg/.hg/shamap |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
582 |
0146e6129113dba9ac90207cfdf2d7ed35257ae5 c334dc3be0daa2a4e9ce4d2e2bdcba40c09d4916 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
583 |
1f60ea61782421edf8d051ff4fcb61b330f26a4a cda818e7219b5f7f3fb9f49780054ed6a1905ec3 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
584 |
607eb44b17f9348cd5cbd26e16af87ba77b0b037 c334dc3be0daa2a4e9ce4d2e2bdcba40c09d4916 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
585 |
c71d5201a498b2658d105a6bf69d7a0df2649aea cda818e7219b5f7f3fb9f49780054ed6a1905ec3 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
586 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
587 |
$ cat > filemap <<EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
588 |
> include b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
589 |
> EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
590 |
$ hg convert --filemap filemap anonymousbranch anonymousbranch-hg2 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
591 |
initializing destination anonymousbranch-hg2 repository |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
592 |
scanning source... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
593 |
sorting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
594 |
converting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
595 |
3 add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
596 |
2 changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
597 |
1 changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
598 |
0 merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
599 |
$ glog -R anonymousbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
600 |
@ 3:c71d5201a498@default "merge" files: |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
601 |
|\ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
602 |
| o 2:607eb44b17f9@default "changeb" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
603 |
| | |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
604 |
o | 1:1f60ea617824@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
605 |
|/ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
606 |
o 0:0146e6129113@default "add" files: a b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
607 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
608 |
$ glog -R anonymousbranch-hg2 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
609 |
o 1:62dd350b0df6@default "changeb" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
610 |
| |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
611 |
o 0:4b9ced861657@default "add" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
612 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
613 |
$ cat anonymousbranch-hg2/.hg/shamap |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
614 |
0146e6129113dba9ac90207cfdf2d7ed35257ae5 4b9ced86165703791653059a1db6ed864630a523 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
615 |
1f60ea61782421edf8d051ff4fcb61b330f26a4a 4b9ced86165703791653059a1db6ed864630a523 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
616 |
607eb44b17f9348cd5cbd26e16af87ba77b0b037 62dd350b0df695f7d2c82a02e0499b16fd790f22 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
617 |
c71d5201a498b2658d105a6bf69d7a0df2649aea 62dd350b0df695f7d2c82a02e0499b16fd790f22 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
618 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
619 |
test named branch pruning |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
620 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
621 |
$ hg init namedbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
622 |
$ cd namedbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
623 |
$ echo a > a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
624 |
$ echo b > b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
625 |
$ hg ci -Am add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
626 |
adding a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
627 |
adding b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
628 |
$ echo a >> a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
629 |
$ hg ci -m changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
630 |
$ hg up 0 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
631 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
632 |
$ hg branch foo |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
633 |
marked working directory as branch foo |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
634 |
(branches are permanent and global, did you want a bookmark?) |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
635 |
$ echo b >> b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
636 |
$ hg ci -m changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
637 |
$ hg up default |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
638 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
639 |
$ hg merge foo |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
640 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
641 |
(branch merge, don't forget to commit) |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
642 |
$ hg ci -m merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
643 |
$ cd .. |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
644 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
645 |
$ cat > filemap <<EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
646 |
> include a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
647 |
> EOF |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
648 |
$ hg convert --filemap filemap namedbranch namedbranch-hg |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
649 |
initializing destination namedbranch-hg repository |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
650 |
scanning source... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
651 |
sorting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
652 |
converting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
653 |
3 add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
654 |
2 changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
655 |
1 changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
656 |
0 merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
657 |
$ glog -R namedbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
658 |
@ 3:73899bcbe45c@default "merge" files: |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
659 |
|\ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
660 |
| o 2:8097982d19fc@foo "changeb" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
661 |
| | |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
662 |
o | 1:1f60ea617824@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
663 |
|/ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
664 |
o 0:0146e6129113@default "add" files: a b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
665 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
666 |
$ glog -R namedbranch-hg |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
667 |
o 1:cda818e7219b@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
668 |
| |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
669 |
o 0:c334dc3be0da@default "add" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
670 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
671 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
672 |
$ cd namedbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
673 |
$ hg --config extensions.mq= strip tip |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
674 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
26844
diff
changeset
|
675 |
saved backup bundle to $TESTTMP/namedbranch/.hg/strip-backup/73899bcbe45c-92adf160-backup.hg |
17103
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
676 |
$ hg up foo |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
677 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
678 |
$ hg merge default |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
679 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
680 |
(branch merge, don't forget to commit) |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
681 |
$ hg ci -m merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
682 |
$ cd .. |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
683 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
684 |
$ hg convert --filemap filemap namedbranch namedbranch-hg2 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
685 |
initializing destination namedbranch-hg2 repository |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
686 |
scanning source... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
687 |
sorting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
688 |
converting... |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
689 |
3 add |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
690 |
2 changea |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
691 |
1 changeb |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
692 |
0 merge |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
693 |
$ glog -R namedbranch |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
694 |
@ 3:e1959de76e1b@foo "merge" files: |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
695 |
|\ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
696 |
| o 2:8097982d19fc@foo "changeb" files: b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
697 |
| | |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
698 |
o | 1:1f60ea617824@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
699 |
|/ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
700 |
o 0:0146e6129113@default "add" files: a b |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
701 |
|
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
702 |
$ glog -R namedbranch-hg2 |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
703 |
o 2:dcf314454667@foo "merge" files: |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
704 |
|\ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
705 |
| o 1:cda818e7219b@default "changea" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
706 |
|/ |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
707 |
o 0:c334dc3be0da@default "add" files: a |
5146de7bce96
convert: keep branch switching merges with ancestors (issue3340)
Patrick Mezard <patrick@mezard.eu>
parents:
15615
diff
changeset
|
708 |
|
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
709 |
$ cd .. |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
710 |
|
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
711 |
test converting merges into a repo that contains other files |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
712 |
|
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
713 |
$ hg init merge-test1 |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
714 |
$ cd merge-test1 |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
715 |
$ touch a && hg commit -Aqm 'add a' |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
716 |
$ echo a > a && hg commit -Aqm 'edit a' |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
717 |
$ hg up -q 0 |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
718 |
$ touch b && hg commit -Aqm 'add b' |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
719 |
$ hg merge -q 1 && hg commit -qm 'merge a & b' |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
720 |
|
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
721 |
$ cd .. |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
722 |
$ hg init merge-test2 |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
723 |
$ cd merge-test2 |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
724 |
$ mkdir converted |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
725 |
$ touch converted/a toberemoved && hg commit -Aqm 'add converted/a & toberemoved' |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
726 |
$ touch x && rm toberemoved && hg commit -Aqm 'add x & remove tobremoved' |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
727 |
$ cd .. |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
728 |
$ hg log -G -T '{shortest(node)} {desc}' -R merge-test1 |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
729 |
@ 1191 merge a & b |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
730 |
|\ |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
731 |
| o 9077 add b |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
732 |
| | |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
733 |
o | d19f edit a |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
734 |
|/ |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
735 |
o ac82 add a |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
736 |
|
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
737 |
$ hg log -G -T '{shortest(node)} {desc}' -R merge-test2 |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
738 |
@ 150e add x & remove tobremoved |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
739 |
| |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
740 |
o bbac add converted/a & toberemoved |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
741 |
|
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
742 |
- Build a shamap where the target converted/a is in on top of an unrelated |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
743 |
- change to 'x'. This simulates using convert to merge several repositories |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
744 |
- together. |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
745 |
$ cat >> merge-test2/.hg/shamap <<EOF |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
746 |
> $(hg -R merge-test1 log -r 0 -T '{node}') $(hg -R merge-test2 log -r 0 -T '{node}') |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
747 |
> $(hg -R merge-test1 log -r 1 -T '{node}') $(hg -R merge-test2 log -r 1 -T '{node}') |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
748 |
> EOF |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
749 |
$ cat >> merge-test-filemap <<EOF |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
750 |
> rename . converted/ |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
751 |
> EOF |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
752 |
$ hg convert --filemap merge-test-filemap merge-test1 merge-test2 --traceback |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
753 |
scanning source... |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
754 |
sorting... |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
755 |
converting... |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
756 |
1 add b |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
757 |
0 merge a & b |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
758 |
$ hg -R merge-test2 manifest -r tip |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
759 |
converted/a |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
760 |
converted/b |
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
761 |
x |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
762 |
$ hg -R merge-test2 log -G -T '{shortest(node)} {desc}\n{files % "- {file}\n"}\n' |
42621
99ebde4fec99
commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41180
diff
changeset
|
763 |
o e2ff merge a & b |
26078
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
764 |
|\ - converted/a |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
765 |
| | |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
766 |
| o 2995 add b |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
767 |
| | - converted/b |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
768 |
| | |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
769 |
@ | 150e add x & remove tobremoved |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
770 |
|/ - toberemoved |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
771 |
| - x |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
772 |
| |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
773 |
o bbac add converted/a & toberemoved |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
774 |
- converted/a |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
775 |
- toberemoved |
5ca587348875
convert: fix syncing deletes from p2 merge commit
Durham Goode <durham@fb.com>
parents:
26037
diff
changeset
|
776 |
|
26844
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
777 |
$ cd .. |
26037
a75d24539aba
convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com>
parents:
25571
diff
changeset
|
778 |
|
26844
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
779 |
Test case where cleanp2 contains a file that doesn't exist in p2 - for |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
780 |
example because filemap changed. |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
781 |
|
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
782 |
$ hg init cleanp2 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
783 |
$ cd cleanp2 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
784 |
$ touch f f1 f2 && hg ci -Aqm '0' |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
785 |
$ echo f1 > f1 && echo >> f && hg ci -m '1' |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
786 |
$ hg up -qr0 && echo f2 > f2 && echo >> f && hg ci -qm '2' |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
787 |
$ echo "include f" > filemap |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
788 |
$ hg convert --filemap filemap . |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
789 |
assuming destination .-hg |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
790 |
initializing destination .-hg repository |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
791 |
scanning source... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
792 |
sorting... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
793 |
converting... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
794 |
2 0 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
795 |
1 1 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
796 |
0 2 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
797 |
$ hg merge && hg ci -qm '3' |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
798 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
799 |
(branch merge, don't forget to commit) |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
800 |
$ echo "include ." > filemap |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
801 |
$ hg convert --filemap filemap . |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
802 |
assuming destination .-hg |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
803 |
scanning source... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
804 |
sorting... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
805 |
converting... |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
806 |
0 3 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
807 |
$ hg -R .-hg log -G -T '{shortest(node)} {desc}\n{files % "- {file}\n"}\n' |
39111
46da52f4b820
commit: try hard to reuse p1 manifest if nothing changed
Yuya Nishihara <yuya@tcha.org>
parents:
37420
diff
changeset
|
808 |
o bbfe 3 |
26844
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
809 |
|\ |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
810 |
| o 33a0 2 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
811 |
| | - f |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
812 |
| | |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
813 |
o | f73e 1 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
814 |
|/ - f |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
815 |
| |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
816 |
o d681 0 |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
817 |
- f |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
818 |
|
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
819 |
$ hg -R .-hg mani -r tip |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
820 |
f |
e24eee55c129
convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com>
parents:
26078
diff
changeset
|
821 |
$ cd .. |