/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/git/workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2018-10-29 11:27:33 UTC
  • mto: This revision was merged to the branch mainline in revision 7170.
  • Revision ID: jelmer@jelmer.uk-20181029112733-bjvm24z12svwl53m
Get rid of file_ids in most of Tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
608
608
        else:
609
609
            return True
610
610
 
611
 
    def get_file_mtime(self, path, file_id=None):
 
611
    def get_file_mtime(self, path):
612
612
        """See Tree.get_file_mtime."""
613
613
        try:
614
614
            return self._lstat(path).st_mtime
677
677
                self.store.__getitem__, self.store[head].tree)
678
678
        self._fileid_map = self._basis_fileid_map.copy()
679
679
 
680
 
    def get_file_verifier(self, path, file_id=None, stat_value=None):
 
680
    def get_file_verifier(self, path, stat_value=None):
681
681
        with self.lock_read():
682
682
            (index, subpath) = self._lookup_index(path.encode('utf-8'))
683
683
            try:
687
687
                    return ("GIT", None)
688
688
                raise errors.NoSuchFile(path)
689
689
 
690
 
    def get_file_sha1(self, path, file_id=None, stat_value=None):
 
690
    def get_file_sha1(self, path, stat_value=None):
691
691
        with self.lock_read():
692
692
            if not self.is_versioned(path):
693
693
                raise errors.NoSuchFile(path)
709
709
    def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):
710
710
        return self.basis_tree().is_executable(path)
711
711
 
712
 
    def stored_kind(self, path, file_id=None):
 
712
    def stored_kind(self, path):
713
713
        with self.lock_read():
714
714
            encoded_path = path.encode('utf-8')
715
715
            (index, subpath) = self._lookup_index(encoded_path)
727
727
    def _live_entry(self, path):
728
728
        return index_entry_from_path(self.abspath(path.decode('utf-8')).encode(osutils._fs_enc))
729
729
 
730
 
    def is_executable(self, path, file_id=None):
 
730
    def is_executable(self, path):
731
731
        with self.lock_read():
732
732
            if getattr(self, "_supports_executable", osutils.supports_executable)():
733
733
                mode = self._lstat(path).st_mode
831
831
                    paths.add(path)
832
832
            return paths
833
833
 
834
 
    def iter_child_entries(self, path, file_id=None):
 
834
    def iter_child_entries(self, path):
835
835
        encoded_path = path.encode('utf-8')
836
836
        with self.lock_read():
837
837
            parent_id = self.path2id(path)
1074
1074
                    self._index_add_entry(new_path, ie.kind)
1075
1075
        self.flush()
1076
1076
 
1077
 
    def annotate_iter(self, path, file_id=None,
 
1077
    def annotate_iter(self, path,
1078
1078
                      default_revision=_mod_revision.CURRENT_REVISION):
1079
1079
        """See Tree.annotate_iter
1080
1080
 
1212
1212
    def _read_submodule_head(self, path):
1213
1213
        return read_submodule_head(self.abspath(path))
1214
1214
 
1215
 
    def get_reference_revision(self, path, file_id=None):
 
1215
    def get_reference_revision(self, path):
1216
1216
        hexsha = self._read_submodule_head(path)
1217
1217
        if hexsha is None:
1218
1218
            return _mod_revision.NULL_REVISION
1219
1219
        return self.branch.lookup_foreign_revision_id(hexsha)
1220
1220
 
1221
 
    def get_nested_tree(self, path, file_id=None):
 
1221
    def get_nested_tree(self, path):
1222
1222
        return workingtree.WorkingTree.open(self.abspath(path))
1223
1223
 
1224
1224
    def _directory_is_tree_reference(self, relpath):
1226
1226
        # it's a tree reference, except that the root of the tree is not
1227
1227
        return relpath and osutils.lexists(self.abspath(relpath) + u"/.git")
1228
1228
 
1229
 
    def extract(self, sub_path, file_id=None, format=None):
 
1229
    def extract(self, sub_path, format=None):
1230
1230
        """Extract a subtree from this tree.
1231
1231
 
1232
1232
        A new branch will be created, relative to the path for this tree.