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

login
register
mail settings
Submitter Augie Fackler
Date Feb. 3, 2015, 6:31 p.m.
Message ID <5e1e659995943100cfaf.1422988269@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7638/
State Accepted
Commit 7d9367de2654b9bfec0a099273474a65ec88caea
Headers show

Comments

Augie Fackler - Feb. 3, 2015, 6:31 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1421764702 18000
#      Tue Jan 20 09:38:22 2015 -0500
# Node ID 5e1e659995943100cfaf76135f8df2b43bfe05ce
# Parent  663686acc4153e7d26eb88dd5d675543df69abf4
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