comparison mercurial/hg.py @ 14377:f90d5641c78b

clone: make default path absolute for all local paths This fixes the default path when cloning local repositories with hg-git, since hg-git cancopy() is false even for local repositories.
author Brendan Cully <brendan@kublai.com>
date Wed, 18 May 2011 23:20:26 -0700
parents 30273f0c776b
children 81f559d1b9b2
comparison
equal deleted inserted replaced
14370:17cea10c343e 14377:f90d5641c78b
241 if self.dir_: 241 if self.dir_:
242 self.rmtree(self.dir_, True) 242 self.rmtree(self.dir_, True)
243 243
244 src_lock = dest_lock = dir_cleanup = None 244 src_lock = dest_lock = dir_cleanup = None
245 try: 245 try:
246 abspath = origsource
247 if islocal(origsource):
248 abspath = os.path.abspath(util.localpath(origsource))
249
246 if islocal(dest): 250 if islocal(dest):
247 dir_cleanup = DirCleanup(dest) 251 dir_cleanup = DirCleanup(dest)
248 252
249 abspath = origsource
250 copy = False 253 copy = False
251 if src_repo.cancopy() and islocal(dest): 254 if src_repo.cancopy() and islocal(dest):
252 abspath = os.path.abspath(util.localpath(origsource))
253 copy = not pull and not rev 255 copy = not pull and not rev
254 256
255 if copy: 257 if copy:
256 try: 258 try:
257 # we use a lock here because if we race with commit, we 259 # we use a lock here because if we race with commit, we