def setUp(self): super(TestCore, self).setUp('gl-core-test') git.init() utils_lib.set_test_config() self.repo = core.Repository()
gl_tag, gl_checkout, gl_merge, gl_resolve, gl_fuse, gl_remote, gl_publish, gl_switch, gl_init, gl_history) from . import pprint SUCCESS = 0 ERRORS_FOUND = 1 # 2 is used by argparse to indicate cmd syntax errors. INTERNAL_ERROR = 3 NOT_IN_GL_REPO = 4 __version__ = '0.8.8' URL = 'http://gitless.com' repo = None try: repo = core.Repository() try: colored.DISABLE_COLOR = not repo.config.get_bool('color.ui') except pygit2.GitError: colored.DISABLE_COLOR = (repo.config['color.ui'] in ['no', 'never']) except (core.NotInRepoError, KeyError): pass def print_help(parser): """print help for humans""" print(parser.description) print('\ncommands:\n') # https://stackoverflow.com/questions/20094215/argparse-subparser-monolithic-help-output # retrieve subparsers from parser