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>
Felipe Contreras committed
May 13, 2013 at 23:20 UTC
6a3ac18ba3150a7e089c0c6b6648b364c71f87c9
1 file changed
+7
contrib/remote-helpers/git-remote-bzr
+7
@@ -830,6 +830,13 @@ def get_repo(url, alias):
830
clone_path = os.path.join(dirname, 'clone')
831
if not os.path.exists(clone_path):
832
os.mkdir(clone_path)
833
+ else:
834
+ # check and remove old organization
835
+ try:
836
+ bdir = bzrlib.bzrdir.BzrDir.open(clone_path)
837
+ bdir.destroy_repository()
838
+ except bzrlib.errors.NotBranchError:
839
+ pass
840
841
try:
842
repo = origin.open_repository()