git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] remote-hg: shared repo upgrade fix
@ 2013-08-09 22:38 Felipe Contreras
  2013-08-09 22:38 ` [PATCH v2 1/2] remote-hg: ensure shared repo is initialized Felipe Contreras
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Felipe Contreras @ 2013-08-09 22:38 UTC (permalink / raw)
  To: git; +Cc: Antoine Pelisse, Jörn Hees, Junio C Hamano, Felipe Contreras

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-10 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 22:38 [PATCH v2 0/2] remote-hg: shared repo upgrade fix Felipe Contreras
2013-08-09 22:38 ` [PATCH v2 1/2] remote-hg: ensure shared repo is initialized Felipe Contreras
2013-08-09 22:38 ` [PATCH v2 2/2] remote-hg: add shared repo upgrade Felipe Contreras
2013-08-10 15:18 ` [PATCH v2 0/2] remote-hg: shared repo upgrade fix Antoine Pelisse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).