equal
deleted
inserted
replaced
10 import heapq |
10 import heapq |
11 import re |
11 import re |
12 |
12 |
13 from .i18n import _ |
13 from .i18n import _ |
14 from . import ( |
14 from . import ( |
15 destutil, |
|
16 encoding, |
15 encoding, |
17 error, |
16 error, |
18 hbisect, |
17 hbisect, |
19 match as matchmod, |
18 match as matchmod, |
20 node, |
19 node, |
523 node = nbhs[-1] |
522 node = nbhs[-1] |
524 else: |
523 else: |
525 node = nbhs[0] |
524 node = nbhs[0] |
526 return subset & baseset([repo[node].rev()]) |
525 return subset & baseset([repo[node].rev()]) |
527 |
526 |
528 def _updatedefaultdest(repo, subset, x): |
|
529 # ``_updatedefaultdest()`` |
|
530 |
|
531 # default destination for update. |
|
532 # # XXX: Currently private because I expect the signature to change. |
|
533 # # XXX: - taking rev as arguments, |
|
534 # # XXX: - bailing out in case of ambiguity vs returning all data. |
|
535 getargs(x, 0, 0, _("_updatedefaultdest takes no arguments")) |
|
536 rev = destutil.destupdate(repo) |
|
537 return subset & baseset([rev]) |
|
538 |
|
539 def adds(repo, subset, x): |
527 def adds(repo, subset, x): |
540 """``adds(pattern)`` |
528 """``adds(pattern)`` |
541 Changesets that add a file matching pattern. |
529 Changesets that add a file matching pattern. |
542 |
530 |
543 The pattern without explicit kind like ``glob:`` is expected to be |
531 The pattern without explicit kind like ``glob:`` is expected to be |
2144 s = subset |
2132 s = subset |
2145 return baseset([r for r in ls if r in s]) |
2133 return baseset([r for r in ls if r in s]) |
2146 |
2134 |
2147 symbols = { |
2135 symbols = { |
2148 "_mergedefaultdest": _mergedefaultdest, |
2136 "_mergedefaultdest": _mergedefaultdest, |
2149 "_updatedefaultdest": _updatedefaultdest, |
|
2150 "adds": adds, |
2137 "adds": adds, |
2151 "all": getall, |
2138 "all": getall, |
2152 "ancestor": ancestor, |
2139 "ancestor": ancestor, |
2153 "ancestors": ancestors, |
2140 "ancestors": ancestors, |
2154 "_firstancestors": _firstancestors, |
2141 "_firstancestors": _firstancestors, |