hgext3rd/topic/common.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 11:12:58 +0200
branchstable
changeset 4531 1d1f8f56daac
permissions -rw-r--r--
topic: introduce a `hastopicext(repo)` function This function check if a repository has the extension enabled or not.

# 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)