##// END OF EJS Templates
chgserver: update the umask cache before each run...
Pulkit Goyal -
r45119:d3797538 default
parent child Browse files
Show More
@@ -528,7 +528,7 b' class chgcmdserver(commandserver.server)'
528 def _setumask(self, data):
528 def _setumask(self, data):
529 mask = struct.unpack(b'>I', data)[0]
529 mask = struct.unpack(b'>I', data)[0]
530 self.ui.log(b'chgserver', b'setumask %r\n', mask)
530 self.ui.log(b'chgserver', b'setumask %r\n', mask)
531 os.umask(mask)
531 util.setumask(mask)
532
532
533 def runcommand(self):
533 def runcommand(self):
534 # pager may be attached within the runcommand session, which should
534 # pager may be attached within the runcommand session, which should
@@ -130,6 +130,16 b' umask = platform.umask'
130 unlink = platform.unlink
130 unlink = platform.unlink
131 username = platform.username
131 username = platform.username
132
132
133
134 def setumask(val):
135 ''' updates the umask. used by chg server '''
136 if pycompat.iswindows:
137 return
138 os.umask(val)
139 global umask
140 platform.umask = umask = val & 0o777
141
142
133 # small compat layer
143 # small compat layer
134 compengines = compression.compengines
144 compengines = compression.compengines
135 SERVERROLE = compression.SERVERROLE
145 SERVERROLE = compression.SERVERROLE
General Comments 0
You need to be logged in to leave comments. Login now