Show More
@@ -111,10 +111,6 b' def getset(repo, subset, x):' | |||||
111 |
|
111 | |||
112 | # operator methods |
|
112 | # operator methods | |
113 |
|
113 | |||
114 | def negate(repo, subset, x): |
|
|||
115 | return getset(repo, subset, |
|
|||
116 | ('string', '-' + getstring(x, _("can't negate that")))) |
|
|||
117 |
|
||||
118 | def stringset(repo, subset, x): |
|
114 | def stringset(repo, subset, x): | |
119 | x = repo[x].rev() |
|
115 | x = repo[x].rev() | |
120 | if x == -1 and len(subset) == len(repo): |
|
116 | if x == -1 and len(subset) == len(repo): | |
@@ -482,7 +478,6 b' symbols = {' | |||||
482 | } |
|
478 | } | |
483 |
|
479 | |||
484 | methods = { |
|
480 | methods = { | |
485 | "negate": negate, |
|
|||
486 | "range": rangeset, |
|
481 | "range": rangeset, | |
487 | "string": stringset, |
|
482 | "string": stringset, | |
488 | "symbol": symbolset, |
|
483 | "symbol": symbolset, | |
@@ -515,6 +510,9 b' def optimize(x, small):' | |||||
515 | return optimize(('range', ('string', '0'), x[1]), small) |
|
510 | return optimize(('range', ('string', '0'), x[1]), small) | |
516 | elif op == 'rangepost': |
|
511 | elif op == 'rangepost': | |
517 | return optimize(('range', x[1], ('string', 'tip')), small) |
|
512 | return optimize(('range', x[1], ('string', 'tip')), small) | |
|
513 | elif op == 'negate': | |||
|
514 | return optimize(('string', | |||
|
515 | '-' + getstring(x[1], _("can't negate that"))), small) | |||
518 | elif op in 'string symbol negate': |
|
516 | elif op in 'string symbol negate': | |
519 | return smallbonus, x # single revisions are small |
|
517 | return smallbonus, x # single revisions are small | |
520 | elif op == 'and' or op == 'dagrange': |
|
518 | elif op == 'and' or op == 'dagrange': |
General Comments 0
You need to be logged in to leave comments.
Login now