# HG changeset patch # User Matt Mackall # Date 1275407043 18000 # Node ID 24fe2629c6fd0c74c90bd066e77387c2b02e8437 # Parent e4dbaa40096d56f7178be7d82fa7b0d728801670# Parent 8324a9fca62ede52e532bafd5c03fff167a44c4b Merge with i18n diff -r 8324a9fca62e -r 24fe2629c6fd mercurial/hg.py --- 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 diff -r 8324a9fca62e -r 24fe2629c6fd mercurial/util.py --- 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: