##// END OF EJS Templates
revset: added lazyset implementation to grep revset...
Lucas Moscovicz -
r20453:6aa7dcae default
parent child Browse files
Show More
@@ -800,14 +800,15 b' def grep(repo, subset, x):'
800 800 gr = re.compile(getstring(x, _("grep requires a string")))
801 801 except re.error, e:
802 802 raise error.ParseError(_('invalid match pattern: %s') % e)
803 l = []
804 for r in subset:
805 c = repo[r]
803
804 def matches(x):
805 c = repo[x]
806 806 for e in c.files() + [c.user(), c.description()]:
807 807 if gr.search(e):
808 l.append(r)
809 break
810 return baseset(l)
808 return True
809 return False
810
811 return lazyset(subset, matches)
811 812
812 813 def _matchfiles(repo, subset, x):
813 814 # _matchfiles takes a revset list of prefixed arguments:
General Comments 0
You need to be logged in to leave comments. Login now