From: Radek Czajka Date: Tue, 17 Aug 2010 11:42:13 +0000 (+0200) Subject: mercurial api: add, remove moved to workingctx X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/c392ff6e4918ff18841ce5827ced34857b2bd78d?ds=inline;hp=11ffe0d7be49a89f0070444a711328f2bb56be82 mercurial api: add, remove moved to workingctx --- diff --git a/lib/vstorage/__init__.py b/lib/vstorage/__init__.py index 84d8ee7b..be7b6b3f 100644 --- a/lib/vstorage/__init__.py +++ b/lib/vstorage/__init__.py @@ -20,6 +20,7 @@ os.environ['HGMERGE'] = "internal:merge" import mercurial.hg import mercurial.revlog import mercurial.util +from mercurial.context import workingctx from vstorage.hgui import SilentUI @@ -219,7 +220,7 @@ class VersionedStorage(object): filectx_tip = changectx[repo_file] current_page_rev = filectx_tip.filerev() except mercurial.revlog.LookupError: - self.repo.add([repo_file]) + workingctx(self.repo).add([repo_file]) current_page_rev = -1 if parent is not None and current_page_rev != parent: @@ -271,7 +272,7 @@ class VersionedStorage(object): os.unlink(file_path) except OSError: pass - self.repo.remove([repo_file]) + workingctx(self.repo).remove([repo_file]) self._commit([repo_file], text, user) def page_text(self, title, revision=None):