Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

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

From: Antoine Pelisse <hidden>
Date: 2016-06-15 22:58:23

On Sat, Aug 10, 2013 at 12:38 AM, Felipe Contreras
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
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:
FWIW,
Reviewed-by: Antoine Pelisse <redacted>

Cheers,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help