~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-30 11:14:06 UTC
  • mfrom: (6002 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110630111406-eimf301w6x92xkk7
mergeĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
2077
2077
            return True
2078
2078
        return self.inventory.has_id(file_id)
2079
2079
 
2080
 
    __contains__ = has_id
2081
 
 
2082
2080
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
2083
2081
    def __iter__(self):
2084
2082
        """Iterate through file_ids for this tree.
2260
2258
                parent_tree = self.branch.repository.revision_tree(parent_id)
2261
2259
            parent_tree.lock_read()
2262
2260
            try:
2263
 
                if file_id not in parent_tree:
 
2261
                if not parent_tree.has_id(file_id):
2264
2262
                    continue
2265
2263
                ie = parent_tree.inventory[file_id]
2266
2264
                if ie.kind != 'file':
2314
2312
            for s in _mod_rio.RioReader(hashfile):
2315
2313
                # RioReader reads in Unicode, so convert file_ids back to utf8
2316
2314
                file_id = osutils.safe_file_id(s.get("file_id"), warn=False)
2317
 
                if file_id not in self.inventory:
 
2315
                if not self.inventory.has_id(file_id):
2318
2316
                    continue
2319
2317
                text_hash = s.get("hash")
2320
2318
                if text_hash == self.get_file_sha1(file_id):
2855
2853
        :raises: NoSuchId if any fileid is not currently versioned.
2856
2854
        """
2857
2855
        for file_id in file_ids:
2858
 
            if file_id not in self._inventory:
 
2856
            if not self._inventory.has_id(file_id):
2859
2857
                raise errors.NoSuchId(self, file_id)
2860
2858
        for file_id in file_ids:
2861
2859
            if self._inventory.has_id(file_id):
3016
3014
    missing_parent_conflicts = False
3017
3015
    """If this format supports missing parent conflicts."""
3018
3016
 
 
3017
    supports_versioned_directories = None
 
3018
 
3019
3019
    @classmethod
3020
3020
    def find_format_string(klass, a_bzrdir):
3021
3021
        """Return format name for the working tree object in a_bzrdir."""