[PATCH v2 0/2] remote-hg: shared repo upgrade fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Same as before, except with commit messages updated, and improved the second
patch:

--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -400,8 +400,9 @@ def get_repo(url, alias):
                 local_hg = os.path.join(shared_path, x, 'clone', '.hg')
                 if not os.path.exists(local_hg):
                     continue
-                shutil.copytree(local_hg, hg_path)
-                break
+                if not os.path.exists(hg_path):
+                    shutil.move(local_hg, hg_path)
+                shutil.rmtree(os.path.join(shared_path, x, 'clone'))
 
         # setup shared repo (if not there)
         try:

Felipe Contreras (2):
  remote-hg: ensure shared repo is initialized
  remote-hg: add shared repo upgrade

 contrib/remote-helpers/git-remote-hg | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

-- 
1.8.3.267.gbb4989f

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]