equal
deleted
inserted
replaced
575 |
575 |
576 The revset is specified as a string ``expr`` that may contain |
576 The revset is specified as a string ``expr`` that may contain |
577 %-formatting to escape certain types. See ``revsetlang.formatspec``. |
577 %-formatting to escape certain types. See ``revsetlang.formatspec``. |
578 |
578 |
579 Revset aliases from the configuration are not expanded. To expand |
579 Revset aliases from the configuration are not expanded. To expand |
580 user aliases, consider calling ``scmutil.revrange()``. |
580 user aliases, consider calling ``scmutil.revrange()`` or |
|
581 ``repo.anyrevs([expr], user=True)``. |
581 |
582 |
582 Returns a revset.abstractsmartset, which is a list-like interface |
583 Returns a revset.abstractsmartset, which is a list-like interface |
583 that contains integer revisions. |
584 that contains integer revisions. |
584 ''' |
585 ''' |
585 expr = revsetlang.formatspec(expr, *args) |
586 expr = revsetlang.formatspec(expr, *args) |
595 Revset aliases from the configuration are not expanded. To expand |
596 Revset aliases from the configuration are not expanded. To expand |
596 user aliases, consider calling ``scmutil.revrange()``. |
597 user aliases, consider calling ``scmutil.revrange()``. |
597 ''' |
598 ''' |
598 for r in self.revs(expr, *args): |
599 for r in self.revs(expr, *args): |
599 yield self[r] |
600 yield self[r] |
|
601 |
|
602 def anyrevs(self, specs, user=False): |
|
603 '''Find revisions matching one of the given revsets. |
|
604 |
|
605 Revset aliases from the configuration are not expanded by default. To |
|
606 expand user aliases, specify ``user=True``. |
|
607 ''' |
|
608 if user: |
|
609 m = revset.matchany(self.ui, specs, repo=self) |
|
610 else: |
|
611 m = revset.matchany(None, specs) |
|
612 return m(self) |
600 |
613 |
601 def url(self): |
614 def url(self): |
602 return 'file:' + self.root |
615 return 'file:' + self.root |
603 |
616 |
604 def hook(self, name, throw=False, **args): |
617 def hook(self, name, throw=False, **args): |