# Path: git_trac/logger.py
# def make_logger(name, doctest_mode=False):
# def enable_doctest_mode():
# 
# Path: git_trac/ticket_or_branch.py
# class TicketOrBranch(object):
# 
#     def __init__(self, name):
#         self._name = name
#         self._validate()
# 
#     def __int__(self):
#         try:
#             return int(self._name)        
#         except ValueError:
#             pass
# 
#     def __str__(self):
#         return self._name
# 
#     def is_number(self):
#         try:
#             int(self._name)
#             return True
#         except ValueError:
#             return False
# 
#     def is_branch(self):
#         for prefix in ['u/', 'public/']:
#             if self._name.startswith(prefix):
#                 return True
#         if self._name in ['master', 'develop']:
#             return True
#         return False
# 
#     def _validate(self):
#         if self.is_number() or self.is_branch():
#             return
#         raise ValueError('Not a valid ticket number or remote branch name')


import sys
import os
import warnings
import argparse
    import subprocess
        import importlib
        import logging
from .logger import logger
from .ticket_or_branch import TicketOrBranch
    from IPython.terminal.ipapp import TerminalIPythonApp
    from .app import Application
    setattr(argparse.ArgumentParser, 'parse_args', parse_args_override)



def make_parser():
    monkey_patch()
    parser = argparse.ArgumentParser(description=description, add_help=False)
    # We cannot handle "git trac --help", this is outside of our control and purely within git
    # redefine to not print '--help' in the online help
    parser.add_argument('-h', dest='option_help', action='store_true',
                        default=False, 
                        help='show this help message and exit')

    parser.add_argument('--debug', dest='debug', action='store_true',
                        default=False, 
                        help='debug')
    parser.add_argument('--log', dest='log', default=None,
                        help='one of [DEBUG, INFO, ERROR, WARNING, CRITICAL]')
    subparsers = parser.add_subparsers(dest='subcommand')

    parser_create = subparsers.add_parser('create', help='Create new ticket')
    parser_create.add_argument('-b', '--branch', dest='branch_name', 
                               help='Branch name', 
                               default=None)
    parser_create.add_argument('summary', type=str, help='Ticket summary')

    parser_checkout = subparsers.add_parser('checkout', help='Download branch')
    parser_checkout.add_argument('-b', '--branch', dest='branch_name', 
                                 help='Local branch name', 
                                 default=None)

# Path: git_trac/logger.py
# def make_logger(name, doctest_mode=False):
# def enable_doctest_mode():
# 
# Path: git_trac/ticket_or_branch.py
# class TicketOrBranch(object):
# 
#     def __init__(self, name):
#         self._name = name
#         self._validate()
# 
#     def __int__(self):
#         try:
#             return int(self._name)        
#         except ValueError:
#             pass
# 
#     def __str__(self):
#         return self._name
# 
#     def is_number(self):
#         try:
#             int(self._name)
#             return True
#         except ValueError:
#             return False
# 
#     def is_branch(self):
#         for prefix in ['u/', 'public/']:
#             if self._name.startswith(prefix):
#                 return True
#         if self._name in ['master', 'develop']:
#             return True
#         return False
# 
#     def _validate(self):
#         if self.is_number() or self.is_branch():
#             return
#         raise ValueError('Not a valid ticket number or remote branch name')


# Path: git_trac/cmdline.py
import sys
import os
import warnings
import argparse
    import subprocess
        import importlib
        import logging
from .logger import logger
from .ticket_or_branch import TicketOrBranch
    from IPython.terminal.ipapp import TerminalIPythonApp
    from .app import Application

    setattr(argparse.ArgumentParser, 'parse_args', parse_args_override)



def make_parser():
    monkey_patch()
    parser = argparse.ArgumentParser(description=description, add_help=False)
    # We cannot handle "git trac --help", this is outside of our control and purely within git
    # redefine to not print '--help' in the online help
    parser.add_argument('-h', dest='option_help', action='store_true',
                        default=False, 
                        help='show this help message and exit')

    parser.add_argument('--debug', dest='debug', action='store_true',
                        default=False, 
                        help='debug')
    parser.add_argument('--log', dest='log', default=None,
                        help='one of [DEBUG, INFO, ERROR, WARNING, CRITICAL]')
    subparsers = parser.add_subparsers(dest='subcommand')

    parser_create = subparsers.add_parser('create', help='Create new ticket')
    parser_create.add_argument('-b', '--branch', dest='branch_name', 
                               help='Branch name', 
                               default=None)
    parser_create.add_argument('summary', type=str, help='Ticket summary')

    parser_checkout = subparsers.add_parser('checkout', help='Download branch')
    parser_checkout.add_argument('-b', '--branch', dest='branch_name', 
                                 help='Local branch name', 
                                 default=None)

    parser_checkout.add_argument('ticket_or_branch', type=TicketOrBranch, 