[PATCH 16 of 27 clfilter V2] clfilter: mq should not warn about filtered mq patch

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 8 16:38:07 CDT 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1349719300 -7200
# Node ID fe4fd85ce72a171264b9ded32b3490b9b873db6f
# Parent  f627a9af06dc282b10da93f6db6cb7b5fbf33017
clfilter: mq should not warn about filtered mq patch

MQ warn when qstatus contains unknown node. With changelog filtering, node may
be unknown because they are filtered. So, unfiltered repo is used for this
check.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -3435,7 +3435,8 @@
             mqtags = [(patch.node, patch.name) for patch in q.applied]
 
             try:
-                self.changelog.rev(mqtags[-1][0])
+                # for now ignore filtering business
+                self.unfiltered().changelog.rev(mqtags[-1][0])
             except error.LookupError:
                 self.ui.warn(_('mq status file refers to unknown node %s\n')
                              % short(mqtags[-1][0]))
@@ -3465,7 +3466,7 @@
             else:
                 qbasenode = q.applied[0].node
                 try:
-                    qbase = cl.rev(qbasenode)
+                    qbase = self.unfiltered().changelog.rev(qbasenode)
                 except error.LookupError:
                     self.ui.warn(_('mq status file refers to unknown node %s\n')
                                  % short(qbasenode))


More information about the Mercurial-devel mailing list