From c392ff6e4918ff18841ce5827ced34857b2bd78d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 17 Aug 2010 13:42:13 +0200 Subject: [PATCH 1/1] mercurial api: add, remove moved to workingctx --- lib/vstorage/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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): -- 2.20.1