perceval/backends/core/git.py
def setup_cmd_parser(cls):
        """Returns the Git argument parser."""

        parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES,
                                              from_date=True,
                                              to_date=True)

        # Optional arguments
        group = parser.parser.add_argument_group('Git arguments')
        group.add_argument('--branches', dest='branches',
                           nargs='+', type=str, default=None,
                           help="Fetch commits only from these branches")

        # Mutual exclusive parameters
        exgroup = group.add_mutually_exclusive_group()
        exgroup.add_argument('--git-path', dest='git_path',
                             help="Path where the Git repository will be cloned")
        exgroup.add_argument('--git-log', dest='git_log',
                             help="Path to the Git log file")

        exgroup_fetch = group.add_mutually_exclusive_group()
        exgroup_fetch.add_argument('--latest-items', dest='latest_items',
                                   action='store_true',
                                   help="Fetch latest commits added to the repository")
        exgroup_fetch.add_argument('--no-update', dest='no_update',
                                   action='store_true',
                                   help="Fetch all commits without updating the repository")

        # Required arguments
        parser.parser.add_argument('uri',
                                   help="URI of the Git log repository")

        return parser
def setup_cmd_parser(cls):
        parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES,
                                              from_date=True,
                                              to_date=True)

        # Optional arguments
        group = parser.parser.add_argument_group('Git arguments')
        group.add_argument('--branches', dest='branches',
                           nargs='+', type=str, default=None,
                           help="Fetch commits only from these branches")

        # Mutual exclusive parameters
        exgroup = group.add_mutually_exclusive_group()
        exgroup.add_argument('--git-path', dest='git_path',
                             help="Path where the Git repository will be cloned")
        exgroup.add_argument('--git-log', dest='git_log',
                             help="Path to the Git log file")

        exgroup_fetch = group.add_mutually_exclusive_group()
        exgroup_fetch.add_argument('--latest-items', dest='latest_items',
                                   action='store_true',
                                   help="Fetch latest commits added to the repository")
        exgroup_fetch.add_argument('--no-update', dest='no_update',
                                   action='store_true',
                                   help="Fetch all commits without updating the repository")

        # Required arguments
        parser.parser.add_argument('uri',
                                   help="URI of the Git log repository")

        return parser
def setup_cmd_parser ( cls ) : parser = BackendCommandArgumentParser ( cls . BACKEND . CATEGORIES , from_date = True , to_date = True ) # Optional arguments group = parser . parser . add_argument_group ( 'Git arguments' ) group . add_argument ( '--branches' , dest = 'branches' , nargs = '+' , type = str , default = None , help = "Fetch commits only from these branches" ) # Mutual exclusive parameters exgroup = group . add_mutually_exclusive_group ( ) exgroup . add_argument ( '--git-path' , dest = 'git_path' , help = "Path where the Git repository will be cloned" ) exgroup . add_argument ( '--git-log' , dest = 'git_log' , help = "Path to the Git log file" ) exgroup_fetch = group . add_mutually_exclusive_group ( ) exgroup_fetch . add_argument ( '--latest-items' , dest = 'latest_items' , action = 'store_true' , help = "Fetch latest commits added to the repository" ) exgroup_fetch . add_argument ( '--no-update' , dest = 'no_update' , action = 'store_true' , help = "Fetch all commits without updating the repository" ) # Required arguments parser . parser . add_argument ( 'uri' , help = "URI of the Git log repository" ) return parser
Returns the Git argument parser.
Returns the Git argument parser .