Show More
@@ -134,9 +134,15 b' class changelog(revlog.revlog):' | |||||
134 |
|
134 | |||
135 | def __iter__(self): |
|
135 | def __iter__(self): | |
136 | """filtered version of revlog.__iter__""" |
|
136 | """filtered version of revlog.__iter__""" | |
137 | for i in xrange(len(self)): |
|
137 | if len(self.filteredrevs) == 0: | |
138 | if i not in self.filteredrevs: |
|
138 | return revlog.revlog.__iter__(self) | |
139 | yield i |
|
139 | ||
|
140 | def filterediter(): | |||
|
141 | for i in xrange(len(self)): | |||
|
142 | if i not in self.filteredrevs: | |||
|
143 | yield i | |||
|
144 | ||||
|
145 | return filterediter() | |||
140 |
|
146 | |||
141 | def revs(self, start=0, stop=None): |
|
147 | def revs(self, start=0, stop=None): | |
142 | """filtered version of revlog.revs""" |
|
148 | """filtered version of revlog.revs""" |
@@ -254,8 +254,7 b' class revlog(object):' | |||||
254 | def __len__(self): |
|
254 | def __len__(self): | |
255 | return len(self.index) - 1 |
|
255 | return len(self.index) - 1 | |
256 | def __iter__(self): |
|
256 | def __iter__(self): | |
257 |
|
|
257 | return iter(xrange(len(self))) | |
258 | yield i |
|
|||
259 | def revs(self, start=0, stop=None): |
|
258 | def revs(self, start=0, stop=None): | |
260 | """iterate over all rev in this revlog (from start to stop)""" |
|
259 | """iterate over all rev in this revlog (from start to stop)""" | |
261 | if stop is None: |
|
260 | if stop is None: |
General Comments 0
You need to be logged in to leave comments.
Login now