Browse Source

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>
maint
Felipe Contreras 12 years ago committed by Junio C Hamano
parent
commit
6a3ac18ba3
  1. 7
      contrib/remote-helpers/git-remote-bzr

7
contrib/remote-helpers/git-remote-bzr

@ -830,6 +830,13 @@ def get_repo(url, alias): @@ -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()

Loading…
Cancel
Save