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

  • Committer: Jelmer Vernooij
  • Date: 2017-11-12 20:07:32 UTC
  • mto: This revision was merged to the branch mainline in revision 6819.
  • Revision ID: jelmer@jelmer.uk-20171112200732-ehxgen03s9jphe8n
Swap arguments for get_symlink_target and kind/stored_kind.

Show diffs side-by-side

added added

removed removed

Lines of Context:
779
779
            self.add(path, file_id, 'directory')
780
780
            return file_id
781
781
 
782
 
    def get_symlink_target(self, file_id, path=None):
 
782
    def get_symlink_target(self, path, file_id=None):
783
783
        if path is not None:
784
784
            abspath = self.abspath(path)
785
785
        else:
827
827
        """Write the in memory meta data to disk."""
828
828
        raise NotImplementedError(self.flush)
829
829
 
830
 
    def _kind(self, relpath):
 
830
    def kind(self, relpath, file_id=None):
 
831
        if file_id is not None:
 
832
            return osutils.file_kind(self.id2abspath(file_id))
831
833
        return osutils.file_kind(self.abspath(relpath))
832
834
 
833
835
    def list_files(self, include_root=False, from_dir=None, recursive=True):
1008
1010
        """
1009
1011
        raise NotImplementedError(self.is_ignored)
1010
1012
 
1011
 
    def kind(self, file_id):
1012
 
        return osutils.file_kind(self.id2abspath(file_id))
1013
 
 
1014
 
    def stored_kind(self, file_id):
 
1013
    def stored_kind(self, path, file_id=None):
1015
1014
        """See Tree.stored_kind"""
1016
1015
        raise NotImplementedError(self.stored_kind)
1017
1016
 
1486
1485
            conflict_re = re.compile('^(<{7}|={7}|>{7})')
1487
1486
            for conflict in self.conflicts():
1488
1487
                if (conflict.typestring != 'text conflict' or
1489
 
                    self.kind(conflict.file_id) != 'file'):
 
1488
                    self.kind(self.id2path(conflict.file_id), conflict.file_id) != 'file'):
1490
1489
                    un_resolved.append(conflict)
1491
1490
                    continue
1492
1491
                my_file = open(self.id2abspath(conflict.file_id), 'rb')