# HG changeset patch # User Matt Mackall # Date 1319904143 18000 # Node ID c519cd8f0169f530eea221837bbce9fce8e46be3 # Parent a53888685a6cf3f203caa3a92083f2a80ca66dfe backout dbdb777502dc (issue3077) (issue3071) Using util.realpath turns out to create complex issues on both Mac and Windows. Back this change out for the release. diff -r a53888685a6c -r c519cd8f0169 contrib/shrink-revlog.py --- a/contrib/shrink-revlog.py Fri Oct 28 15:00:21 2011 +0200 +++ b/contrib/shrink-revlog.py Sat Oct 29 11:02:23 2011 -0500 @@ -172,7 +172,7 @@ raise util.Abort(_('--revlog option must specify the revlog index ' 'file (*.i), not %s') % opts.get('revlog')) - indexfn = util.realpath(fn) + indexfn = os.path.realpath(fn) store = repo.sjoin('') if not indexfn.startswith(store): raise util.Abort(_('--revlog option must specify a revlog in %s, ' diff -r a53888685a6c -r c519cd8f0169 hgext/convert/darcs.py --- a/hgext/convert/darcs.py Fri Oct 28 15:00:21 2011 +0200 +++ b/hgext/convert/darcs.py Sat Oct 29 11:02:23 2011 -0500 @@ -45,7 +45,7 @@ if ElementTree is None: raise util.Abort(_("Python ElementTree module is not available")) - self.path = util.realpath(path) + self.path = os.path.realpath(path) self.lastrev = None self.changes = {} diff -r a53888685a6c -r c519cd8f0169 hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py Fri Oct 28 15:00:21 2011 +0200 +++ b/hgext/convert/gnuarch.py Sat Oct 29 11:02:23 2011 -0500 @@ -46,7 +46,7 @@ commandline.__init__(self, ui, self.execmd) - self.path = util.realpath(path) + self.path = os.path.realpath(path) self.tmppath = None self.treeversion = None diff -r a53888685a6c -r c519cd8f0169 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Fri Oct 28 15:00:21 2011 +0200 +++ b/hgext/convert/subversion.py Sat Oct 29 11:02:23 2011 -0500 @@ -976,7 +976,7 @@ self.wc = None self.cwd = os.getcwd() - path = util.realpath(path) + path = os.path.realpath(path) created = False if os.path.isfile(os.path.join(path, '.svn', 'entries')): diff -r a53888685a6c -r c519cd8f0169 mercurial/commands.py --- a/mercurial/commands.py Fri Oct 28 15:00:21 2011 +0200 +++ b/mercurial/commands.py Sat Oct 29 11:02:23 2011 -0500 @@ -344,7 +344,7 @@ raise util.Abort(_('no working directory: please specify a revision')) node = ctx.node() dest = cmdutil.makefilename(repo, dest, node) - if util.realpath(dest) == repo.root: + if os.path.realpath(dest) == repo.root: raise util.Abort(_('repository root cannot be destination')) kind = opts.get('type') or archival.guesskind(dest) or 'files' diff -r a53888685a6c -r c519cd8f0169 mercurial/hg.py --- a/mercurial/hg.py Fri Oct 28 15:00:21 2011 +0200 +++ b/mercurial/hg.py Sat Oct 29 11:02:23 2011 -0500 @@ -130,7 +130,7 @@ sharedpath = srcrepo.sharedpath # if our source is already sharing - root = util.realpath(dest) + root = os.path.realpath(dest) roothg = os.path.join(root, '.hg') if os.path.exists(roothg): @@ -301,7 +301,7 @@ if copy: srcrepo.hook('preoutgoing', throw=True, source='clone') - hgdir = util.realpath(os.path.join(dest, ".hg")) + hgdir = os.path.realpath(os.path.join(dest, ".hg")) if not os.path.exists(dest): os.mkdir(dest) else: diff -r a53888685a6c -r c519cd8f0169 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Oct 28 15:00:21 2011 +0200 +++ b/mercurial/localrepo.py Sat Oct 29 11:02:23 2011 -0500 @@ -28,7 +28,7 @@ def __init__(self, baseui, path=None, create=False): repo.repository.__init__(self) - self.root = util.realpath(util.expandpath(path)) + self.root = os.path.realpath(util.expandpath(path)) self.path = os.path.join(self.root, ".hg") self.origroot = path self.auditor = scmutil.pathauditor(self.root, self._checknested) @@ -79,7 +79,7 @@ self.sharedpath = self.path try: - s = util.realpath(self.opener.read("sharedpath").rstrip('\n')) + s = os.path.realpath(self.opener.read("sharedpath").rstrip('\n')) if not os.path.exists(s): raise error.RepoError( _('.hg/sharedpath points to nonexistent directory %s') % s) diff -r a53888685a6c -r c519cd8f0169 mercurial/simplemerge.py --- a/mercurial/simplemerge.py Fri Oct 28 15:00:21 2011 +0200 +++ b/mercurial/simplemerge.py Sat Oct 29 11:02:23 2011 -0500 @@ -430,7 +430,7 @@ except util.Abort: return 1 - local = util.realpath(local) + local = os.path.realpath(local) if not opts.get('print'): opener = scmutil.opener(os.path.dirname(local)) out = opener(os.path.basename(local), "w", atomictemp=True) diff -r a53888685a6c -r c519cd8f0169 tests/test-hgwebdir-paths.py --- a/tests/test-hgwebdir-paths.py Fri Oct 28 15:00:21 2011 +0200 +++ b/tests/test-hgwebdir-paths.py Sat Oct 29 11:02:23 2011 -0500 @@ -1,11 +1,11 @@ import os -from mercurial import hg, ui, util +from mercurial import hg, ui from mercurial.hgweb.hgwebdir_mod import hgwebdir os.mkdir('webdir') os.chdir('webdir') -webdir = util.realpath('.') +webdir = os.path.realpath('.') u = ui.ui() hg.repository(u, 'a', create=1)