[PATCH 2 of 3] committablectx: override manifestnode() to return None

Yuya Nishihara yuya at tcha.org
Sat Apr 11 03:06:22 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1428585535 -32400
#      Thu Apr 09 22:18:55 2015 +0900
# Node ID 0ba34786c958ea24d33ca914546214982b729442
# Parent  2b6e0ebec09f408f79508a057cdd444bd391d2ac
committablectx: override manifestnode() to return None

wctx.manifestnode() crashed before because it has no _changeset. Instead of
crashing, just return None like wctx.node().

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1191,6 +1191,8 @@ class committablectx(basectx):
     def subrev(self, subpath):
         return None
 
+    def manifestnode(self):
+        return None
     def user(self):
         return self._user or self._repo.ui.username()
     def date(self):


More information about the Mercurial-devel mailing list