Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 11283:a6356b2695a3
revset: fix - handling in the optimizer
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 04 Jun 2010 10:26:55 -0500 |
parents | e581f3acc338 |
children | 0b5c2e82aeb5 |
comparison
equal
deleted
inserted
replaced
11282:e581f3acc338 | 11283:a6356b2695a3 |
---|---|
484 smallbonus = 1 | 484 smallbonus = 1 |
485 if small: | 485 if small: |
486 smallbonus = .5 | 486 smallbonus = .5 |
487 | 487 |
488 op = x[0] | 488 op = x[0] |
489 if op == '-': | 489 if op == 'minus': |
490 return optimize(('and', x[1], ('not', x[2])), small) | 490 return optimize(('and', x[1], ('not', x[2])), small) |
491 elif op == 'dagrange': | 491 elif op == 'dagrange': |
492 return optimize(('and', ('func', ('symbol', 'descendants'), x[1]), | 492 return optimize(('and', ('func', ('symbol', 'descendants'), x[1]), |
493 ('func', ('symbol', 'ancestors'), x[2])), small) | 493 ('func', ('symbol', 'ancestors'), x[2])), small) |
494 elif op == 'dagrangepre': | 494 elif op == 'dagrangepre': |