changeset 23791:2e58b062aa35

readmarkers: combine parent conditionals
author Matt Mackall <mpm@selenic.com>
date Sat, 10 Jan 2015 21:25:07 -0600
parents 48284b8f6073
children db3bc2bcb689
files mercurial/obsolete.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 = ()