hgext3rd/topic/common.py
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 17 Jul 2019 12:47:37 -0700
changeset 4762 75bc0a51809a
parent 4531 1d1f8f56daac
permissions -rw-r--r--
py3: redefine "troublecategories" in evolve as a dict We'll want to the keys to be bytes and the values to be unicode on py3. Having it defined as a dict makes that easier (instead of converting between the types with e.g. pycompat.sysbytes()). It was kind of ugly to convert between the forms by stripping '_' from the string anyway.

# Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

def hastopicext(repo):
    """True if the repo use the topic extension"""
    return getattr(repo, 'hastopicext', False)