/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 15:19:49 UTC
  • mfrom: (7141.7.6 no-file-ids)
  • Revision ID: breezy.the.bot@gmail.com-20181116151949-hrmuv6s7ow1cqdhi
Drop file_id argument from read functions in Tree.

Merged from https://code.launchpad.net/~jelmer/brz/no-file-ids/+merge/357984

Show diffs side-by-side

added added

removed removed

Lines of Context:
596
596
        else:
597
597
            return True
598
598
 
599
 
    def get_file_mtime(self, path, file_id=None):
 
599
    def get_file_mtime(self, path):
600
600
        """See Tree.get_file_mtime."""
601
601
        try:
602
602
            return self._lstat(path).st_mtime
665
665
                self.store.__getitem__, self.store[head].tree)
666
666
        self._fileid_map = self._basis_fileid_map.copy()
667
667
 
668
 
    def get_file_verifier(self, path, file_id=None, stat_value=None):
 
668
    def get_file_verifier(self, path, stat_value=None):
669
669
        with self.lock_read():
670
670
            (index, subpath) = self._lookup_index(path.encode('utf-8'))
671
671
            try:
675
675
                    return ("GIT", None)
676
676
                raise errors.NoSuchFile(path)
677
677
 
678
 
    def get_file_sha1(self, path, file_id=None, stat_value=None):
 
678
    def get_file_sha1(self, path, stat_value=None):
679
679
        with self.lock_read():
680
680
            if not self.is_versioned(path):
681
681
                raise errors.NoSuchFile(path)
697
697
    def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):
698
698
        return self.basis_tree().is_executable(path)
699
699
 
700
 
    def stored_kind(self, path, file_id=None):
 
700
    def stored_kind(self, path):
701
701
        with self.lock_read():
702
702
            encoded_path = path.encode('utf-8')
703
703
            (index, subpath) = self._lookup_index(encoded_path)
715
715
    def _live_entry(self, path):
716
716
        return index_entry_from_path(self.abspath(path.decode('utf-8')).encode(osutils._fs_enc))
717
717
 
718
 
    def is_executable(self, path, file_id=None):
 
718
    def is_executable(self, path):
719
719
        with self.lock_read():
720
720
            if getattr(self, "_supports_executable", osutils.supports_executable)():
721
721
                mode = self._lstat(path).st_mode
819
819
                    paths.add(path)
820
820
            return paths
821
821
 
822
 
    def iter_child_entries(self, path, file_id=None):
 
822
    def iter_child_entries(self, path):
823
823
        encoded_path = path.encode('utf-8')
824
824
        with self.lock_read():
825
825
            parent_id = self.path2id(path)
1062
1062
                    self._index_add_entry(new_path, ie.kind)
1063
1063
        self.flush()
1064
1064
 
1065
 
    def annotate_iter(self, path, file_id=None,
 
1065
    def annotate_iter(self, path,
1066
1066
                      default_revision=_mod_revision.CURRENT_REVISION):
1067
1067
        """See Tree.annotate_iter
1068
1068
 
1200
1200
    def _read_submodule_head(self, path):
1201
1201
        return read_submodule_head(self.abspath(path))
1202
1202
 
1203
 
    def get_reference_revision(self, path, file_id=None):
 
1203
    def get_reference_revision(self, path):
1204
1204
        hexsha = self._read_submodule_head(path)
1205
1205
        if hexsha is None:
1206
1206
            return _mod_revision.NULL_REVISION
1207
1207
        return self.branch.lookup_foreign_revision_id(hexsha)
1208
1208
 
1209
 
    def get_nested_tree(self, path, file_id=None):
 
1209
    def get_nested_tree(self, path):
1210
1210
        return workingtree.WorkingTree.open(self.abspath(path))
1211
1211
 
1212
1212
    def _directory_is_tree_reference(self, relpath):
1214
1214
        # it's a tree reference, except that the root of the tree is not
1215
1215
        return relpath and osutils.lexists(self.abspath(relpath) + u"/.git")
1216
1216
 
1217
 
    def extract(self, sub_path, file_id=None, format=None):
 
1217
    def extract(self, sub_path, format=None):
1218
1218
        """Extract a subtree from this tree.
1219
1219
 
1220
1220
        A new branch will be created, relative to the path for this tree.