From patchwork Sat Mar 2 02:05:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6040: py3: port things from chgserver.py From: phabricator X-Patchwork-Id: 38988 Message-Id: <64c56f0d37f94c0f50799fbe15602781@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sat, 2 Mar 2019 02:05:19 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGbce2356ece68: py3: port things from chgserver.py (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6040?vs=14283&id=14287 REVISION DETAIL https://phab.mercurial-scm.org/D6040 AFFECTED FILES mercurial/chgserver.py CHANGE DETAILS To: pulkit, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py --- a/mercurial/chgserver.py +++ b/mercurial/chgserver.py @@ -64,11 +64,12 @@ from .utils import ( procutil, + stringutil, ) def _hashlist(items): """return sha1 hexdigest for a list""" - return node.hex(hashlib.sha1(str(items)).digest()) + return node.hex(hashlib.sha1(stringutil.pprint(items)).digest()) # sensitive config sections affecting confighash _configsections = [ @@ -83,7 +84,7 @@ ] # sensitive environment variables affecting confighash -_envre = re.compile(r'''\A(?: +_envre = re.compile(br'''\A(?: CHGHG |HG(?:DEMANDIMPORT|EMITWARNINGS|MODULEPOLICY|PROF|RCPATH)? |HG(?:ENCODING|PLAIN).* @@ -449,7 +450,7 @@ if newhash.confighash != self.hashstate.confighash: addr = _hashaddress(self.baseaddress, newhash.confighash) insts.append('redirect %s' % addr) - self.ui.log('chgserver', 'validate: %s\n', insts) + self.ui.log('chgserver', 'validate: %s\n', stringutil.pprint(insts)) self.cresult.write('\0'.join(insts) or '\0') def chdir(self):