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