Show More
@@ -1,224 +1,228 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > convert= |
|
3 | > convert= | |
4 | > [convert] |
|
4 | > [convert] | |
5 | > hg.saverev=False |
|
5 | > hg.saverev=False | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hg init orig |
|
7 | $ hg init orig | |
8 | $ cd orig |
|
8 | $ cd orig | |
9 | $ echo foo > foo |
|
9 | $ echo foo > foo | |
10 | $ echo bar > bar |
|
10 | $ echo bar > bar | |
11 | $ hg ci -qAm 'add foo bar' -d '0 0' |
|
11 | $ hg ci -qAm 'add foo bar' -d '0 0' | |
12 | $ echo >> foo |
|
12 | $ echo >> foo | |
13 | $ hg ci -m 'change foo' -d '1 0' |
|
13 | $ hg ci -m 'change foo' -d '1 0' | |
14 | $ hg up -qC 0 |
|
14 | $ hg up -qC 0 | |
15 | $ hg copy --after --force foo bar |
|
15 | $ hg copy --after --force foo bar | |
16 | $ hg copy foo baz |
|
16 | $ hg copy foo baz | |
17 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' |
|
17 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' | |
18 | created new head |
|
18 | created new head | |
19 |
|
19 | |||
20 | Test that template can print all file copies (issue4362) |
|
20 | Test that template can print all file copies (issue4362) | |
21 | $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}" |
|
21 | $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}" | |
22 | File: bar (foo) |
|
22 | File: bar (foo) | |
23 | File: baz (foo) |
|
23 | File: baz (foo) | |
24 |
|
24 | |||
25 | $ hg bookmark premerge1 |
|
25 | $ hg bookmark premerge1 | |
26 | $ hg merge -r 1 |
|
26 | $ hg merge -r 1 | |
27 | merging baz and foo to baz |
|
27 | merging baz and foo to baz | |
28 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
28 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
29 | (branch merge, don't forget to commit) |
|
29 | (branch merge, don't forget to commit) | |
30 | $ hg ci -m 'merge local copy' -d '3 0' |
|
30 | $ hg ci -m 'merge local copy' -d '3 0' | |
31 | $ hg up -C 1 |
|
31 | $ hg up -C 1 | |
32 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
32 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
33 | (leaving bookmark premerge1) |
|
33 | (leaving bookmark premerge1) | |
34 | $ hg bookmark premerge2 |
|
34 | $ hg bookmark premerge2 | |
35 | $ hg merge 2 |
|
35 | $ hg merge 2 | |
36 | merging foo and baz to baz |
|
36 | merging foo and baz to baz | |
37 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
38 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
39 | $ hg ci -m 'merge remote copy' -d '4 0' |
|
39 | $ hg ci -m 'merge remote copy' -d '4 0' | |
40 | created new head |
|
40 | created new head | |
41 |
|
41 | |||
42 | Make and delete some tags |
|
42 | Make and delete some tags | |
43 |
|
43 | |||
44 | $ hg tag that |
|
44 | $ hg tag that | |
45 | $ hg tag --remove that |
|
45 | $ hg tag --remove that | |
46 | $ hg tag this |
|
46 | $ hg tag this | |
47 |
|
47 | |||
48 | #if execbit |
|
48 | #if execbit | |
49 | $ chmod +x baz |
|
49 | $ chmod +x baz | |
50 | #else |
|
50 | #else | |
51 | $ echo some other change to make sure we get a rev 5 > baz |
|
51 | $ echo some other change to make sure we get a rev 5 > baz | |
52 | #endif |
|
52 | #endif | |
53 | $ hg ci -m 'mark baz executable' -d '5 0' |
|
53 | $ hg ci -m 'mark baz executable' -d '5 0' | |
54 | $ cd .. |
|
54 | $ cd .. | |
55 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
55 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
56 | initializing destination new repository |
|
56 | initializing destination new repository | |
57 | scanning source... |
|
57 | scanning source... | |
58 | sorting... |
|
58 | sorting... | |
59 | converting... |
|
59 | converting... | |
60 | 8 add foo bar |
|
60 | 8 add foo bar | |
61 | 7 change foo |
|
61 | 7 change foo | |
62 | 6 make bar and baz copies of foo |
|
62 | 6 make bar and baz copies of foo | |
63 | 5 merge local copy |
|
63 | 5 merge local copy | |
64 | 4 merge remote copy |
|
64 | 4 merge remote copy | |
65 | 3 Added tag that for changeset 88586c4e9f02 |
|
65 | 3 Added tag that for changeset 88586c4e9f02 | |
66 | 2 Removed tag that |
|
66 | 2 Removed tag that | |
67 | 1 Added tag this for changeset c56a7f387039 |
|
67 | 1 Added tag this for changeset c56a7f387039 | |
68 | 0 mark baz executable |
|
68 | 0 mark baz executable | |
69 | updating bookmarks |
|
69 | updating bookmarks | |
70 | $ cd new |
|
70 | $ cd new | |
71 | $ hg out ../orig |
|
71 | $ hg out ../orig | |
72 | comparing with ../orig |
|
72 | comparing with ../orig | |
73 | searching for changes |
|
73 | searching for changes | |
74 | no changes found |
|
74 | no changes found | |
75 | [1] |
|
75 | [1] | |
76 | #if execbit |
|
76 | #if execbit | |
77 | $ hg bookmarks |
|
77 | $ hg bookmarks | |
78 | premerge1 3:973ef48a98a4 |
|
78 | premerge1 3:973ef48a98a4 | |
79 | premerge2 8:91d107c423ba |
|
79 | premerge2 8:91d107c423ba | |
80 | #else |
|
80 | #else | |
81 | Different hash because no x bit |
|
81 | Different hash because no x bit | |
82 | $ hg bookmarks |
|
82 | $ hg bookmarks | |
83 | premerge1 3:973ef48a98a4 |
|
83 | premerge1 3:973ef48a98a4 | |
84 | premerge2 8:3537b15eaaca |
|
84 | premerge2 8:3537b15eaaca | |
85 | #endif |
|
85 | #endif | |
86 |
|
86 | |||
87 | Test that redoing a convert results in an identical graph |
|
87 | Test that redoing a convert results in an identical graph | |
88 | $ cd ../ |
|
88 | $ cd ../ | |
89 | $ rm new/.hg/shamap |
|
89 | $ rm new/.hg/shamap | |
90 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
90 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
91 | scanning source... |
|
91 | scanning source... | |
92 | sorting... |
|
92 | sorting... | |
93 | converting... |
|
93 | converting... | |
94 | 8 add foo bar |
|
94 | 8 add foo bar | |
95 | 7 change foo |
|
95 | 7 change foo | |
96 | 6 make bar and baz copies of foo |
|
96 | 6 make bar and baz copies of foo | |
97 | 5 merge local copy |
|
97 | 5 merge local copy | |
98 | 4 merge remote copy |
|
98 | 4 merge remote copy | |
99 | 3 Added tag that for changeset 88586c4e9f02 |
|
99 | 3 Added tag that for changeset 88586c4e9f02 | |
100 | 2 Removed tag that |
|
100 | 2 Removed tag that | |
101 | 1 Added tag this for changeset c56a7f387039 |
|
101 | 1 Added tag this for changeset c56a7f387039 | |
102 | 0 mark baz executable |
|
102 | 0 mark baz executable | |
103 | updating bookmarks |
|
103 | updating bookmarks | |
104 | $ hg -R new log -G -T '{rev} {desc}' |
|
104 | $ hg -R new log -G -T '{rev} {desc}' | |
105 | o 8 mark baz executable |
|
105 | o 8 mark baz executable | |
106 | | |
|
106 | | | |
107 | o 7 Added tag this for changeset c56a7f387039 |
|
107 | o 7 Added tag this for changeset c56a7f387039 | |
108 | | |
|
108 | | | |
109 | o 6 Removed tag that |
|
109 | o 6 Removed tag that | |
110 | | |
|
110 | | | |
111 | o 5 Added tag that for changeset 88586c4e9f02 |
|
111 | o 5 Added tag that for changeset 88586c4e9f02 | |
112 | | |
|
112 | | | |
113 | o 4 merge remote copy |
|
113 | o 4 merge remote copy | |
114 | |\ |
|
114 | |\ | |
115 | +---o 3 merge local copy |
|
115 | +---o 3 merge local copy | |
116 | | |/ |
|
116 | | |/ | |
117 | | o 2 make bar and baz copies of foo |
|
117 | | o 2 make bar and baz copies of foo | |
118 | | | |
|
118 | | | | |
119 | o | 1 change foo |
|
119 | o | 1 change foo | |
120 | |/ |
|
120 | |/ | |
121 | o 0 add foo bar |
|
121 | o 0 add foo bar | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | check shamap LF and CRLF handling |
|
124 | check shamap LF and CRLF handling | |
125 |
|
125 | |||
126 | $ cat > rewrite.py <<EOF |
|
126 | $ cat > rewrite.py <<EOF | |
127 | > import sys |
|
127 | > import sys | |
128 | > # Interlace LF and CRLF |
|
128 | > # Interlace LF and CRLF | |
129 | > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) |
|
129 | > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) | |
130 | > for i, l in enumerate(open(sys.argv[1], 'rb'))] |
|
130 | > for i, l in enumerate(open(sys.argv[1], 'rb'))] | |
131 | > open(sys.argv[1], 'wb').write(b''.join(lines)) |
|
131 | > open(sys.argv[1], 'wb').write(b''.join(lines)) | |
132 | > EOF |
|
132 | > EOF | |
133 | $ "$PYTHON" rewrite.py new/.hg/shamap |
|
133 | $ "$PYTHON" rewrite.py new/.hg/shamap | |
134 | $ cd orig |
|
134 | $ cd orig | |
135 | $ hg up -qC 1 |
|
135 | $ hg up -qC 1 | |
136 | $ echo foo >> foo |
|
136 | $ echo foo >> foo | |
137 | $ hg ci -qm 'change foo again' |
|
137 | $ hg ci -qm 'change foo again' | |
138 | $ hg up -qC 2 |
|
138 | $ hg up -qC 2 | |
139 | $ echo foo >> foo |
|
139 | $ echo foo >> foo | |
140 | $ hg ci -qm 'change foo again again' |
|
140 | $ hg ci -qm 'change foo again again' | |
141 | $ cd .. |
|
141 | $ cd .. | |
142 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
142 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
143 | scanning source... |
|
143 | scanning source... | |
144 | sorting... |
|
144 | sorting... | |
145 | converting... |
|
145 | converting... | |
146 | 1 change foo again again |
|
146 | 1 change foo again again | |
147 | 0 change foo again |
|
147 | 0 change foo again | |
148 | updating bookmarks |
|
148 | updating bookmarks | |
149 |
|
149 | |||
150 | init broken repository |
|
150 | init broken repository | |
151 |
|
151 | |||
152 | $ hg init broken |
|
152 | $ hg init broken | |
153 | $ cd broken |
|
153 | $ cd broken | |
154 | $ echo a >> a |
|
154 | $ echo a >> a | |
155 | $ echo b >> b |
|
155 | $ echo b >> b | |
156 | $ hg ci -qAm init |
|
156 | $ hg ci -qAm init | |
157 | $ echo a >> a |
|
157 | $ echo a >> a | |
158 | $ echo b >> b |
|
158 | $ echo b >> b | |
159 | $ hg copy b c |
|
159 | $ hg copy b c | |
160 | $ hg ci -qAm changeall |
|
160 | $ hg ci -qAm changeall | |
161 | $ hg up -qC 0 |
|
161 | $ hg up -qC 0 | |
162 | $ echo bc >> b |
|
162 | $ echo bc >> b | |
163 | $ hg ci -m changebagain |
|
163 | $ hg ci -m changebagain | |
164 | created new head |
|
164 | created new head | |
165 | $ HGMERGE=internal:local hg -q merge |
|
165 | $ HGMERGE=internal:local hg -q merge | |
166 | $ hg ci -m merge |
|
166 | $ hg ci -m merge | |
167 | $ hg mv b d |
|
167 | $ hg mv b d | |
168 | $ hg ci -m moveb |
|
168 | $ hg ci -m moveb | |
169 |
|
169 | |||
170 | break it |
|
170 | break it | |
171 |
|
171 | |||
172 | #if reporevlogstore |
|
172 | #if reporevlogstore | |
173 | $ rm .hg/store/data/b.* |
|
173 | $ rm .hg/store/data/b.* | |
174 | #endif |
|
174 | #endif | |
175 | #if reposimplestore |
|
175 | #if reposimplestore | |
176 | $ rm .hg/store/data/b/* |
|
176 | $ rm .hg/store/data/b/* | |
177 | #endif |
|
177 | #endif | |
178 | $ cd .. |
|
178 | $ cd .. | |
179 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed |
|
179 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed | |
180 | initializing destination fixed repository |
|
180 | initializing destination fixed repository | |
181 | scanning source... |
|
181 | scanning source... | |
182 | sorting... |
|
182 | sorting... | |
183 | converting... |
|
183 | converting... | |
184 | 4 init |
|
184 | 4 init | |
185 | ignoring: data/b.i@1e88685f5dde: no match found (reporevlogstore !) |
|
185 | ignoring: data/b.i@1e88685f5dde: no match found (reporevlogstore !) | |
186 | ignoring: data/b/index@1e88685f5dde: no node (reposimplestore !) |
|
186 | ignoring: data/b/index@1e88685f5dde: no node (reposimplestore !) | |
187 | 3 changeall |
|
187 | 3 changeall | |
188 | 2 changebagain |
|
188 | 2 changebagain | |
189 | 1 merge |
|
189 | 1 merge | |
190 | 0 moveb |
|
190 | 0 moveb | |
191 | $ hg -R fixed verify |
|
191 | $ hg -R fixed verify | |
192 | checking changesets |
|
192 | checking changesets | |
193 | checking manifests |
|
193 | checking manifests | |
194 | crosschecking files in changesets and manifests |
|
194 | crosschecking files in changesets and manifests | |
195 | checking files |
|
195 | checking files | |
196 | checked 5 changesets with 5 changes to 3 files |
|
196 | checked 5 changesets with 5 changes to 3 files | |
197 |
|
197 | |||
198 | manifest -r 0 |
|
198 | manifest -r 0 | |
199 |
|
199 | |||
200 | $ hg -R fixed manifest -r 0 |
|
200 | $ hg -R fixed manifest -r 0 | |
201 | a |
|
201 | a | |
202 |
|
202 | |||
203 | manifest -r tip |
|
203 | manifest -r tip | |
204 |
|
204 | |||
205 | $ hg -R fixed manifest -r tip |
|
205 | $ hg -R fixed manifest -r tip | |
206 | a |
|
206 | a | |
207 | c |
|
207 | c | |
208 | d |
|
208 | d | |
209 | $ cd .. |
|
209 | $ cd .. | |
210 |
|
210 | |||
211 | $ hg init commit-references |
|
211 | $ hg init commit-references | |
212 | $ cd commit-references |
|
212 | $ cd commit-references | |
213 | $ echo a > a |
|
213 | $ echo a > a | |
214 | $ hg ci -Aqm initial |
|
214 | $ hg ci -Aqm initial | |
215 | $ echo b > b |
|
215 | $ echo b > b | |
216 | $ hg ci -Aqm 'the previous commit was 1451231c8757' |
|
216 | $ hg ci -Aqm 'the previous commit was 1451231c8757' | |
|
217 | $ echo c > c | |||
|
218 | $ hg ci -Aqm 'the working copy is called ffffffffffff' | |||
217 |
|
219 | |||
218 | $ cd .. |
|
220 | $ cd .. | |
|
221 | BROKEN: crashes when the "ffffffffffff" is encountered | |||
219 | $ hg convert commit-references new-commit-references -q \ |
|
222 | $ hg convert commit-references new-commit-references -q \ | |
220 | > --config convert.hg.sourcename=yes |
|
223 | > --config convert.hg.sourcename=yes 2>&1 | grep TypeError | |
|
224 | TypeError: b2a_hex() argument 1 must be string or buffer, not None | |||
221 | $ cd new-commit-references |
|
225 | $ cd new-commit-references | |
222 | $ hg log -T '{node|short} {desc}\n' |
|
226 | $ hg log -T '{node|short} {desc}\n' | |
223 | 642508659503 the previous commit was c2491f685436 |
|
227 | 642508659503 the previous commit was c2491f685436 | |
224 | c2491f685436 initial |
|
228 | c2491f685436 initial |
General Comments 0
You need to be logged in to leave comments.
Login now