git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remote-bzr: update old organization
@ 2013-05-14  4:20 Felipe Contreras
  2013-05-14 17:30 ` Junio C Hamano
       [not found] ` <CABLWAfStOZvKZzsCqb+UiedA7Ra-ermyRJVAeocBE=RdXL8B2w@mail.gmail.com>
  0 siblings, 2 replies; 17+ messages in thread
From: Felipe Contreras @ 2013-05-14  4:20 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras

If a clone exists with the old organization (v1.8.2) it will prevent the
new shared repository organization from working, so let's remove this
repository, which is not used any more.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-bzr | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index 3e452af..b295dd4 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -830,6 +830,13 @@ def get_repo(url, alias):
         clone_path = os.path.join(dirname, 'clone')
         if not os.path.exists(clone_path):
             os.mkdir(clone_path)
+        else:
+            # check and remove old organization
+            try:
+                bdir = bzrlib.bzrdir.BzrDir.open(clone_path)
+                bdir.destroy_repository()
+            except bzrlib.errors.NotBranchError:
+                pass
 
     try:
         repo = origin.open_repository()
-- 
1.8.3.rc1.579.g184e698

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

end of thread, other threads:[~2013-05-17 17:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14  4:20 [PATCH] remote-bzr: update old organization Felipe Contreras
2013-05-14 17:30 ` Junio C Hamano
2013-05-14 20:06   ` Felipe Contreras
2013-05-14 20:36     ` Junio C Hamano
2013-05-14 20:50       ` Felipe Contreras
2013-05-14 20:57         ` Felipe Contreras
2013-05-14 21:18           ` Junio C Hamano
2013-05-14 21:38             ` Felipe Contreras
2013-05-14 22:05               ` Junio C Hamano
2013-05-14 22:14                 ` Junio C Hamano
2013-05-14 22:17                   ` Felipe Contreras
2013-05-14 22:33                     ` Junio C Hamano
2013-05-14 22:43                       ` Felipe Contreras
     [not found] ` <CABLWAfStOZvKZzsCqb+UiedA7Ra-ermyRJVAeocBE=RdXL8B2w@mail.gmail.com>
2013-05-17 10:33   ` Felipe Contreras
2013-05-17 17:09     ` Junio C Hamano
2013-05-17 17:12       ` Felipe Contreras
2013-05-17 17:58         ` Junio C Hamano

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).