~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/__init__.py

  • Committer: Ian Clatworthy
  • Date: 2008-04-01 04:19:06 UTC
  • mfrom: (3302.6.1 xma-mailmode)
  • mto: This revision was merged to the branch mainline in revision 3323.
  • Revision ID: ian.clatworthy@canonical.com-20080401041906-s7ekpfpo0tnyfkbz
Add mail-mode GNU Emacs mail package as a mail client option (Xavier Maillard)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
 
 
17
 
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
 
 
17
from StringIO import StringIO
 
18
 
18
19
from bzrlib.lazy_import import lazy_import
19
20
lazy_import(globals(), """
20
21
from bzrlib import (
30
31
from bzrlib.trace import note
31
32
 
32
33
 
33
 
@deprecated_function(deprecated_in((1, 12, 0)))
34
34
def read_bundle_from_url(url):
35
35
    return read_mergeable_from_url(url, _do_directive=False)
36
36
 
82
82
            return directive, transport
83
83
        else:
84
84
            return _serializer.read_bundle(f), transport
85
 
    except errors.ConnectionReset:
86
 
        raise
87
85
    except (errors.TransportError, errors.PathError), e:
88
86
        raise errors.NotABundle(str(e))
89
87
    except (IOError,), e:
92
90
        # doesn't always fail at get() time. Sometimes it fails
93
91
        # during read. And that raises a generic IOError with
94
92
        # just the string 'Failure'
95
 
        # StubSFTPServer does fail during get() (because of prefetch)
 
93
        # StubSFTPServer does fail during get() (because of prefetch) 
96
94
        # so it has an opportunity to translate the error.
97
95
        raise errors.NotABundle(str(e))
98
96
    except errors.NotAMergeDirective: