##// END OF EJS Templates
localrepo: improve docstring for revset methods...
Gregory Szorc -
r27071:dfb31eeb default
parent child Browse files
Show More
@@ -517,15 +517,23 b' class localrepository(object):'
517 return iter(self.changelog)
517 return iter(self.changelog)
518
518
519 def revs(self, expr, *args):
519 def revs(self, expr, *args):
520 '''Return a list of revisions matching the given revset'''
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 expr = revset.formatspec(expr, *args)
528 expr = revset.formatspec(expr, *args)
522 m = revset.match(None, expr)
529 m = revset.match(None, expr)
523 return m(self)
530 return m(self)
524
531
525 def set(self, expr, *args):
532 def set(self, expr, *args):
526 '''
533 '''Find revisions matching a revset and emit changectx instances.
527 Yield a context for each matching revision, after doing arg
534
528 replacement via revset.formatspec
535 This is a convenience wrapper around ``revs()`` that iterates the
536 result and is a generator of changectx instances.
529 '''
537 '''
530 for r in self.revs(expr, *args):
538 for r in self.revs(expr, *args):
531 yield self[r]
539 yield self[r]
General Comments 0
You need to be logged in to leave comments. Login now