[PATCH] Fix for issue 2120: Bundle cloning not getting correct path

qwerty360 at gmail.com qwerty360 at gmail.com
Sat Apr 3 20:39:38 CDT 2010


# HG changeset patch
# User Mark Determann <qwerty360 at gmail.com>
# Date 1270344115 -3600
# Node ID 222a3cf7f30ce71bb395922cfa01294fda55b90c
# Parent  cd0c49bdbfd9edab18c3656d8a8a0bd27a9aa82a
Fix for issue 2120: Bundle cloning not getting correct path

the fix changes clone in hg.py so that the path is made absolute if the source
is an instance of localrepository (bundles and local repositories) and the destination
is local (tested with the existing command).

http://mercurial.selenic.com/bts/issue2120

diff -r cd0c49bdbfd9 -r 222a3cf7f30c mercurial/hg.py
--- a/mercurial/hg.py	Thu Apr 01 17:51:59 2010 -0500
+++ b/mercurial/hg.py	Sun Apr 04 02:21:55 2010 +0100
@@ -243,10 +243,14 @@
         if islocal(dest):
             dir_cleanup = DirCleanup(dest)
 
-        abspath = origsource
         copy = False
+        if (isinstance(src_repo, localrepo.localrepository)) and islocal(dest):
+            origsource = os.path.abspath(util.drop_scheme('file', origsource))
+            abspath = os.path.abspath(util.drop_scheme('bundle', origsource))
+        else:
+            abspath = origsource
+
         if src_repo.cancopy() and islocal(dest):
-            abspath = os.path.abspath(util.drop_scheme('file', origsource))
             copy = not pull and not rev
 
         if copy:


More information about the Mercurial-devel mailing list