Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 11282:e581f3acc338
revset: fix up tests
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 03 Jun 2010 20:32:41 -0500 |
parents | a5eb0bf7e158 |
children | a6356b2695a3 |
comparison
equal
deleted
inserted
replaced
11281:b724b8467b82 | 11282:e581f3acc338 |
---|---|
114 return getset(repo, subset, | 114 return getset(repo, subset, |
115 ('string', '-' + getstring(x, "can't negate that"))) | 115 ('string', '-' + getstring(x, "can't negate that"))) |
116 | 116 |
117 def stringset(repo, subset, x): | 117 def stringset(repo, subset, x): |
118 x = repo[x].rev() | 118 x = repo[x].rev() |
119 if x == -1 and len(subset) == len(repo): | |
120 return [-1] | |
119 if x in subset: | 121 if x in subset: |
120 return [x] | 122 return [x] |
121 return [] | 123 return [] |
122 | 124 |
123 def symbolset(repo, subset, x): | 125 def symbolset(repo, subset, x): |
515 elif op == 'not': | 517 elif op == 'not': |
516 o = optimize(x[1], not small) | 518 o = optimize(x[1], not small) |
517 return o[0], (op, o[1]) | 519 return o[0], (op, o[1]) |
518 elif op == 'group': | 520 elif op == 'group': |
519 return optimize(x[1], small) | 521 return optimize(x[1], small) |
520 elif op in 'rangepre rangepost dagrangepre dagrangepost': | |
521 wa, ta = optimize(x[1], small) | |
522 return wa + 1, (op, ta) | |
523 elif op in 'range list': | 522 elif op in 'range list': |
524 wa, ta = optimize(x[1], small) | 523 wa, ta = optimize(x[1], small) |
525 wb, tb = optimize(x[2], small) | 524 wb, tb = optimize(x[2], small) |
526 return wa + wb, (op, ta, tb) | 525 return wa + wb, (op, ta, tb) |
527 elif op == 'func': | 526 elif op == 'func': |