--- a/mercurial/obsolete.py Thu Jun 07 19:19:58 2012 +0200
+++ b/mercurial/obsolete.py Mon Jun 04 00:50:19 2012 +0200
@@ -163,6 +163,9 @@
self.precursors = {}
self.successors = {}
+ def __iter__(self):
+ return iter(self._all)
+
def create(self, prec, succs=(), flag=0, metadata=None):
"""obsolete: add a new obsolete marker
@@ -218,3 +221,11 @@
data.extend(sucs)
stream.write(_pack(format, *data))
stream.write(metadata)
+
+
+
+def allmarkers(repo):
+ """all obsolete markers known in a repository"""
+ for markerdata in repo.obsstore:
+ yield marker(repo, markerdata)
+