backout dbdb777502dc (issue3077) (issue3071) stable
authorMatt Mackall <mpm@selenic.com>
Sat, 29 Oct 2011 11:02:23 -0500
branchstable
changeset 15381 c519cd8f0169
parent 15380 a53888685a6c
child 15382 b59e6b1e0c95
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.
contrib/shrink-revlog.py
hgext/convert/darcs.py
hgext/convert/gnuarch.py
hgext/convert/subversion.py
mercurial/commands.py
mercurial/hg.py
mercurial/localrepo.py
mercurial/simplemerge.py
tests/test-hgwebdir-paths.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, '
--- 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 = {}
--- 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
--- 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')):
--- 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'
--- 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:
--- 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)
--- 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)
--- 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)