3
Read in a bundle stream, and process it into a BundleReader object.
1
# Copyright (C) 2006 by Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
"""Read in a bundle stream, and process it into a BundleReader object."""
7
20
from cStringIO import StringIO
24
from bzrlib.bundle.common import get_header, header_str
11
26
from bzrlib.errors import (TestamentMismatch, BzrError,
12
27
MalformedHeader, MalformedPatches, NotABundle)
13
from bzrlib.bundle.common import get_header, header_str
14
28
from bzrlib.inventory import (Inventory, InventoryEntry,
15
29
InventoryDirectory, InventoryFile,
18
32
from bzrlib.revision import Revision, NULL_REVISION
19
33
from bzrlib.testament import StrictTestament
20
34
from bzrlib.trace import mutter, warning
35
import bzrlib.transport
21
36
from bzrlib.tree import Tree
37
import bzrlib.urlutils
22
38
from bzrlib.xml5 import serializer_v5