Mercurial > hg
comparison mercurial/obsolete.py @ 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 |
comparison
equal
deleted
inserted
replaced
23790:48284b8f6073 | 23791:2e58b062aa35 |
---|---|
291 while off + _fm1fsize <= l: | 291 while off + _fm1fsize <= l: |
292 # read fixed part | 292 # read fixed part |
293 fixeddata = _unpack(_fm1fixed, data[off:off + _fm1fsize]) | 293 fixeddata = _unpack(_fm1fixed, data[off:off + _fm1fsize]) |
294 off += _fm1fsize | 294 off += _fm1fsize |
295 ttsize, seconds, tz, flags, numsuc, numpar, nummeta, prec = fixeddata | 295 ttsize, seconds, tz, flags, numsuc, numpar, nummeta, prec = fixeddata |
296 # extract the number of parents information | |
297 if numpar == _fm1parentnone: | |
298 numpar = None | |
299 # build the date tuple (upgrade tz minutes to seconds) | 296 # build the date tuple (upgrade tz minutes to seconds) |
300 date = (seconds, tz * 60) | 297 date = (seconds, tz * 60) |
301 _fm1node = _fm1nodesha1 | 298 _fm1node = _fm1nodesha1 |
302 fnodesize = _fm1nodesha1size | 299 fnodesize = _fm1nodesha1size |
303 if flags & usingsha256: | 300 if flags & usingsha256: |
308 if numsuc: | 305 if numsuc: |
309 s = (fnodesize * numsuc) | 306 s = (fnodesize * numsuc) |
310 sucs = _unpack(_fm1node * numsuc, data[off:off + s]) | 307 sucs = _unpack(_fm1node * numsuc, data[off:off + s]) |
311 off += s | 308 off += s |
312 # read parents | 309 # read parents |
313 if numpar is None: | 310 if numpar == _fm1parentnone: |
314 parents = None | 311 parents = None |
315 elif numpar == 0: | 312 elif numpar == 0: |
316 parents = () | 313 parents = () |
317 elif numpar: # neither None nor zero | 314 elif numpar: # neither None nor zero |
318 s = (fnodesize * numpar) | 315 s = (fnodesize * numpar) |