diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-24 21:24:26 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-28 07:43:25 -0700 |
commit | 85f931d3d5adf9d628aa3a75cfdd2f8f940f3d56 (patch) | |
tree | 1da54ad4d5ee9fb9945b0ed664086a8dd497ca41 | |
parent | remote-bzr: reorganize the way 'wanted' works (diff) | |
download | tgif-85f931d3d5adf9d628aa3a75cfdd2f8f940f3d56.tar.xz |
remote-bzr: add fallback check for a partial clone
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | contrib/remote-helpers/git-remote-bzr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 3248586b13..3cd65723c3 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -766,7 +766,10 @@ def do_list(parser): print def clone(path, remote_branch): - bdir = bzrlib.bzrdir.BzrDir.create(path) + try: + bdir = bzrlib.bzrdir.BzrDir.create(path) + except bzrlib.errors.AlreadyControlDirError: + bdir = bzrlib.bzrdir.BzrDir.open(path) repo = bdir.find_repository() repo.fetch(remote_branch.repository) return remote_branch.sprout(bdir, repository=repo) |