D540: effectflag: detect when meta changed
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Sep 30 12:25:04 EDT 2017
martinvonz added inline comments.
INLINE COMMENTS
> obsutil.py:327-330
> +def ismetablacklisted(metaitem):
> + """ Check that the key of a meta item (extrakey, extravalue) does not
> + match at least one of the blacklist pattern
> + """
"ismetablacklisted" and "...does *not* match ... blacklist" seems confusing. Shouldn't this function be called notmetablacklisted or metanotblacklisted or similar?
> obsutil.py:332-336
> + for pattern in METABLACKLIST:
> + if pattern.match(metakey):
> + return False
> +
> + return True
I think this is both shorter and clearer (but not tested):
return not any(pattern.match(metakey) for pattern in METABLACKLIST)
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D540
To: lothiraldan, #hg-reviewers
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list