##// END OF EJS Templates
obsolete: add easy way to iterate over obsolete marker object
Pierre-Yves.David@ens-lyon.org -
r17073:3a79a568 default
parent child Browse files
Show More
@@ -163,6 +163,9 b' class obsstore(object):'
163 self.precursors = {}
163 self.precursors = {}
164 self.successors = {}
164 self.successors = {}
165
165
166 def __iter__(self):
167 return iter(self._all)
168
166 def create(self, prec, succs=(), flag=0, metadata=None):
169 def create(self, prec, succs=(), flag=0, metadata=None):
167 """obsolete: add a new obsolete marker
170 """obsolete: add a new obsolete marker
168
171
@@ -218,3 +221,11 b' class obsstore(object):'
218 data.extend(sucs)
221 data.extend(sucs)
219 stream.write(_pack(format, *data))
222 stream.write(_pack(format, *data))
220 stream.write(metadata)
223 stream.write(metadata)
224
225
226
227 def allmarkers(repo):
228 """all obsolete markers known in a repository"""
229 for markerdata in repo.obsstore:
230 yield marker(repo, markerdata)
231
General Comments 0
You need to be logged in to leave comments. Login now