obsstore: have the `mergemarkers` method return the number of new markers
The mergemarkers function now returns the number of unknown markers in
the stream that have been added to the obsstore. This is similar to what
`obsstore.add` already does.
The method gains a docstring in the process.
--- a/mercurial/obsolete.py Thu Aug 21 17:36:05 2014 -0700
+++ b/mercurial/obsolete.py Thu Aug 21 17:42:50 2014 -0700
@@ -369,8 +369,11 @@
return len(new)
def mergemarkers(self, transaction, data):
+ """merge a binary stream of markers inside the obsstore
+
+ Returns the number of new markers added."""
markers = _readmarkers(data)
- self.add(transaction, markers)
+ return self.add(transaction, markers)
def _load(self, markers):
for mark in markers: