##// END OF EJS Templates
chgserver: add setumask method...
Jun Wu -
r28159:d2d04d1d default
parent child Browse files
Show More
@@ -289,6 +289,12 b' class chgcmdserver(commandserver.server)'
289 _log('chdir to %r\n' % path)
289 _log('chdir to %r\n' % path)
290 os.chdir(path)
290 os.chdir(path)
291
291
292 def setumask(self):
293 """Change umask"""
294 mask = struct.unpack('>I', self._read(4))[0]
295 _log('setumask %r\n' % mask)
296 os.umask(mask)
297
292 def getpager(self):
298 def getpager(self):
293 """Read cmdargs and write pager command to r-channel if enabled
299 """Read cmdargs and write pager command to r-channel if enabled
294
300
@@ -341,7 +347,8 b' class chgcmdserver(commandserver.server)'
341 capabilities.update({'attachio': attachio,
347 capabilities.update({'attachio': attachio,
342 'chdir': chdir,
348 'chdir': chdir,
343 'getpager': getpager,
349 'getpager': getpager,
344 'setenv': setenv})
350 'setenv': setenv,
351 'setumask': setumask})
345
352
346 # copied from mercurial/commandserver.py
353 # copied from mercurial/commandserver.py
347 class _requesthandler(SocketServer.StreamRequestHandler):
354 class _requesthandler(SocketServer.StreamRequestHandler):
General Comments 0
You need to be logged in to leave comments. Login now