~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: Alexander Belchenko
  • Date: 2009-07-07 09:00:59 UTC
  • mto: (4501.2.2 integration)
  • mto: This revision was merged to the branch mainline in revision 4515.
  • Revision ID: bialix@ukr.net-20090707090059-fblk3iqgr9mdufjy
improved unicode support for OS locks @ win32.

Patch of Martin <gzlist> was incomplete re unicode paths and win32file-based locks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
63
63
        return e
64
64
 
65
65
 
66
 
    def _unpack_inventory(self, elt, revision_id=None, entry_cache=None,
67
 
                          return_from_cache=False):
 
66
    def _unpack_inventory(self, elt, revision_id=None, entry_cache=None):
68
67
        """Construct from XML Element
69
68
 
70
69
        :param revision_id: Ignored parameter used by xml5.
72
71
        root_id = elt.get('file_id') or ROOT_ID
73
72
        inv = Inventory(root_id)
74
73
        for e in elt:
75
 
            ie = self._unpack_entry(e, entry_cache=entry_cache,
76
 
                                    return_from_cache=return_from_cache)
 
74
            ie = self._unpack_entry(e, entry_cache=entry_cache)
77
75
            if ie.parent_id == ROOT_ID:
78
76
                ie.parent_id = root_id
79
77
            inv.add(ie)
80
78
        return inv
81
79
 
82
80
 
83
 
    def _unpack_entry(self, elt, entry_cache=None, return_from_cache=False):
 
81
    def _unpack_entry(self, elt, entry_cache=None):
84
82
        ## original format inventories don't have a parent_id for
85
83
        ## nodes in the root directory, but it's cleaner to use one
86
84
        ## internally.