Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/chgserver.py @ 47623:227bbb078c2c
windows: use abspath in chgserver
We replace `os.path.abspath` with `util.abspath`. This should solve more "drive
capitalization" issue on Windows.
Differential Revision: https://phab.mercurial-scm.org/D11060
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 10 Jul 2021 14:05:38 +0200 |
parents | 7a769ac49637 |
children | 7caaefa48794 |
comparison
equal
deleted
inserted
replaced
47622:bb917eea1605 | 47623:227bbb078c2c |
---|---|
318 self.in_ = in_ | 318 self.in_ = in_ |
319 self.out = out | 319 self.out = out |
320 self.channel = channel | 320 self.channel = channel |
321 | 321 |
322 def __call__(self, cmd, environ, cwd=None, type=b'system', cmdtable=None): | 322 def __call__(self, cmd, environ, cwd=None, type=b'system', cmdtable=None): |
323 args = [type, cmd, os.path.abspath(cwd or b'.')] | 323 args = [type, cmd, util.abspath(cwd or b'.')] |
324 args.extend(b'%s=%s' % (k, v) for k, v in pycompat.iteritems(environ)) | 324 args.extend(b'%s=%s' % (k, v) for k, v in pycompat.iteritems(environ)) |
325 data = b'\0'.join(args) | 325 data = b'\0'.join(args) |
326 self.out.write(struct.pack(b'>cI', self.channel, len(data))) | 326 self.out.write(struct.pack(b'>cI', self.channel, len(data))) |
327 self.out.write(data) | 327 self.out.write(data) |
328 self.out.flush() | 328 self.out.flush() |