Merge lp:~jameinel/bzr/1.17-connect-once into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr/1.17-connect-once
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 23 lines
To merge this branch: bzr merge lp:~jameinel/bzr/1.17-connect-once
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+7757@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

As requested by Aaron, this removes the trailing slash check (which wasn't working where it was anyway), and includes the ConnectionError in the proper exception handling.

Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/bundle/__init__.py'
2--- bzrlib/bundle/__init__.py 2009-03-23 14:59:43 +0000
3+++ bzrlib/bundle/__init__.py 2009-06-23 03:35:40 +0000
4@@ -45,10 +45,6 @@
5 possible_transports=possible_transports)
6 transport = child_transport.clone('..')
7 filename = transport.relpath(child_transport.base)
8- if filename.endswith('/'):
9- # A path to a directory was passed in
10- # definitely not a bundle
11- raise errors.NotABundle('A directory cannot be a bundle')
12 mergeable, transport = read_mergeable_from_transport(transport, filename,
13 _do_directive)
14 return mergeable
15@@ -82,7 +78,7 @@
16 return directive, transport
17 else:
18 return _serializer.read_bundle(f), transport
19- except errors.ConnectionReset:
20+ except (errors.ConnectionReset, errors.ConnectionError), e:
21 raise
22 except (errors.TransportError, errors.PathError), e:
23 raise errors.NotABundle(str(e))