Merge with i18n stable 1.5.4
authorMatt Mackall <mpm@selenic.com>
Tue, 01 Jun 2010 10:44:03 -0500
branchstable
changeset 11259 24fe2629c6fd
parent 11255 e4dbaa40096d (diff)
parent 11257 8324a9fca62e (current diff)
child 11260 44546b8c588a
Merge with i18n
--- a/mercurial/hg.py	Tue Jun 01 12:23:44 2010 -0300
+++ b/mercurial/hg.py	Tue Jun 01 10:44:03 2010 -0500
@@ -277,6 +277,7 @@
                                      % dest)
                 raise
 
+            hardlink = None
             for f in src_repo.store.copylist():
                 src = os.path.join(src_repo.sharedpath, f)
                 dst = os.path.join(dest_path, f)
@@ -287,7 +288,7 @@
                     if dst.endswith('data'):
                         # lock to avoid premature writing to the target
                         dest_lock = lock.lock(os.path.join(dstbase, "lock"))
-                    util.copyfiles(src, dst)
+                    hardlink = util.copyfiles(src, dst, hardlink)
 
             # we need to re-init the repo after manually copying the data
             # into it
--- a/mercurial/util.py	Tue Jun 01 12:23:44 2010 -0300
+++ b/mercurial/util.py	Tue Jun 01 10:44:03 2010 -0500
@@ -451,7 +451,7 @@
         for name, kind in osutil.listdir(src):
             srcname = os.path.join(src, name)
             dstname = os.path.join(dst, name)
-            copyfiles(srcname, dstname, hardlink)
+            hardlink = copyfiles(srcname, dstname, hardlink)
     else:
         if hardlink:
             try:
@@ -462,6 +462,8 @@
         else:
             shutil.copy(src, dst)
 
+    return hardlink
+
 class path_auditor(object):
     '''ensure that a filesystem path contains no banned components.
     the following properties of a path are checked: