1564 |
1564 |
1565 def _phase(repo, subset, *targets): |
1565 def _phase(repo, subset, *targets): |
1566 """helper to select all rev in <targets> phases""" |
1566 """helper to select all rev in <targets> phases""" |
1567 return repo._phasecache.getrevset(repo, targets, subset) |
1567 return repo._phasecache.getrevset(repo, targets, subset) |
1568 |
1568 |
|
1569 @predicate('_phase(idx)', safe=True) |
|
1570 def phase(repo, subset, x): |
|
1571 l = getargs(x, 1, 1, ("_phase requires one argument")) |
|
1572 target = getinteger(l[0], ("_phase expects a number")) |
|
1573 return _phase(repo, subset, target) |
|
1574 |
1569 @predicate('draft()', safe=True) |
1575 @predicate('draft()', safe=True) |
1570 def draft(repo, subset, x): |
1576 def draft(repo, subset, x): |
1571 """Changeset in draft phase.""" |
1577 """Changeset in draft phase.""" |
1572 # i18n: "draft" is a keyword |
1578 # i18n: "draft" is a keyword |
1573 getargs(x, 0, 0, _("draft takes no arguments")) |
1579 getargs(x, 0, 0, _("draft takes no arguments")) |