diff mercurial/hg.py @ 15355:dbdb777502dc stable

consistency: use util.realpath instead of os.path.realpath where useful exceptions: hg: os.path.realpath used before util can be imported tests/run-tests.py: may not import mercurial modules
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 24 Oct 2011 13:51:24 +0200
parents 193e7018dc8c
children c519cd8f0169
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Oct 24 13:54:59 2011 +0200
+++ b/mercurial/hg.py	Mon Oct 24 13:51:24 2011 +0200
@@ -130,7 +130,7 @@
 
     sharedpath = srcrepo.sharedpath # if our source is already sharing
 
-    root = os.path.realpath(dest)
+    root = util.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 = os.path.realpath(os.path.join(dest, ".hg"))
+            hgdir = util.realpath(os.path.join(dest, ".hg"))
             if not os.path.exists(dest):
                 os.mkdir(dest)
             else: