~amanica/bzr/320119-log_exclusive_lower_bound

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-06 02:54:14 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4255.
  • Revision ID: jelmer@samba.org-20090406025414-65tpjwcmjp5wa5oj
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
# created, but it's not for now.
28
28
ROOT_ID = "TREE_ROOT"
29
29
 
30
 
import os
31
 
import re
32
 
import sys
 
30
from copy import deepcopy
33
31
 
34
32
from bzrlib.lazy_import import lazy_import
35
33
lazy_import(globals(), """
36
34
import collections
 
35
import os
 
36
import re
37
37
import tarfile
38
38
 
39
39
import bzrlib
877
877
            other.add(entry.copy())
878
878
        return other
879
879
 
 
880
    def _get_mutable_inventory(self):
 
881
        """Returns a mutable copy of the object.
 
882
 
 
883
        Some inventories are immutable, yet working trees, for example, needs
 
884
        to mutate exisiting inventories instead of creating a new one.
 
885
        """
 
886
        return deepcopy(self)
 
887
 
880
888
    def __iter__(self):
881
889
        return iter(self._byid)
882
890