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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 23:38:56 UTC
  • mfrom: (7170.3.2 optional-all-file-ids)
  • Revision ID: breezy.the.bot@gmail.com-20181116233856-sgktuah3dmjwjqna
Make implementing Tree.all_file_ids() optional.

Merged from https://code.launchpad.net/~jelmer/brz/optional-all-file-ids/+merge/358932

Show diffs side-by-side

added added

removed removed

Lines of Context:
720
720
    def _duplicate_ids(self):
721
721
        """Each inventory id may only be used once"""
722
722
        conflicts = []
 
723
        try:
 
724
            all_ids = self._tree.all_file_ids()
 
725
        except errors.UnsupportedOperation:
 
726
            # it's okay for non-file-id trees to raise UnsupportedOperation.
 
727
            return []
723
728
        removed_tree_ids = set((self.tree_file_id(trans_id) for trans_id in
724
729
                                self._removed_id))
725
 
        all_ids = self._tree.all_file_ids()
726
730
        active_tree_ids = all_ids.difference(removed_tree_ids)
727
731
        for trans_id, file_id in viewitems(self._new_id):
728
732
            if file_id in active_tree_ids:
2064
2068
        return tree_ids
2065
2069
 
2066
2070
    def all_versioned_paths(self):
2067
 
        return {self.id2path(fid) for fid in self.all_file_ids()}
 
2071
        tree_paths = set(self._transform._tree.all_versioned_paths())
 
2072
 
 
2073
        tree_paths.difference_update(
 
2074
            self._transform.trans_id_tree_path(t)
 
2075
            for t in self._transform._removed_id)
 
2076
 
 
2077
        tree_paths.update(
 
2078
            self._final_paths._determine_path(t)
 
2079
            for t in self._transform._new_id)
 
2080
 
 
2081
        return tree_paths
2068
2082
 
2069
2083
    def _has_id(self, file_id, fallback_check):
2070
2084
        if file_id in self._transform._r_new_id: