Skip to content

Commit 6a3ac18

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab84621 commit 6a3ac18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contrib/remote-helpers/git-remote-bzr

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,13 @@ def get_repo(url, alias):
830830
clone_path = os.path.join(dirname, 'clone')
831831
if not os.path.exists(clone_path):
832832
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
833840

834841
try:
835842
repo = origin.open_repository()

0 commit comments

Comments
 (0)