readmarkers: combine parent conditionals
authorMatt Mackall <mpm@selenic.com>
Sat, 10 Jan 2015 21:25:07 -0600
changeset 23791 2e58b062aa35
parent 23790 48284b8f6073
child 23792 db3bc2bcb689
readmarkers: combine parent conditionals
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Sat Jan 10 21:24:45 2015 -0600
+++ b/mercurial/obsolete.py	Sat Jan 10 21:25:07 2015 -0600
@@ -293,9 +293,6 @@
         fixeddata = _unpack(_fm1fixed, data[off:off + _fm1fsize])
         off += _fm1fsize
         ttsize, seconds, tz, flags, numsuc, numpar, nummeta, prec = fixeddata
-        # extract the number of parents information
-        if numpar == _fm1parentnone:
-            numpar = None
         # build the date tuple (upgrade tz minutes to seconds)
         date = (seconds, tz * 60)
         _fm1node = _fm1nodesha1
@@ -310,7 +307,7 @@
             sucs = _unpack(_fm1node * numsuc, data[off:off + s])
             off += s
         # read parents
-        if numpar is None:
+        if numpar == _fm1parentnone:
             parents = None
         elif numpar == 0:
             parents = ()