--- a/hgext/record.py Sun Jan 23 15:21:37 2011 +0100
+++ b/hgext/record.py Sun Jan 23 15:21:56 2011 +0100
@@ -81,9 +81,7 @@
self.hunks = []
def binary(self):
- for h in self.header:
- if h.startswith('index '):
- return True
+ return util.any(h.startswith('index ') for h in self.header)
def pretty(self, fp):
for h in self.header:
@@ -106,9 +104,7 @@
fp.write(''.join(self.header))
def allhunks(self):
- for h in self.header:
- if self.allhunks_re.match(h):
- return True
+ return util.any(self.allhunks_re.match(h) for h in self.header)
def files(self):
match = self.diffgit_re.match(self.header[0])
@@ -127,9 +123,7 @@
return '<header %s>' % (' '.join(map(repr, self.files())))
def special(self):
- for h in self.header:
- if self.special_re.match(h):
- return True
+ return util.any(self.special_re.match(h) for h in self.header)
def countchanges(hunk):
"""hunk -> (n+,n-)"""