Commit 190c72ee authored by Matt Mackall's avatar Matt Mackall
Browse files

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.

--HG--
branch : stable
parent a53888685a6c
......@@ -172,7 +172,7 @@ def shrink(ui, repo, **opts):
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, '
......
......@@ -45,7 +45,7 @@ class darcs_source(converter_source, commandline):
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 = {}
......
......@@ -46,7 +46,7 @@ class gnuarch_source(converter_source, commandline):
commandline.__init__(self, ui, self.execmd)
self.path = util.realpath(path)
self.path = os.path.realpath(path)
self.tmppath = None
self.treeversion = None
......
......@@ -976,7 +976,7 @@ class svn_sink(converter_sink, commandline):
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')):
......
......@@ -344,7 +344,7 @@ def archive(ui, repo, dest, **opts):
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'
......
......@@ -130,7 +130,7 @@ def share(ui, source, dest=None, update=True):
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 @@ def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
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:
......
......@@ -28,7 +28,7 @@ class localrepository(repo.repository):
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 @@ class localrepository(repo.repository):
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)
......
......@@ -430,7 +430,7 @@ def simplemerge(ui, local, base, other, **opts):
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)
......
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment