summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-05-13 23:20:27 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-14 15:51:00 -0700
commit6a3ac18ba3150a7e089c0c6b6648b364c71f87c9 (patch)
treead46f9495b6d6bc9ac0ec28c88128fa4c80227cf
parentGit 1.8.3-rc2 (diff)
downloadtgif-6a3ac18ba3150a7e089c0c6b6648b364c71f87c9.tar.xz
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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xcontrib/remote-helpers/git-remote-bzr7
1 files changed, 7 insertions, 0 deletions
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()