Skip to content

Commit

Permalink
remote-bzr: update old organization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed May 14, 2013
1 parent ab84621 commit 6a3ac18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/remote-helpers/git-remote-bzr
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6a3ac18

Please sign in to comment.