+
+ def file_exists(self, path, branch):
+ return self.in_branch(lambda: self._file_exists(path), branch)
+
+ def _file_exists(self, path):
+ path = sanitize_string(path)
+ return self.repo.dirstate[path] != "?"
+
+ def write_file(self, path, value, branch):
+ return self.in_branch(lambda: self._write_file(path, value), branch)
+
+ def _write_file(self, path, value):
+ path = sanitize_string(path)
+ return self.repo.wwrite(path, value, [])
+