changeset 5072:3c1a5754d983

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.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 13 Jan 2020 15:36:24 +0700
parents 86adb777d8c9
children 609ff25fce29
files hgext3rd/evolve/obshistory.py
diffstat 1 files changed, 4 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- 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 = []