/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-02 23:09:40 UTC
  • mfrom: (4853.1.1 whitespace)
  • mto: This revision was merged to the branch mainline in revision 4856.
  • Revision ID: john@arbash-meinel.com-20091202230940-7n2aydoxngdqxzld
Strip trailing whitespace from doc files by Patrick Regan.

Resolve one small conflict with another doc edit.
Also, revert the changes to all the .pdf and .png files. We shouldn't
be touching them as they are pure-binary files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008 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
30
30
    XMLSerializer,
31
31
    escape_invalid_chars,
32
32
    )
33
 
from bzrlib.inventory import InventoryEntry
 
33
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
34
34
from bzrlib.revision import Revision
35
35
from bzrlib.errors import BzrError
36
36
 
371
371
            prop_elt.tail = '\n'
372
372
        top_elt.tail = '\n'
373
373
 
374
 
    def _unpack_inventory(self, elt, revision_id=None, entry_cache=None,
375
 
                          return_from_cache=False):
 
374
    def _unpack_inventory(self, elt, revision_id=None, entry_cache=None):
376
375
        """Construct from XML Element"""
377
376
        if elt.tag != 'inventory':
378
377
            raise errors.UnexpectedInventoryFormat('Root tag is %r' % elt.tag)
385
384
            revision_id = cache_utf8.encode(revision_id)
386
385
        inv = inventory.Inventory(root_id=None, revision_id=revision_id)
387
386
        for e in elt:
388
 
            ie = self._unpack_entry(e, entry_cache=entry_cache,
389
 
                                    return_from_cache=return_from_cache)
 
387
            ie = self._unpack_entry(e, entry_cache=entry_cache)
390
388
            inv.add(ie)
391
389
        self._check_cache_size(len(inv), entry_cache)
392
390
        return inv
393
391
 
394
 
    def _unpack_entry(self, elt, entry_cache=None, return_from_cache=False):
 
392
    def _unpack_entry(self, elt, entry_cache=None):
395
393
        elt_get = elt.get
396
394
        file_id = elt_get('file_id')
397
395
        revision = elt_get('revision')
435
433
                pass
436
434
            else:
437
435
                # Only copying directory entries drops us 2.85s => 2.35s
438
 
                if return_from_cache:
439
 
                    if cached_ie.kind == 'directory':
440
 
                        return cached_ie.copy()
441
 
                    return cached_ie
 
436
                # if cached_ie.kind == 'directory':
 
437
                #     return cached_ie.copy()
 
438
                # return cached_ie
442
439
                return cached_ie.copy()
443
440
 
444
441
        kind = elt.tag