Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/chgserver.py @ 30649:2bb8c53be961
chgserver: override runcommand
Next patches will customize chgserver's runcommand. So let's override it.
The docstring is temporarily missing and will be filled later.
author | Jun Wu <quark@fb.com> |
---|---|
date | Fri, 16 Dec 2016 14:48:37 +0000 |
parents | dfb19aed409e |
children | a3f335d1247c |
comparison
equal
deleted
inserted
replaced
30648:dfb19aed409e | 30649:2bb8c53be961 |
---|---|
502 signal.signal(signal.SIGPIPE, signal.SIG_DFL) | 502 signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
503 self.cresult.write(pagercmd) | 503 self.cresult.write(pagercmd) |
504 else: | 504 else: |
505 self.cresult.write('\0') | 505 self.cresult.write('\0') |
506 | 506 |
507 def runcommand(self): | |
508 return super(chgcmdserver, self).runcommand() | |
509 | |
507 def setenv(self): | 510 def setenv(self): |
508 """Clear and update os.environ | 511 """Clear and update os.environ |
509 | 512 |
510 Note that not all variables can make an effect on the running process. | 513 Note that not all variables can make an effect on the running process. |
511 """ | 514 """ |
520 | 523 |
521 capabilities = commandserver.server.capabilities.copy() | 524 capabilities = commandserver.server.capabilities.copy() |
522 capabilities.update({'attachio': attachio, | 525 capabilities.update({'attachio': attachio, |
523 'chdir': chdir, | 526 'chdir': chdir, |
524 'getpager': getpager, | 527 'getpager': getpager, |
528 'runcommand': runcommand, | |
525 'setenv': setenv, | 529 'setenv': setenv, |
526 'setumask': setumask}) | 530 'setumask': setumask}) |
527 | 531 |
528 def _tempaddress(address): | 532 def _tempaddress(address): |
529 return '%s.%d.tmp' % (address, os.getpid()) | 533 return '%s.%d.tmp' % (address, os.getpid()) |