comparison hgext/convert/cvs.py @ 39818:24e493ec2229

py3: rename pycompat.getcwd() to encoding.getcwd() (API) We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we need encoding.strtolocal() to encode the result of os.getcwd().
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 21 Sep 2018 19:48:23 -0400
parents 34758397ad1b
children 876494fd967d
comparison
equal deleted inserted replaced
39817:94c25f694ec3 39818:24e493ec2229
13 13
14 from mercurial.i18n import _ 14 from mercurial.i18n import _
15 from mercurial import ( 15 from mercurial import (
16 encoding, 16 encoding,
17 error, 17 error,
18 pycompat,
19 util, 18 util,
20 ) 19 )
21 from mercurial.utils import ( 20 from mercurial.utils import (
22 dateutil, 21 dateutil,
23 procutil, 22 procutil,
72 maxrev = int(self.revs[0]) 71 maxrev = int(self.revs[0])
73 except ValueError: 72 except ValueError:
74 raise error.Abort(_('revision %s is not a patchset number') 73 raise error.Abort(_('revision %s is not a patchset number')
75 % self.revs[0]) 74 % self.revs[0])
76 75
77 d = pycompat.getcwd() 76 d = encoding.getcwd()
78 try: 77 try:
79 os.chdir(self.path) 78 os.chdir(self.path)
80 id = None 79 id = None
81 80
82 cache = 'update' 81 cache = 'update'