summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-14 04:20:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-14 22:51:00 (GMT)
commit6a3ac18ba3150a7e089c0c6b6648b364c71f87c9 (patch)
treead46f9495b6d6bc9ac0ec28c88128fa4c80227cf /contrib
parentab84621754e9c6f05279b42e51b445baac28a8ea (diff)
downloadgit-6a3ac18ba3150a7e089c0c6b6648b364c71f87c9.zip
git-6a3ac18ba3150a7e089c0c6b6648b364c71f87c9.tar.gz
git-6a3ac18ba3150a7e089c0c6b6648b364c71f87c9.tar.bz2
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>
Diffstat (limited to 'contrib')
-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 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()