From patchwork Sat Apr 11 08:06:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,3] committablectx: override manifestnode() to return None From: Yuya Nishihara X-Patchwork-Id: 8612 Message-Id: <0ba34786c958ea24d33c.1428739582@mimosa> To: mercurial-devel@selenic.com Date: Sat, 11 Apr 2015 17:06:22 +0900 # HG changeset patch # User Yuya Nishihara # 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):