Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hg.py @ 14825:de9eb6b1da4f stable 1.9
util: rename the util.localpath that uses url to urllocalpath (issue2875)
util is never imported by any other name than util, so this is mostly just a
simple search and replace from util.localpath to util.urllocalpath (assuming
other uses of util.localpath already has been renamed).
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 01 Jul 2011 17:37:09 +0200 |
parents | b39ed8c8e5e5 |
children | 510c893a726f |
comparison
equal
deleted
inserted
replaced
14824:7698c275aa56 | 14825:de9eb6b1da4f |
---|---|
15 import merge as mergemod | 15 import merge as mergemod |
16 import verify as verifymod | 16 import verify as verifymod |
17 import errno, os, shutil | 17 import errno, os, shutil |
18 | 18 |
19 def _local(path): | 19 def _local(path): |
20 path = util.expandpath(util.localpath(path)) | 20 path = util.expandpath(util.urllocalpath(path)) |
21 return (os.path.isfile(path) and bundlerepo or localrepo) | 21 return (os.path.isfile(path) and bundlerepo or localrepo) |
22 | 22 |
23 def addbranchrevs(lrepo, repo, branches, revs): | 23 def addbranchrevs(lrepo, repo, branches, revs): |
24 hashbranch, branches = branches | 24 hashbranch, branches = branches |
25 if not hashbranch and not branches: | 25 if not hashbranch and not branches: |
225 dest = defaultdest(source) | 225 dest = defaultdest(source) |
226 ui.status(_("destination directory: %s\n") % dest) | 226 ui.status(_("destination directory: %s\n") % dest) |
227 else: | 227 else: |
228 dest = ui.expandpath(dest) | 228 dest = ui.expandpath(dest) |
229 | 229 |
230 dest = util.localpath(dest) | 230 dest = util.urllocalpath(dest) |
231 source = util.localpath(source) | 231 source = util.urllocalpath(source) |
232 | 232 |
233 if os.path.exists(dest): | 233 if os.path.exists(dest): |
234 if not os.path.isdir(dest): | 234 if not os.path.isdir(dest): |
235 raise util.Abort(_("destination '%s' already exists") % dest) | 235 raise util.Abort(_("destination '%s' already exists") % dest) |
236 elif os.listdir(dest): | 236 elif os.listdir(dest): |
248 | 248 |
249 srclock = destlock = dircleanup = None | 249 srclock = destlock = dircleanup = None |
250 try: | 250 try: |
251 abspath = origsource | 251 abspath = origsource |
252 if islocal(origsource): | 252 if islocal(origsource): |
253 abspath = os.path.abspath(util.localpath(origsource)) | 253 abspath = os.path.abspath(util.urllocalpath(origsource)) |
254 | 254 |
255 if islocal(dest): | 255 if islocal(dest): |
256 dircleanup = DirCleanup(dest) | 256 dircleanup = DirCleanup(dest) |
257 | 257 |
258 copy = False | 258 copy = False |