Show More
@@ -517,15 +517,23 b' class localrepository(object):' | |||
|
517 | 517 | return iter(self.changelog) |
|
518 | 518 | |
|
519 | 519 | def revs(self, expr, *args): |
|
520 |
''' |
|
|
520 | '''Find revisions matching a revset. | |
|
521 | ||
|
522 | The revset is specified as a string ``expr`` that may contain | |
|
523 | %-formatting to escape certain types. See ``revset.formatspec``. | |
|
524 | ||
|
525 | Return a revset.abstractsmartset, which is a list-like interface | |
|
526 | that contains integer revisions. | |
|
527 | ''' | |
|
521 | 528 | expr = revset.formatspec(expr, *args) |
|
522 | 529 | m = revset.match(None, expr) |
|
523 | 530 | return m(self) |
|
524 | 531 | |
|
525 | 532 | def set(self, expr, *args): |
|
526 | ''' | |
|
527 | Yield a context for each matching revision, after doing arg | |
|
528 | replacement via revset.formatspec | |
|
533 | '''Find revisions matching a revset and emit changectx instances. | |
|
534 | ||
|
535 | This is a convenience wrapper around ``revs()`` that iterates the | |
|
536 | result and is a generator of changectx instances. | |
|
529 | 537 | ''' |
|
530 | 538 | for r in self.revs(expr, *args): |
|
531 | 539 | yield self[r] |
General Comments 0
You need to be logged in to leave comments.
Login now