~jelmer/brz/fix-c-extensions

« back to all changes in this revision

Viewing changes to breezy/bzr/workingtree_4.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    )
82
82
from ..transport.local import LocalTransport
83
83
from ..tree import (
 
84
    FileTimestampUnavailable,
84
85
    InterTree,
85
86
    )
86
87
from ..workingtree import (
135
136
        """See MutableTree._add."""
136
137
        state = self.current_dirstate()
137
138
        for f, file_id, kind in zip(files, ids, kinds):
138
 
            f = f.strip(b'/')
 
139
            f = f.strip(u'/')
139
140
            if self.path2id(f):
140
141
                # special case tree root handling.
141
142
                if f == b'' and self.path2id(f) == ROOT_ID:
664
665
        if not from_paths:
665
666
            return result
666
667
        state = self.current_dirstate()
667
 
        if isinstance(from_paths, basestring):
 
668
        if isinstance(from_paths, (str, bytes)):
668
669
            raise ValueError()
669
670
        to_dir_utf8 = to_dir.encode('utf8')
670
671
        to_entry_dirname, to_basename = os.path.split(to_dir_utf8)
1868
1869
        try:
1869
1870
            rev = self._repository.get_revision(last_changed_revision)
1870
1871
        except errors.NoSuchRevision:
1871
 
            raise errors.FileTimestampUnavailable(self.id2path(file_id))
 
1872
            raise FileTimestampUnavailable(self.id2path(file_id))
1872
1873
        return rev.timestamp
1873
1874
 
1874
1875
    def get_file_sha1(self, file_id, path=None, stat_value=None):