Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 30620:bb77654dc7ae
py3: replace os.sep with pycompat.ossep (part 3 of 4)
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 17 Dec 2016 20:14:24 +0530 |
parents | c01033fb9864 |
children | 5289fd78017a |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Dec 17 20:02:50 2016 +0530 +++ b/mercurial/cmdutil.py Sat Dec 17 20:14:24 2016 +0530 @@ -731,7 +731,7 @@ else: striplen = len(abspfx) if striplen: - striplen += len(os.sep) + striplen += len(pycompat.ossep) res = lambda p: os.path.join(dest, util.localpath(p)[striplen:]) elif destdirexists: res = lambda p: os.path.join(dest, @@ -765,12 +765,12 @@ abspfx = util.localpath(abspfx) striplen = len(abspfx) if striplen: - striplen += len(os.sep) + striplen += len(pycompat.ossep) if os.path.isdir(os.path.join(dest, os.path.split(abspfx)[1])): score = evalpath(striplen) striplen1 = len(os.path.split(abspfx)[0]) if striplen1: - striplen1 += len(os.sep) + striplen1 += len(pycompat.ossep) if evalpath(striplen1) > score: striplen = striplen1 res = lambda p: os.path.join(dest,