# HG changeset patch # User Matt Mackall # Date 1461875754 18000 # Node ID a9dd92c48a1c653045df2aa55b87079ce70624b3 # Parent b043d7f27a0efd1396bb2c72f9b137b5524c1762 tags: silence cache parsing errors Follow our standard STFU cache-handling pattern diff -r b043d7f27a0e -r a9dd92c48a1c mercurial/tags.py --- a/mercurial/tags.py Sun May 01 00:12:56 2016 -0300 +++ b/mercurial/tags.py Thu Apr 28 15:35:54 2016 -0500 @@ -16,7 +16,6 @@ import errno import time -from .i18n import _ from .node import ( bin, hex, @@ -176,8 +175,8 @@ hextaglines = util.sortdict() count = 0 - def warn(msg): - ui.warn(_("%s, line %s: %s\n") % (fn, count, msg)) + def dbg(msg): + ui.debug("%s, line %s: %s\n" % (fn, count, msg)) for nline, line in enumerate(lines): count += 1 @@ -186,7 +185,7 @@ try: (nodehex, name) = line.split(" ", 1) except ValueError: - warn(_("cannot parse entry")) + dbg("cannot parse entry") continue name = name.strip() if recode: @@ -194,7 +193,7 @@ try: nodebin = bin(nodehex) except TypeError: - warn(_("node '%s' is not well formed") % nodehex) + dbg("node '%s' is not well formed" % nodehex) continue # update filetags diff -r b043d7f27a0e -r a9dd92c48a1c tests/test-tags.t --- a/tests/test-tags.t Sun May 01 00:12:56 2016 -0300 +++ b/tests/test-tags.t Thu Apr 28 15:35:54 2016 -0500 @@ -262,12 +262,12 @@ $ hg commit -m "head" created new head - $ hg tags + $ hg tags --debug .hgtags@75d9f02dfe28, line 2: cannot parse entry .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed .hgtags@c4be69a18c11, line 2: node 'x' is not well formed - tip 8:c4be69a18c11 - first 0:acb14030fe0a + tip 8:c4be69a18c11e8bc3a5fdbb576017c25f7d84663 + first 0:acb14030fe0a21b60322c440ad2d20cf7685a376 $ hg tip changeset: 8:c4be69a18c11 tag: tip