/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-11-16 18:35:30 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7178.
  • Revision ID: jelmer@jelmer.uk-20181116183530-ue8yx60h5tinl2wy
Merge more-cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
619
619
        else:
620
620
            return True
621
621
 
622
 
    def get_file_mtime(self, path, file_id=None):
 
622
    def get_file_mtime(self, path):
623
623
        """See Tree.get_file_mtime."""
624
624
        try:
625
625
            return self._lstat(path).st_mtime
689
689
                self.store.__getitem__, self.store[head].tree)
690
690
        self._fileid_map = self._basis_fileid_map.copy()
691
691
 
692
 
    def get_file_verifier(self, path, file_id=None, stat_value=None):
 
692
    def get_file_verifier(self, path, stat_value=None):
693
693
        with self.lock_read():
694
694
            (index, subpath) = self._lookup_index(path.encode('utf-8'))
695
695
            try:
699
699
                    return ("GIT", None)
700
700
                raise errors.NoSuchFile(path)
701
701
 
702
 
    def get_file_sha1(self, path, file_id=None, stat_value=None):
 
702
    def get_file_sha1(self, path, stat_value=None):
703
703
        with self.lock_read():
704
704
            if not self.is_versioned(path):
705
705
                raise errors.NoSuchFile(path)
721
721
    def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):
722
722
        return self.basis_tree().is_executable(path)
723
723
 
724
 
    def stored_kind(self, path, file_id=None):
 
724
    def stored_kind(self, path):
725
725
        with self.lock_read():
726
726
            encoded_path = path.encode('utf-8')
727
727
            (index, subpath) = self._lookup_index(encoded_path)
741
741
            osutils._fs_enc)
742
742
        return index_entry_from_path(encoded_path)
743
743
 
744
 
    def is_executable(self, path, file_id=None):
 
744
    def is_executable(self, path):
745
745
        with self.lock_read():
746
746
            if getattr(self, "_supports_executable",
747
747
                       osutils.supports_executable)():
860
860
                    paths.add(path)
861
861
            return paths
862
862
 
863
 
    def iter_child_entries(self, path, file_id=None):
 
863
    def iter_child_entries(self, path):
 
864
        encoded_path = path.encode('utf-8')
864
865
        with self.lock_read():
865
866
            parent_id = self.path2id(path)
866
867
            found_any = False
1110
1111
                    self._index_add_entry(new_path, ie.kind)
1111
1112
        self.flush()
1112
1113
 
1113
 
    def annotate_iter(self, path, file_id=None,
 
1114
    def annotate_iter(self, path,
1114
1115
                      default_revision=_mod_revision.CURRENT_REVISION):
1115
1116
        """See Tree.annotate_iter
1116
1117
 
1255
1256
    def _read_submodule_head(self, path):
1256
1257
        return read_submodule_head(self.abspath(path))
1257
1258
 
1258
 
    def get_reference_revision(self, path, file_id=None):
 
1259
    def get_reference_revision(self, path):
1259
1260
        hexsha = self._read_submodule_head(path)
1260
1261
        if hexsha is None:
1261
1262
            return _mod_revision.NULL_REVISION
1262
1263
        return self.branch.lookup_foreign_revision_id(hexsha)
1263
1264
 
1264
 
    def get_nested_tree(self, path, file_id=None):
 
1265
    def get_nested_tree(self, path):
1265
1266
        return workingtree.WorkingTree.open(self.abspath(path))
1266
1267
 
1267
1268
    def _directory_is_tree_reference(self, relpath):
1269
1270
        # it's a tree reference, except that the root of the tree is not
1270
1271
        return relpath and osutils.lexists(self.abspath(relpath) + u"/.git")
1271
1272
 
1272
 
    def extract(self, sub_path, file_id=None, format=None):
 
1273
    def extract(self, sub_path, format=None):
1273
1274
        """Extract a subtree from this tree.
1274
1275
 
1275
1276
        A new branch will be created, relative to the path for this tree.