Show More
@@ -255,12 +255,18 b' class convert_git(converter_source):' | |||||
255 | entry = l.split() |
|
255 | entry = l.split() | |
256 | continue |
|
256 | continue | |
257 | f = l |
|
257 | f = l | |
|
258 | if entry[4][0] == 'C': | |||
|
259 | copysrc = f | |||
|
260 | copydest = difftree[i] | |||
|
261 | i += 1 | |||
|
262 | f = copydest | |||
|
263 | copies[copydest] = copysrc | |||
258 | if f not in seen: |
|
264 | if f not in seen: | |
259 | add(entry, f, False) |
|
265 | add(entry, f, False) | |
260 | # A file can be copied multiple times, or modified and copied |
|
266 | # A file can be copied multiple times, or modified and copied | |
261 | # simultaneously. So f can be repeated even if fdest isn't. |
|
267 | # simultaneously. So f can be repeated even if fdest isn't. | |
262 |
if entry[4][0] |
|
268 | if entry[4][0] == 'R': | |
263 |
# rename |
|
269 | # rename: next line is the destination | |
264 | fdest = difftree[i] |
|
270 | fdest = difftree[i] | |
265 | i += 1 |
|
271 | i += 1 | |
266 | if fdest not in seen: |
|
272 | if fdest not in seen: |
@@ -295,7 +295,7 b' def grep(mctx, x):' | |||||
295 |
|
295 | |||
296 | def _sizetomax(s): |
|
296 | def _sizetomax(s): | |
297 | try: |
|
297 | try: | |
298 | s = s.strip() |
|
298 | s = s.strip().lower() | |
299 | for k, v in util._sizeunits: |
|
299 | for k, v in util._sizeunits: | |
300 | if s.endswith(k): |
|
300 | if s.endswith(k): | |
301 | # max(4k) = 5k - 1, max(4.5k) = 4.6k - 1 |
|
301 | # max(4k) = 5k - 1, max(4.5k) = 4.6k - 1 |
@@ -13,7 +13,7 b' These include:' | |||||
13 | - Calling out to a command server |
|
13 | - Calling out to a command server | |
14 |
|
14 | |||
15 | Executing ``hg`` processes is very similar to how humans interact with |
|
15 | Executing ``hg`` processes is very similar to how humans interact with | |
16 | Mercurial in the shell. It should already be familar to you. |
|
16 | Mercurial in the shell. It should already be familiar to you. | |
17 |
|
17 | |||
18 | :hg:`serve` can be used to start a server. By default, this will start |
|
18 | :hg:`serve` can be used to start a server. By default, this will start | |
19 | a "hgweb" HTTP server. This HTTP server has support for machine-readable |
|
19 | a "hgweb" HTTP server. This HTTP server has support for machine-readable |
@@ -1113,6 +1113,7 b' static PyObject *compute_phases_map_sets' | |||||
1113 | PyObject *phaseroots = NULL; |
|
1113 | PyObject *phaseroots = NULL; | |
1114 | PyObject *phaseset = NULL; |
|
1114 | PyObject *phaseset = NULL; | |
1115 | PyObject *phasessetlist = NULL; |
|
1115 | PyObject *phasessetlist = NULL; | |
|
1116 | PyObject *rev = NULL; | |||
1116 | Py_ssize_t len = index_length(self) - 1; |
|
1117 | Py_ssize_t len = index_length(self) - 1; | |
1117 | Py_ssize_t numphase = 0; |
|
1118 | Py_ssize_t numphase = 0; | |
1118 | Py_ssize_t minrevallphases = 0; |
|
1119 | Py_ssize_t minrevallphases = 0; | |
@@ -1172,7 +1173,9 b' static PyObject *compute_phases_map_sets' | |||||
1172 | * is computed as a difference */ |
|
1173 | * is computed as a difference */ | |
1173 | if (phase != 0) { |
|
1174 | if (phase != 0) { | |
1174 | phaseset = PyList_GET_ITEM(phasessetlist, phase); |
|
1175 | phaseset = PyList_GET_ITEM(phasessetlist, phase); | |
1175 |
|
|
1176 | rev = PyInt_FromLong(i); | |
|
1177 | PySet_Add(phaseset, rev); | |||
|
1178 | Py_XDECREF(rev); | |||
1176 | } |
|
1179 | } | |
1177 | PyList_SET_ITEM(phaseslist, i, PyInt_FromLong(phase)); |
|
1180 | PyList_SET_ITEM(phaseslist, i, PyInt_FromLong(phase)); | |
1178 | } |
|
1181 | } |
@@ -2276,8 +2276,10 b' def optimize(x, small):' | |||||
2276 | # (::x and not ::y)/(not ::y and ::x) have a fast path |
|
2276 | # (::x and not ::y)/(not ::y and ::x) have a fast path | |
2277 | def isonly(revs, bases): |
|
2277 | def isonly(revs, bases): | |
2278 | return ( |
|
2278 | return ( | |
2279 |
revs |
|
2279 | revs is not None | |
|
2280 | and revs[0] == 'func' | |||
2280 | and getstring(revs[1], _('not a symbol')) == 'ancestors' |
|
2281 | and getstring(revs[1], _('not a symbol')) == 'ancestors' | |
|
2282 | and bases is not None | |||
2281 | and bases[0] == 'not' |
|
2283 | and bases[0] == 'not' | |
2282 | and bases[1][0] == 'func' |
|
2284 | and bases[1][0] == 'func' | |
2283 | and getstring(bases[1][1], _('not a symbol')) == 'ancestors') |
|
2285 | and getstring(bases[1][1], _('not a symbol')) == 'ancestors') | |
@@ -2309,7 +2311,7 b' def optimize(x, small):' | |||||
2309 | del ss[:] |
|
2311 | del ss[:] | |
2310 | for y in x[1:]: |
|
2312 | for y in x[1:]: | |
2311 | w, t = optimize(y, False) |
|
2313 | w, t = optimize(y, False) | |
2312 | if t[0] == 'string' or t[0] == 'symbol': |
|
2314 | if t is not None and (t[0] == 'string' or t[0] == 'symbol'): | |
2313 | ss.append((w, t)) |
|
2315 | ss.append((w, t)) | |
2314 | continue |
|
2316 | continue | |
2315 | flushss() |
|
2317 | flushss() |
@@ -321,8 +321,9 b' since bar is not touched in this commit,' | |||||
321 | $ cp bar bar-copied |
|
321 | $ cp bar bar-copied | |
322 | $ cp baz baz-copied |
|
322 | $ cp baz baz-copied | |
323 | $ cp baz baz-copied2 |
|
323 | $ cp baz baz-copied2 | |
|
324 | $ cp baz ba-copy | |||
324 | $ echo baz2 >> baz |
|
325 | $ echo baz2 >> baz | |
325 | $ git add bar-copied baz-copied baz-copied2 |
|
326 | $ git add bar-copied baz-copied baz-copied2 ba-copy | |
326 | $ commit -a -m 'rename and copy' |
|
327 | $ commit -a -m 'rename and copy' | |
327 | $ cd .. |
|
328 | $ cd .. | |
328 |
|
329 | |||
@@ -340,6 +341,8 b' input validation' | |||||
340 | $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo |
|
341 | $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo | |
341 | $ hg -R fullrepo status -C --change master |
|
342 | $ hg -R fullrepo status -C --change master | |
342 | M baz |
|
343 | M baz | |
|
344 | A ba-copy | |||
|
345 | baz | |||
343 | A bar-copied |
|
346 | A bar-copied | |
344 | A baz-copied |
|
347 | A baz-copied | |
345 | baz |
|
348 | baz | |
@@ -349,6 +352,13 b' input validation' | |||||
349 | foo |
|
352 | foo | |
350 | R foo |
|
353 | R foo | |
351 |
|
354 | |||
|
355 | Ensure that the modification to the copy source was preserved | |||
|
356 | (there was a bug where if the copy dest was alphabetically prior to the copy | |||
|
357 | source, the copy source took the contents of the copy dest) | |||
|
358 | $ hg cat -r tip fullrepo/baz | |||
|
359 | baz | |||
|
360 | baz2 | |||
|
361 | ||||
352 | $ cd git-repo2 |
|
362 | $ cd git-repo2 | |
353 | $ echo bar2 >> bar |
|
363 | $ echo bar2 >> bar | |
354 | $ commit -a -m 'change bar' |
|
364 | $ commit -a -m 'change bar' |
@@ -144,6 +144,8 b' Test files properties' | |||||
144 | 2k |
|
144 | 2k | |
145 | $ fileset '(1k or 2k) and size(".5KB - 1.5kB")' |
|
145 | $ fileset '(1k or 2k) and size(".5KB - 1.5kB")' | |
146 | 1k |
|
146 | 1k | |
|
147 | $ fileset 'size("1M")' | |||
|
148 | $ fileset 'size("1 GB")' | |||
147 |
|
149 | |||
148 | Test merge states |
|
150 | Test merge states | |
149 |
|
151 |
@@ -1186,6 +1186,20 b' test that chained `or` operations make b' | |||||
1186 | 4 |
|
1186 | 4 | |
1187 | 5 |
|
1187 | 5 | |
1188 |
|
1188 | |||
|
1189 | no crash by empty group "()" while optimizing `or` operations | |||
|
1190 | ||||
|
1191 | $ try --optimize '0|()' | |||
|
1192 | (or | |||
|
1193 | ('symbol', '0') | |||
|
1194 | (group | |||
|
1195 | None)) | |||
|
1196 | * optimized: | |||
|
1197 | (or | |||
|
1198 | ('symbol', '0') | |||
|
1199 | None) | |||
|
1200 | hg: parse error: missing argument | |||
|
1201 | [255] | |||
|
1202 | ||||
1189 | test that chained `or` operations never eat up stack (issue4624) |
|
1203 | test that chained `or` operations never eat up stack (issue4624) | |
1190 | (uses `0:1` instead of `0` to avoid future optimization of trivial revisions) |
|
1204 | (uses `0:1` instead of `0` to avoid future optimization of trivial revisions) | |
1191 |
|
1205 | |||
@@ -1272,6 +1286,23 b' check that conversion to only works' | |||||
1272 | 5 |
|
1286 | 5 | |
1273 | 6 |
|
1287 | 6 | |
1274 |
|
1288 | |||
|
1289 | no crash by empty group "()" while optimizing to "only()" | |||
|
1290 | ||||
|
1291 | $ try --optimize '::1 and ()' | |||
|
1292 | (and | |||
|
1293 | (dagrangepre | |||
|
1294 | ('symbol', '1')) | |||
|
1295 | (group | |||
|
1296 | None)) | |||
|
1297 | * optimized: | |||
|
1298 | (and | |||
|
1299 | None | |||
|
1300 | (func | |||
|
1301 | ('symbol', 'ancestors') | |||
|
1302 | ('symbol', '1'))) | |||
|
1303 | hg: parse error: missing argument | |||
|
1304 | [255] | |||
|
1305 | ||||
1275 | we can use patterns when searching for tags |
|
1306 | we can use patterns when searching for tags | |
1276 |
|
1307 | |||
1277 | $ log 'tag("1..*")' |
|
1308 | $ log 'tag("1..*")' |
General Comments 0
You need to be logged in to leave comments.
Login now