changeset 11259:24fe2629c6fd stable 1.5.4

Merge with i18n
author Matt Mackall <mpm@selenic.com>
date Tue, 01 Jun 2010 10:44:03 -0500
parents e4dbaa40096d (diff) 8324a9fca62e (current diff)
children 44546b8c588a
files
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: