~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-21 12:51:13 UTC
  • mfrom: (6153.1.5 847435-diff-time)
  • Revision ID: pqm@pqm.ubuntu.com-20110921125113-1fs5cdcrixafkkfs
(jelmer) Raise NoSuchId from Tree.get_file_mtime if the file id was not
 found. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2134
2134
        """See Tree.get_file_mtime."""
2135
2135
        if not path:
2136
2136
            path = self.inventory.id2path(file_id)
2137
 
        return os.lstat(self.abspath(path)).st_mtime
 
2137
        try:
 
2138
            return os.lstat(self.abspath(path)).st_mtime
 
2139
        except OSError, e:
 
2140
            if e.errno == errno.ENOENT:
 
2141
                raise errors.FileTimestampUnavailable(path)
 
2142
            raise
2138
2143
 
2139
2144
    def _is_executable_from_path_and_stat_from_basis(self, path, stat_result):
2140
2145
        file_id = self.path2id(path)