##// END OF EJS Templates
py3: port things from chgserver.py...
Pulkit Goyal -
r41994:bce2356e default
parent child Browse files
Show More
@@ -64,11 +64,12 from . import (
64
64
65 from .utils import (
65 from .utils import (
66 procutil,
66 procutil,
67 stringutil,
67 )
68 )
68
69
69 def _hashlist(items):
70 def _hashlist(items):
70 """return sha1 hexdigest for a list"""
71 """return sha1 hexdigest for a list"""
71 return node.hex(hashlib.sha1(str(items)).digest())
72 return node.hex(hashlib.sha1(stringutil.pprint(items)).digest())
72
73
73 # sensitive config sections affecting confighash
74 # sensitive config sections affecting confighash
74 _configsections = [
75 _configsections = [
@@ -83,7 +84,7 def _hashlist(items):
83 ]
84 ]
84
85
85 # sensitive environment variables affecting confighash
86 # sensitive environment variables affecting confighash
86 _envre = re.compile(r'''\A(?:
87 _envre = re.compile(br'''\A(?:
87 CHGHG
88 CHGHG
88 |HG(?:DEMANDIMPORT|EMITWARNINGS|MODULEPOLICY|PROF|RCPATH)?
89 |HG(?:DEMANDIMPORT|EMITWARNINGS|MODULEPOLICY|PROF|RCPATH)?
89 |HG(?:ENCODING|PLAIN).*
90 |HG(?:ENCODING|PLAIN).*
@@ -449,7 +450,7 class chgcmdserver(commandserver.server)
449 if newhash.confighash != self.hashstate.confighash:
450 if newhash.confighash != self.hashstate.confighash:
450 addr = _hashaddress(self.baseaddress, newhash.confighash)
451 addr = _hashaddress(self.baseaddress, newhash.confighash)
451 insts.append('redirect %s' % addr)
452 insts.append('redirect %s' % addr)
452 self.ui.log('chgserver', 'validate: %s\n', insts)
453 self.ui.log('chgserver', 'validate: %s\n', stringutil.pprint(insts))
453 self.cresult.write('\0'.join(insts) or '\0')
454 self.cresult.write('\0'.join(insts) or '\0')
454
455
455 def chdir(self):
456 def chdir(self):
General Comments 0
You need to be logged in to leave comments. Login now