obsolete: extract the part of _readmarkers specific to format version 0
If we are to introduce new formats we need to be able call different
functions for different formats. Creating a function for format
version 0 is the first step.
--- a/mercurial/obsolete.py Mon Aug 25 14:56:15 2014 +0200
+++ b/mercurial/obsolete.py Mon Aug 25 14:58:11 2014 +0200
@@ -145,7 +145,10 @@
if diskversion != _fm0version:
raise util.Abort(_('parsing obsolete marker: unknown version %r')
% diskversion)
+ return _fm0readmarkers(data, off)
+def _fm0readmarkers(data, off=0):
+ """Read and enumerate markers from raw data in format version 0"""
# Loop on markers
l = len(data)
while off + _fm0fsize <= l: