예제 #1
0
 def get_file_revision(self, path, file_id=None):
     utf8_path = path.encode("utf-8")
     if utf8_path in self._manifest:
         # it's a file
         return self._get_file_last_modified_cl(utf8_path)
     elif self._has_directory(utf8_path):
         return self._get_dir_last_modified(utf8_path)
     else:
         raise errors.NoSuchId(self, file_id)
예제 #2
0
 def id2path(self, file_id):
     if self._mapping is None:
         raise errors.NoSuchId(self, file_id)
     return self._mapping.parse_file_id(file_id).decode("utf-8")
예제 #3
0
파일: tree.py 프로젝트: jelmer/breezy-svn
 def id2path(self, file_id):
     try:
         return self.lookup_path(file_id)
     except KeyError:
         raise errors.NoSuchId(self, file_id)