-
- def add_file(self, path, value, branch='default'):
+
+ def file_exists(self, path, branch):
+ return self.in_branch(lambda: self._file_exists(path), branch)
+
+ def _file_exists(self, 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):
+ return self.repo.wwrite(path, value, [])
+
+ def add_file(self, path, value, branch):