comparison hgext/evolve.py @ 1204:161b8f6e7402 stable

evolve: use 3.2+ fullreposet to evaluate argument set (issue4515) getset() has no compatibility wrapper for old-style argument and we don't want to add more hacks in Mercurial core.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 29 Jan 2015 22:53:43 +0900
parents 936aa82884ab
children 9b8628e0a142
comparison
equal deleted inserted replaced
1203:936aa82884ab 1204:161b8f6e7402
500 @eh.revset('precursors') 500 @eh.revset('precursors')
501 def revsetprecursors(repo, subset, x): 501 def revsetprecursors(repo, subset, x):
502 """``precursors(set)`` 502 """``precursors(set)``
503 Immediate precursors of changesets in set. 503 Immediate precursors of changesets in set.
504 """ 504 """
505 s = revset.getset(repo, range(len(repo)), x) 505 s = revset.getset(repo, revset.fullreposet(repo), x)
506 cs = _precursors(repo, s) 506 cs = _precursors(repo, s)
507 return [r for r in subset if r in cs] 507 return [r for r in subset if r in cs]
508 508
509 509
510 @eh.revset('allprecursors') 510 @eh.revset('allprecursors')
511 def revsetallprecursors(repo, subset, x): 511 def revsetallprecursors(repo, subset, x):
512 """``allprecursors(set)`` 512 """``allprecursors(set)``
513 Transitive precursors of changesets in set. 513 Transitive precursors of changesets in set.
514 """ 514 """
515 s = revset.getset(repo, range(len(repo)), x) 515 s = revset.getset(repo, revset.fullreposet(repo), x)
516 cs = _allprecursors(repo, s) 516 cs = _allprecursors(repo, s)
517 return [r for r in subset if r in cs] 517 return [r for r in subset if r in cs]
518 518
519 519
520 @eh.revset('successors') 520 @eh.revset('successors')
521 def revsetsuccessors(repo, subset, x): 521 def revsetsuccessors(repo, subset, x):
522 """``successors(set)`` 522 """``successors(set)``
523 Immediate successors of changesets in set. 523 Immediate successors of changesets in set.
524 """ 524 """
525 s = revset.getset(repo, range(len(repo)), x) 525 s = revset.getset(repo, revset.fullreposet(repo), x)
526 cs = _successors(repo, s) 526 cs = _successors(repo, s)
527 return [r for r in subset if r in cs] 527 return [r for r in subset if r in cs]
528 528
529 @eh.revset('allsuccessors') 529 @eh.revset('allsuccessors')
530 def revsetallsuccessors(repo, subset, x): 530 def revsetallsuccessors(repo, subset, x):
531 """``allsuccessors(set)`` 531 """``allsuccessors(set)``
532 Transitive successors of changesets in set. 532 Transitive successors of changesets in set.
533 """ 533 """
534 s = revset.getset(repo, range(len(repo)), x) 534 s = revset.getset(repo, revset.fullreposet(repo), x)
535 cs = _allsuccessors(repo, s) 535 cs = _allsuccessors(repo, s)
536 return [r for r in subset if r in cs] 536 return [r for r in subset if r in cs]
537 537
538 ### template keywords 538 ### template keywords
539 # XXX it does not handle troubles well :-/ 539 # XXX it does not handle troubles well :-/