From 6a3ac18ba3150a7e089c0c6b6648b364c71f87c9 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 13 May 2013 23:20:27 -0500 Subject: remote-bzr: update old organization If a clone exists with the old organization (v1.8.2) it will prevent the new shared bzr repository organization from working, so let's remove this repository, which is not used any more. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- 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 3e452af1dc..b295dd4895 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() -- cgit v1.2.3