[PATCH 1 of 3] cat: use ctx.manifestnode() in place of ctx._changeset[0]

Yuya Nishihara yuya at tcha.org
Sat Apr 11 08:06:21 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1428735702 -32400
#      Sat Apr 11 16:01:42 2015 +0900
# Node ID 2b6e0ebec09f408f79508a057cdd444bd391d2ac
# Parent  52ff737c63d2b2cb41185549aa9c35bc47317032
cat: use ctx.manifestnode() in place of ctx._changeset[0]

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2402,7 +2402,7 @@ def cat(ui, repo, ctx, matcher, prefix, 
     if len(matcher.files()) == 1 and not matcher.anypats():
         file = matcher.files()[0]
         mf = repo.manifest
-        mfnode = ctx._changeset[0]
+        mfnode = ctx.manifestnode()
         if mf.find(mfnode, file)[0]:
             write(file)
             return 0


More information about the Mercurial-devel mailing list