author | Jason R. Coombs <jaraco@jaraco.com> |
Wed, 07 Sep 2022 14:56:45 -0400 | |
changeset 49493 | 4367c46a89ee |
parent 47155 | 96ee8ca99f5a |
child 49534 | 92892dff03f3 |
permissions | -rw-r--r-- |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
1 |
$ cat >> $HGRCPATH <<EOF |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
2 |
> [extensions] |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
3 |
> convert= |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
4 |
> [convert] |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
5 |
> hg.saverev=False |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
6 |
> EOF |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
7 |
$ hg init orig |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
8 |
$ cd orig |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
9 |
$ echo foo > foo |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
10 |
$ echo bar > bar |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
11 |
$ hg ci -qAm 'add foo bar' -d '0 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
12 |
$ echo >> foo |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
13 |
$ hg ci -m 'change foo' -d '1 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
14 |
$ hg up -qC 0 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
15 |
$ hg copy --after --force foo bar |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
16 |
$ hg copy foo baz |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
17 |
$ hg ci -m 'make bar and baz copies of foo' -d '2 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
18 |
created new head |
23167
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
19 |
|
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
20 |
Test that template can print all file copies (issue4362) |
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
21 |
$ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}" |
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
22 |
File: bar (foo) |
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
23 |
File: baz (foo) |
a3c2d9211294
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21404
diff
changeset
|
24 |
|
13866
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
25 |
$ hg bookmark premerge1 |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
15442
diff
changeset
|
26 |
$ hg merge -r 1 |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
27 |
merging baz and foo to baz |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
28 |
1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
29 |
(branch merge, don't forget to commit) |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
30 |
$ hg ci -m 'merge local copy' -d '3 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
31 |
$ hg up -C 1 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
32 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
16899
diff
changeset
|
33 |
(leaving bookmark premerge1) |
13866
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
34 |
$ hg bookmark premerge2 |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
35 |
$ hg merge 2 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
36 |
merging foo and baz to baz |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
37 |
1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
38 |
(branch merge, don't forget to commit) |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
39 |
$ hg ci -m 'merge remote copy' -d '4 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
40 |
created new head |
25305
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
41 |
|
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
42 |
Make and delete some tags |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
43 |
|
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
44 |
$ hg tag that |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
45 |
$ hg tag --remove that |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
46 |
$ hg tag this |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
47 |
|
16899
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
48 |
#if execbit |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
49 |
$ chmod +x baz |
16899
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
50 |
#else |
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
51 |
$ echo some other change to make sure we get a rev 5 > baz |
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
52 |
#endif |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
53 |
$ hg ci -m 'mark baz executable' -d '5 0' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
54 |
$ cd .. |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
55 |
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
56 |
initializing destination new repository |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
57 |
scanning source... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
58 |
sorting... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
59 |
converting... |
25305
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
60 |
8 add foo bar |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
61 |
7 change foo |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
62 |
6 make bar and baz copies of foo |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
63 |
5 merge local copy |
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
64 |
4 merge remote copy |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
65 |
3 Added tag that for changeset 8601262d7472 |
25305
884ef09cf658
convert: properly pass null ids through .hgtags (issue4678)
Matt Mackall <mpm@selenic.com>
parents:
23167
diff
changeset
|
66 |
2 Removed tag that |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
67 |
1 Added tag this for changeset 706614b458c1 |
13968
82845434e974
convert: make filemap prune useless branch closing revs (issue2774)
Patrick Mezard <pmezard@gmail.com>
parents:
12526
diff
changeset
|
68 |
0 mark baz executable |
13866
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
69 |
updating bookmarks |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
70 |
$ cd new |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
71 |
$ hg out ../orig |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
72 |
comparing with ../orig |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
73 |
searching for changes |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
74 |
no changes found |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
75 |
[1] |
16899
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
76 |
#if execbit |
13866
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
77 |
$ hg bookmarks |
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
78 |
premerge1 3:973ef48a98a4 |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
79 |
premerge2 8:c4968fdf2e5d |
16899
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
80 |
#else |
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
81 |
Different hash because no x bit |
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
82 |
$ hg bookmarks |
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
83 |
premerge1 3:973ef48a98a4 |
44734
78b7eae31488
tests: stabilize test-convert-hg-source.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
44687
diff
changeset
|
84 |
premerge2 8:1cc21e701444 |
16899
8149ff405c78
tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16708
diff
changeset
|
85 |
#endif |
25697
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
86 |
|
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
87 |
Test that redoing a convert results in an identical graph |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
88 |
$ cd ../ |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
89 |
$ rm new/.hg/shamap |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
90 |
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
91 |
scanning source... |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
92 |
sorting... |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
93 |
converting... |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
94 |
8 add foo bar |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
95 |
7 change foo |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
96 |
6 make bar and baz copies of foo |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
97 |
5 merge local copy |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
98 |
4 merge remote copy |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
99 |
3 Added tag that for changeset 8601262d7472 |
25697
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
100 |
2 Removed tag that |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
101 |
1 Added tag this for changeset 706614b458c1 |
25697
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
102 |
0 mark baz executable |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
103 |
updating bookmarks |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
104 |
$ hg -R new log -G -T '{rev} {desc}' |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
105 |
o 8 mark baz executable |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
106 |
| |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
107 |
o 7 Added tag this for changeset 706614b458c1 |
25697
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
108 |
| |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
109 |
o 6 Removed tag that |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
110 |
| |
44687
1b8fd4af3318
mergestate: store about files resolved in favour of other
Pulkit Goyal <7895pulkit@gmail.com>
parents:
42079
diff
changeset
|
111 |
o 5 Added tag that for changeset 8601262d7472 |
25697
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
112 |
| |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
113 |
o 4 merge remote copy |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
114 |
|\ |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
115 |
+---o 3 merge local copy |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
116 |
| |/ |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
117 |
| o 2 make bar and baz copies of foo |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
118 |
| | |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
119 |
o | 1 change foo |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
120 |
|/ |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
121 |
o 0 add foo bar |
1538e72209fd
convert: fix bug with converting the same commit twice
Durham Goode <durham@fb.com>
parents:
25305
diff
changeset
|
122 |
|
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
123 |
|
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
124 |
check shamap LF and CRLF handling |
7231
8e7130a10f3b
convert: ignore hg source errors with hg.ignoreerrors (issue 1357)
Patrick Mezard <pmezard@gmail.com>
parents:
5811
diff
changeset
|
125 |
|
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
126 |
$ cat > rewrite.py <<EOF |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
127 |
> import sys |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
128 |
> # Interlace LF and CRLF |
36053
3c9f2d4dbb39
py3: replace file() with open() in test-convert-hg-source.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32940
diff
changeset
|
129 |
> lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) |
3c9f2d4dbb39
py3: replace file() with open() in test-convert-hg-source.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32940
diff
changeset
|
130 |
> for i, l in enumerate(open(sys.argv[1], 'rb'))] |
3c9f2d4dbb39
py3: replace file() with open() in test-convert-hg-source.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32940
diff
changeset
|
131 |
> open(sys.argv[1], 'wb').write(b''.join(lines)) |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
132 |
> EOF |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39489
diff
changeset
|
133 |
$ "$PYTHON" rewrite.py new/.hg/shamap |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
134 |
$ cd orig |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
135 |
$ hg up -qC 1 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
136 |
$ echo foo >> foo |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
137 |
$ hg ci -qm 'change foo again' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
138 |
$ hg up -qC 2 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
139 |
$ echo foo >> foo |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
140 |
$ hg ci -qm 'change foo again again' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
141 |
$ cd .. |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
142 |
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
143 |
scanning source... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
144 |
sorting... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
145 |
converting... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
146 |
1 change foo again again |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
147 |
0 change foo again |
13866
2f93a4a10144
convert: add hg source bookmark test
Edouard Gomez <ed.gomez@free.fr>
parents:
12526
diff
changeset
|
148 |
updating bookmarks |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
149 |
|
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
150 |
init broken repository |
9528
314fc589b313
convert: make mapfile handle LF and CRLF shamap (issue1846)
Patrick Mezard <pmezard@gmail.com>
parents:
7231
diff
changeset
|
151 |
|
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
152 |
$ hg init broken |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
153 |
$ cd broken |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
154 |
$ echo a >> a |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
155 |
$ echo b >> b |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
156 |
$ hg ci -qAm init |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
157 |
$ echo a >> a |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
158 |
$ echo b >> b |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
159 |
$ hg copy b c |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
160 |
$ hg ci -qAm changeall |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
161 |
$ hg up -qC 0 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
162 |
$ echo bc >> b |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
163 |
$ hg ci -m changebagain |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
164 |
created new head |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
165 |
$ HGMERGE=internal:local hg -q merge |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
166 |
$ hg ci -m merge |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
167 |
$ hg mv b d |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
168 |
$ hg ci -m moveb |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
169 |
|
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
170 |
break it |
7231
8e7130a10f3b
convert: ignore hg source errors with hg.ignoreerrors (issue 1357)
Patrick Mezard <pmezard@gmail.com>
parents:
5811
diff
changeset
|
171 |
|
37347
e82a59bfc5e8
tests: conditionalize test output for simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36053
diff
changeset
|
172 |
#if reporevlogstore |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
173 |
$ rm .hg/store/data/b.* |
37347
e82a59bfc5e8
tests: conditionalize test output for simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36053
diff
changeset
|
174 |
#endif |
e82a59bfc5e8
tests: conditionalize test output for simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36053
diff
changeset
|
175 |
#if reposimplestore |
e82a59bfc5e8
tests: conditionalize test output for simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36053
diff
changeset
|
176 |
$ rm .hg/store/data/b/* |
e82a59bfc5e8
tests: conditionalize test output for simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36053
diff
changeset
|
177 |
#endif |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
178 |
$ cd .. |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
179 |
$ hg --config convert.hg.ignoreerrors=True convert broken fixed |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
180 |
initializing destination fixed repository |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
181 |
scanning source... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
182 |
sorting... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
183 |
converting... |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
184 |
4 init |
47155
96ee8ca99f5a
revlog: use revlog.display_id in LookupError
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46651
diff
changeset
|
185 |
ignoring: data/b@1e88685f5ddec574a34c70af492f95b6debc8741: no match found (reporevlogstore !) |
37416
7542e97c7867
tests: conditionalize tests for various repo features
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37347
diff
changeset
|
186 |
ignoring: data/b/index@1e88685f5dde: no node (reposimplestore !) |
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
187 |
3 changeall |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
188 |
2 changebagain |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
189 |
1 merge |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
190 |
0 moveb |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
191 |
$ hg -R fixed verify |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
192 |
checking changesets |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
193 |
checking manifests |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
194 |
crosschecking files in changesets and manifests |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
195 |
checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
37416
diff
changeset
|
196 |
checked 5 changesets with 5 changes to 3 files |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
197 |
|
12526
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
198 |
manifest -r 0 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
199 |
|
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
200 |
$ hg -R fixed manifest -r 0 |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
201 |
a |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
202 |
|
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
203 |
manifest -r tip |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
204 |
|
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
205 |
$ hg -R fixed manifest -r tip |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
206 |
a |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
207 |
c |
9892949bd969
tests: unify test-convert-hg-source
Matt Mackall <mpm@selenic.com>
parents:
11673
diff
changeset
|
208 |
d |
42076
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
209 |
$ cd .. |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
210 |
|
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
211 |
$ hg init commit-references |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
212 |
$ cd commit-references |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
213 |
$ echo a > a |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
214 |
$ hg ci -Aqm initial |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
215 |
$ echo b > b |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
216 |
$ hg ci -Aqm 'the previous commit was 1451231c8757' |
42077
b8c2dc367cc3
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description
Martin von Zweigbergk <martinvonz@google.com>
parents:
42076
diff
changeset
|
217 |
$ echo c > c |
b8c2dc367cc3
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description
Martin von Zweigbergk <martinvonz@google.com>
parents:
42076
diff
changeset
|
218 |
$ hg ci -Aqm 'the working copy is called ffffffffffff' |
42076
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
219 |
|
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
220 |
$ cd .. |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
221 |
$ hg convert commit-references new-commit-references -q \ |
42079
fcd7a91dec23
localrepo: don't allow lookup of working directory revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
42077
diff
changeset
|
222 |
> --config convert.hg.sourcename=yes |
42076
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
223 |
$ cd new-commit-references |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
224 |
$ hg log -T '{node|short} {desc}\n' |
42079
fcd7a91dec23
localrepo: don't allow lookup of working directory revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
42077
diff
changeset
|
225 |
fe295c9e6bc6 the working copy is called ffffffffffff |
42076
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
226 |
642508659503 the previous commit was c2491f685436 |
f46c1a9b1bfe
tests: add test of for hash reference translation by `hg convert`
Martin von Zweigbergk <martinvonz@google.com>
parents:
39707
diff
changeset
|
227 |
c2491f685436 initial |