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

login
register
mail settings
Submitter Yuya Nishihara
Date April 11, 2015, 8:06 a.m.
Message ID <0ba34786c958ea24d33c.1428739582@mimosa>
Download mbox | patch
Permalink /patch/8612/
State Accepted
Commit 2cc3d83a56e5c51184f0e29d1ba18e6ddb51af45
Headers show

Comments

Yuya Nishihara - April 11, 2015, 8:06 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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().

Patch

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):