diff options
author | RadomirDopieralski <none@none> | 2008-11-14 17:04:07 (GMT) |
---|---|---|
committer | RadomirDopieralski <none@none> | 2008-11-14 17:04:07 (GMT) |
commit | b97375bfdf142774b2cfaebc83247c288b9d6c5b (patch) | |
tree | 5422eefe6257719b896600dbe9095d65c0aa3088 | |
parent | 97139fd7bc1f18638628b2336fae8a544b53c3a9 (diff) |
let saving work on Windows by using Mercurial's rename function1.0.1
-rwxr-xr-x | hatta.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -22,6 +22,7 @@ os.environ["HGMERGE"] = "internal:fail" import mercurial.hg import mercurial.ui import mercurial.revlog +import mercurial.util def external_link(addr): return (addr.startswith('http://') or addr.startswith('https://') @@ -78,7 +79,7 @@ class WikiStorage(object): file_path = self._file_path(title) lock = self._lock() try: - os.rename(file_name, file_path) + mercurial.util.rename(file_name, file_path) if repo_file not in self.repo.changectx(): self.repo.add([repo_file]) self.repo.commit(files=[repo_file], text=text, user=user, |