##// END OF EJS Templates
backout dbdb777502dc (issue3077) (issue3071)...
Matt Mackall -
r15381:c519cd8f stable
parent child Browse files
Show More
@@ -172,7 +172,7 b' def shrink(ui, repo, **opts):'
172 raise util.Abort(_('--revlog option must specify the revlog index '
172 raise util.Abort(_('--revlog option must specify the revlog index '
173 'file (*.i), not %s') % opts.get('revlog'))
173 'file (*.i), not %s') % opts.get('revlog'))
174
174
175 indexfn = util.realpath(fn)
175 indexfn = os.path.realpath(fn)
176 store = repo.sjoin('')
176 store = repo.sjoin('')
177 if not indexfn.startswith(store):
177 if not indexfn.startswith(store):
178 raise util.Abort(_('--revlog option must specify a revlog in %s, '
178 raise util.Abort(_('--revlog option must specify a revlog in %s, '
@@ -45,7 +45,7 b' class darcs_source(converter_source, com'
45 if ElementTree is None:
45 if ElementTree is None:
46 raise util.Abort(_("Python ElementTree module is not available"))
46 raise util.Abort(_("Python ElementTree module is not available"))
47
47
48 self.path = util.realpath(path)
48 self.path = os.path.realpath(path)
49
49
50 self.lastrev = None
50 self.lastrev = None
51 self.changes = {}
51 self.changes = {}
@@ -46,7 +46,7 b' class gnuarch_source(converter_source, c'
46
46
47 commandline.__init__(self, ui, self.execmd)
47 commandline.__init__(self, ui, self.execmd)
48
48
49 self.path = util.realpath(path)
49 self.path = os.path.realpath(path)
50 self.tmppath = None
50 self.tmppath = None
51
51
52 self.treeversion = None
52 self.treeversion = None
@@ -976,7 +976,7 b' class svn_sink(converter_sink, commandli'
976 self.wc = None
976 self.wc = None
977 self.cwd = os.getcwd()
977 self.cwd = os.getcwd()
978
978
979 path = util.realpath(path)
979 path = os.path.realpath(path)
980
980
981 created = False
981 created = False
982 if os.path.isfile(os.path.join(path, '.svn', 'entries')):
982 if os.path.isfile(os.path.join(path, '.svn', 'entries')):
@@ -344,7 +344,7 b' def archive(ui, repo, dest, **opts):'
344 raise util.Abort(_('no working directory: please specify a revision'))
344 raise util.Abort(_('no working directory: please specify a revision'))
345 node = ctx.node()
345 node = ctx.node()
346 dest = cmdutil.makefilename(repo, dest, node)
346 dest = cmdutil.makefilename(repo, dest, node)
347 if util.realpath(dest) == repo.root:
347 if os.path.realpath(dest) == repo.root:
348 raise util.Abort(_('repository root cannot be destination'))
348 raise util.Abort(_('repository root cannot be destination'))
349
349
350 kind = opts.get('type') or archival.guesskind(dest) or 'files'
350 kind = opts.get('type') or archival.guesskind(dest) or 'files'
@@ -130,7 +130,7 b' def share(ui, source, dest=None, update='
130
130
131 sharedpath = srcrepo.sharedpath # if our source is already sharing
131 sharedpath = srcrepo.sharedpath # if our source is already sharing
132
132
133 root = util.realpath(dest)
133 root = os.path.realpath(dest)
134 roothg = os.path.join(root, '.hg')
134 roothg = os.path.join(root, '.hg')
135
135
136 if os.path.exists(roothg):
136 if os.path.exists(roothg):
@@ -301,7 +301,7 b' def clone(ui, peeropts, source, dest=Non'
301
301
302 if copy:
302 if copy:
303 srcrepo.hook('preoutgoing', throw=True, source='clone')
303 srcrepo.hook('preoutgoing', throw=True, source='clone')
304 hgdir = util.realpath(os.path.join(dest, ".hg"))
304 hgdir = os.path.realpath(os.path.join(dest, ".hg"))
305 if not os.path.exists(dest):
305 if not os.path.exists(dest):
306 os.mkdir(dest)
306 os.mkdir(dest)
307 else:
307 else:
@@ -28,7 +28,7 b' class localrepository(repo.repository):'
28
28
29 def __init__(self, baseui, path=None, create=False):
29 def __init__(self, baseui, path=None, create=False):
30 repo.repository.__init__(self)
30 repo.repository.__init__(self)
31 self.root = util.realpath(util.expandpath(path))
31 self.root = os.path.realpath(util.expandpath(path))
32 self.path = os.path.join(self.root, ".hg")
32 self.path = os.path.join(self.root, ".hg")
33 self.origroot = path
33 self.origroot = path
34 self.auditor = scmutil.pathauditor(self.root, self._checknested)
34 self.auditor = scmutil.pathauditor(self.root, self._checknested)
@@ -79,7 +79,7 b' class localrepository(repo.repository):'
79
79
80 self.sharedpath = self.path
80 self.sharedpath = self.path
81 try:
81 try:
82 s = util.realpath(self.opener.read("sharedpath").rstrip('\n'))
82 s = os.path.realpath(self.opener.read("sharedpath").rstrip('\n'))
83 if not os.path.exists(s):
83 if not os.path.exists(s):
84 raise error.RepoError(
84 raise error.RepoError(
85 _('.hg/sharedpath points to nonexistent directory %s') % s)
85 _('.hg/sharedpath points to nonexistent directory %s') % s)
@@ -430,7 +430,7 b' def simplemerge(ui, local, base, other, '
430 except util.Abort:
430 except util.Abort:
431 return 1
431 return 1
432
432
433 local = util.realpath(local)
433 local = os.path.realpath(local)
434 if not opts.get('print'):
434 if not opts.get('print'):
435 opener = scmutil.opener(os.path.dirname(local))
435 opener = scmutil.opener(os.path.dirname(local))
436 out = opener(os.path.basename(local), "w", atomictemp=True)
436 out = opener(os.path.basename(local), "w", atomictemp=True)
@@ -1,11 +1,11 b''
1 import os
1 import os
2 from mercurial import hg, ui, util
2 from mercurial import hg, ui
3 from mercurial.hgweb.hgwebdir_mod import hgwebdir
3 from mercurial.hgweb.hgwebdir_mod import hgwebdir
4
4
5 os.mkdir('webdir')
5 os.mkdir('webdir')
6 os.chdir('webdir')
6 os.chdir('webdir')
7
7
8 webdir = util.realpath('.')
8 webdir = os.path.realpath('.')
9
9
10 u = ui.ui()
10 u = ui.ui()
11 hg.repository(u, 'a', create=1)
11 hg.repository(u, 'a', create=1)
General Comments 0
You need to be logged in to leave comments. Login now