# HG changeset patch # User Anton Shestakov # Date 1578904584 -25200 # Node ID 3c1a5754d983d624a118aa8ea55f46a2689b7c54 # Parent 86adb777d8c9c8303ed880e6fbfae98b0b96fd6f obshistory: remove unused ismetablacklisted() Code that used this function was removed in 461b9a91b662. But we still need to add one item currently missing from METABLACKLIST in core: touch noise. diff -r 86adb777d8c9 -r 3c1a5754d983 hgext3rd/evolve/obshistory.py --- a/hgext3rd/evolve/obshistory.py Mon Jan 13 15:05:34 2020 +0700 +++ b/hgext3rd/evolve/obshistory.py Mon Jan 13 15:36:24 2020 +0700 @@ -42,6 +42,10 @@ item.default = True efd.clear() +@eh.extsetup +def addtouchnoise(ui): + obsutil.METABLACKLIST.append(re.compile(br'^__touch-noise__$')) + @eh.command( b'obslog|olog', [(b'G', b'graph', True, _(b"show the revision DAG")), @@ -695,25 +699,6 @@ fm.plain(b"\n") -METABLACKLIST = [ - re.compile(br'^__touch-noise__$'), - re.compile(br'^branch$'), - re.compile(br'^.*-source$'), - re.compile(br'^.*_source$'), - re.compile(br'^source$'), -] - -def ismetablacklisted(metaitem): - """ Check that the key of a meta item (extrakey, extravalue) does not - match at least one of the blacklist pattern - """ - metakey = metaitem[0] - for pattern in METABLACKLIST: - if pattern.match(metakey): - return False - - return True - def _prepare_hunk(hunk): """Drop all information but the username and patch""" cleanunk = []