[PATCH 2 of 4] obsolete: use the `version` argument in encodemarkers
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Sep 16 21:28:32 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1410908198 25200
# Tue Sep 16 15:56:38 2014 -0700
# Node ID 774185befa92282889671bdd470844ffa7d6efa7
# Parent d5f9d5cb72e220cc89661dbe08afd9b13436c1df
obsolete: use the `version` argument in encodemarkers
Recent scientific studies show that assigning a variable have no effect on
unrelated constant. We therefore use the variable where we intended to in the
first place.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -225,11 +225,11 @@ def _readmarkers(data):
def encodemarkers(markers, addheader=False, version=_fm0version):
# Kept separate from flushmarkers(), it will be reused for
# markers exchange.
encodeone = formats[version][1]
if addheader:
- yield _pack('>B', _fm0version)
+ yield _pack('>B', version)
for marker in markers:
yield encodeone(marker)
def encodemeta(meta):
More information about the Mercurial-devel
mailing list