equal
deleted
inserted
replaced
287 if not path: |
287 if not path: |
288 return |
288 return |
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 |
295 If pager isn't enabled, this writes '\0' because channeledoutput |
301 If pager isn't enabled, this writes '\0' because channeledoutput |
296 does not allow to write empty data. |
302 does not allow to write empty data. |
339 |
345 |
340 capabilities = commandserver.server.capabilities.copy() |
346 capabilities = commandserver.server.capabilities.copy() |
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): |
348 def handle(self): |
355 def handle(self): |
349 # use a different process group from the master process, making this |
356 # use a different process group from the master process, making this |