Patchwork [1,of,8,faster-obsmarkers] obsolete: make optional offset parameter to fm*readmarkers required

login
register
mail settings
Submitter Augie Fackler
Date Feb. 2, 2015, 4:01 p.m.
Message ID <a981174fee88c5277944.1422892882@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7596/
State Superseded
Headers show

Comments

Augie Fackler - Feb. 2, 2015, 4:01 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1421764702 18000
#      Tue Jan 20 09:38:22 2015 -0500
# Branch stable
# Node ID a981174fee88c527794466a487ff07a46c329512
# Parent  3667bc21b8773715d9472a3b4e034b77e62c6451
obsolete: make optional offset parameter to fm*readmarkers required

It was always passed by the only callsite, so just make it required.

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -146,7 +146,7 @@  usingsha256 = 2
 _fm0fsize = _calcsize(_fm0fixed)
 _fm0fnodesize = _calcsize(_fm0node)
 
-def _fm0readmarkers(data, off=0):
+def _fm0readmarkers(data, off):
     # Loop on markers
     l = len(data)
     while off + _fm0fsize <= l:
@@ -285,7 +285,7 @@  def _fm0decodemeta(data):
 _fm1metapair = 'BB'
 _fm1metapairsize = _calcsize('BB')
 
-def _fm1readmarkers(data, off=0):
+def _fm1readmarkers(data, off):
     # make some global constants local for performance
     noneflag = _fm1parentnone
     sha2flag = usingsha256