changeset_printer: use changectx to get status tuple
authorYuya Nishihara <yuya@tcha.org>
Sat, 14 Mar 2015 17:40:47 +0900
changeset 24485 914caae9a86a
parent 24484 ca62ae364b86
child 24486 1a9efc312700
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.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sat Mar 14 17:23:51 2015 +0900
+++ b/mercurial/cmdutil.py	Sat Mar 14 17:40:47 2015 +0900
@@ -1107,7 +1107,6 @@
                           label='log.node')
             return
 
-        log = self.repo.changelog
         date = util.datestr(ctx.date())
 
         if self.ui.debugflag:
@@ -1163,7 +1162,7 @@
                       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"