Mq - ui.warn or write or note

Mads Kiilerich mads at
Fri Jul 24 10:37:45 CDT 2009

I was tricked by mq behaviour and wanted to improve things.

I wanted to propose

diff --git a/hgext/ b/hgext/
--- a/hgext/
+++ b/hgext/
@@ -1590,6 +1590,7 @@
                  patch.export(repo, [n], fp=patchf, opts=self.diffopts())

+                self.ui.write(_("adding %s to series file\n") % patchname)
                  se = statusentry(hex(n), patchname)
                  self.applied.insert(0, se)

But then it would be obvious to also make this change

@@ -1629,7 +1630,7 @@
                  index = self.full_series_end() + i
                  self.full_series[index:index] = [patchname]
-            self.ui.warn(_("adding %s to series file\n") % patchname)
+            self.ui.write(_("adding %s to series file\n") % patchname)
              i += 1
              patchname = None

And next comes the many other places where ui.warn is used for something 
which IMHO should be write or note.

So it seems to me like mq doesn't need small fixes like this but is more 
in need of a review by someone familiar with it. Anyone?


More information about the Mercurial-devel mailing list