/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/transform.py

  • Committer: Aaron Bentley
  • Date: 2011-04-28 06:45:01 UTC
  • mto: (5832.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5834.
  • Revision ID: aaron@aaronbentley.com-20110428064501-fmg36p3yumh32jj3
Support PreviewTree.has_filename.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1898
1898
        path = self._tree_id_paths.get(trans_id)
1899
1899
        if path is None:
1900
1900
            return None
1901
 
        file_id = self._tree.path2id(path)
1902
 
        try:
1903
 
            return self._tree.kind(file_id)
1904
 
        except errors.NoSuchFile:
1905
 
            return None
 
1901
        return self._tree.path_content_summary(path)[0]
1906
1902
 
1907
1903
    def _set_mode(self, trans_id, mode_id, typefunc):
1908
1904
        """Set the mode of new file contents.
2232
2228
            except errors.NoSuchId:
2233
2229
                return False
2234
2230
 
 
2231
    def has_filename(self, path):
 
2232
        trans_id = self._path2trans_id(path)
 
2233
        if trans_id in self._transform._new_contents:
 
2234
            return True
 
2235
        elif trans_id in self._transform._removed_contents:
 
2236
            return False
 
2237
        else:
 
2238
            return self._transform._tree.has_filename(path)
 
2239
 
2235
2240
    def path_content_summary(self, path):
2236
2241
        trans_id = self._path2trans_id(path)
2237
2242
        tt = self._transform