Exemple #1
0
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser("init")
    add_workspace_arg(parser)
    parser.add_argument("manifest_url",
                        help="git url containing the manifest file")
    parser.add_argument(
        "--branch",
        help="use this branch for the manifest",
        default="master",
        dest="manifest_branch",
    )
    parser.add_argument(
        "--shallow",
        action="store_true",
        help="use shallow clones",
        dest="shallow_clones",
    )
    parser.add_argument(
        "-r",
        "--singular-remote",
        help="only use this remote when cloning repositories",
    )

    parser.add_argument(
        "--clone-all-repos",
        action="store_true",
        help="clone all repos from the manifet, regarless of the groups",
    )
    add_groups_arg(parser)
    parser.set_defaults(run=run)
Exemple #2
0
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser("apply-manifest")
    parser.add_argument("manifest_path",
                        help="path to the local manifest",
                        type=Path)
    add_workspace_arg(parser)
    parser.set_defaults(run=run)
Exemple #3
0
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser(
        "foreach", epilog=EPILOG, formatter_class=argparse.RawDescriptionHelpFormatter
    )
    add_workspace_arg(parser)
    add_repos_selection_args(parser)
    parser.add_argument("cmd", nargs="*")
    parser.add_argument(
        "-c",
        help="use a shell to run the command",
        dest="shell",
        default=False,
        action="store_true",
    )
    parser.set_defaults(run=run)
Exemple #4
0
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser("sync")
    add_workspace_arg(parser)
    add_repos_selection_args(parser)
    parser.set_defaults(update_manifest=True, force=False)
    parser.add_argument("--force",
                        help="use `git fetch --force` while syncing",
                        action="store_true")
    parser.add_argument(
        "--no-update-manifest",
        action="store_false",
        dest="update_manifest",
        help="skip updating the manifest before synching repositories",
    )
    parser.set_defaults(run=run)
Exemple #5
0
Fichier : log.py Projet : xzr/tsrc
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser("log")
    add_workspace_arg(parser)
    add_repos_selection_args(parser)
    parser.add_argument("--from",
                        dest="from_ref",
                        metavar="FROM",
                        help="run `git log` from this ref")
    parser.add_argument(
        "--to",
        dest="to_ref",
        default="HEAD",
        help="run `git log` until this ref",
    )
    parser.set_defaults(run=run)
Exemple #6
0
def configure_parser(subparser: argparse._SubParsersAction) -> None:
    parser = subparser.add_parser("status")
    add_workspace_arg(parser)
    add_repos_selection_args(parser)
    parser.set_defaults(run=run)