~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Mark Hammond
  • Date: 2009-01-12 01:55:34 UTC
  • mto: (3995.8.2 prepare-1.12)
  • mto: This revision was merged to the branch mainline in revision 4007.
  • Revision ID: mhammond@skippinet.com.au-20090112015534-yfxg50p7mpds9j4v
Include all .html files from the tortoise doc directory.

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
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
from bzrlib import (
18
18
    cache_utf8,
30
30
    format_num = '5'
31
31
    root_id = inventory.ROOT_ID
32
32
 
33
 
    def _unpack_inventory(self, elt, revision_id, entry_cache=None,
34
 
                          return_from_cache=False):
 
33
    def _unpack_inventory(self, elt, revision_id, entry_cache=None):
35
34
        """Construct from XML Element
36
35
        """
37
36
        root_id = elt.get('file_id') or inventory.ROOT_ID
40
39
        format = elt.get('format')
41
40
        if format is not None:
42
41
            if format != '5':
43
 
                raise errors.BzrError("invalid format version %r on inventory"
44
 
                                      % format)
 
42
                raise BzrError("invalid format version %r on inventory"
 
43
                                % format)
45
44
        data_revision_id = elt.get('revision_id')
46
45
        if data_revision_id is not None:
47
46
            revision_id = cache_utf8.encode(data_revision_id)
55
54
        unpack_entry = self._unpack_entry
56
55
        byid = inv._byid
57
56
        for e in elt:
58
 
            ie = unpack_entry(e, entry_cache=entry_cache,
59
 
                              return_from_cache=return_from_cache)
 
57
            ie = unpack_entry(e, entry_cache=entry_cache)
60
58
            parent_id = ie.parent_id
61
59
            if parent_id is None:
62
60
                ie.parent_id = parent_id = root_id
85
83
        In this version, no checking is done.
86
84
 
87
85
        :param inv: An inventory about to be serialised, to be checked.
88
 
        :raises: AssertionError if an error has occurred.
 
86
        :raises: AssertionError if an error has occured.
89
87
        """
90
88
 
91
89
    def _append_inventory_root(self, append, inv):