[PATCH 4 of 4] changeset_printer: use changectx to get status tuple
Yuya Nishihara
yuya at tcha.org
Fri Mar 27 10:24:48 CDT 2015
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1426322447 -32400
# Sat Mar 14 17:40:47 2015 +0900
# Node ID 80a3c940d67309d75559b13b031378789aa400a3
# Parent 9e42a6eebfdf5b33502be8ac4291c4bc1f9f2eca
changeset_printer: use changectx to get status tuple
log.parents() can't handle wdir() revision. Because repo.status() creates ctx
objects, there would be no benefit to get parent node from changelog.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1110,7 +1110,6 @@ class changeset_printer(object):
label='log.node')
return
- log = self.repo.changelog
date = util.datestr(ctx.date())
if self.ui.debugflag:
@@ -1166,7 +1165,7 @@ class changeset_printer(object):
label='log.date')
if self.ui.debugflag:
- files = self.repo.status(log.parents(changenode)[0], changenode)[:3]
+ files = ctx.p1().status(ctx)[:3]
for key, value in zip([# i18n: column positioning for "hg log"
_("files:"),
# i18n: column positioning for "hg log"
More information about the Mercurial-devel
mailing list