# Path: src/rosrepo/util.py
# def yaml_load(stream, Loader=SafeLoader):
# def yaml_dump(data, stream=None, Dumper=SafeDumper, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __str__(self):
#     def __getitem__(self, item):
#     def __setitem__(self, item, value):
#     def __len__(self):
# def is_deprecated_package(manifest):
# def deprecated_package_info(manifest):
# def path_has_prefix(path, prefix):
# def has_package_path(obj, paths):
# def env_path_list_contains(path_list, path):
# def makedirs(path):
# def write_atomic(filepath, data, mode=0o644, ignore_fail=False):
# def isatty(fd):
# def get_terminal_size():
# def find_program(program):
#     def is_exe(fpath):
# def getmtime(path):
# def call_process(args, bufsize=0, stdin=None, stdout=None, stderr=None, cwd=None, env=None, input_data=None):
# def create_multiprocess_manager():
# def _worker_init(worker_init, worker_init_args):
# def run_multiprocess_workers(worker, workload, worker_init=None, worker_init_args=(), jobs=None, timeout=None):
# class NamedTuple(object):
# class UserError(RuntimeError):
# 
# Path: src/rosrepo/ui.py
# def error(text, use_color=None):
#     prog = "rosrepo"
#     msg("@!@{rf}%s: error: %s" % (prog, text), indent_next=len(prog) + 9)


from .util import UserError, YAMLError
from pickle import PickleError
from .ui import error
from pygit2 import GitError
    from argparse import SUPPRESS
    from . import __version__
    from argparse import SUPPRESS, FileType
import sys
import traceback
                import rosrepo.cmd_bash
                import rosrepo.cmd_build
                import rosrepo.cmd_include_exclude
                import rosrepo.cmd_clean
                import rosrepo.cmd_config
                import rosrepo.cmd_depend
                import rosrepo.cmd_git
                import rosrepo.cmd_init
                import rosrepo.cmd_list
                import rosrepo.cmd_export
                import rosrepo.cmd_find
                import rosrepo.cmd_test
    import argparse
    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select packages to include")
    p.set_defaults(func=CMD_INCLUDE_EXCLUDE)

    # exclude
    p = cmds.add_parser("exclude", help="remove packages from default set or pinned set")
    add_common_options(p)
    p.add_argument("-l", "--list", action="store_true", help="list packages but do not change anything")
    p.add_argument("-p", "--protocol", help="use PROTOCOL to clone missing packages from Gitlab (default: ssh)")
    p.add_argument("--delete-unused", action="store_true", help="delete unused projects from workspace (DANGEROUS)")
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("-P", "--pinned", action="store_true", help="remove packages from pinned set")
    m.add_argument("-S", "--default", action="store_true", help="remove packages from default set")
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("-a", "--all", action="store_true", help="select all packages")
    m.add_argument("--last", action="store_true", help="select packages from the last build")
    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select packages to exclude")
    p.set_defaults(func=CMD_INCLUDE_EXCLUDE)

    # depend
    p = cmds.add_parser("depend", help="show package dependencies")
    add_common_options(p)
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select affected packages")
    p.set_defaults(func=CMD_DEPEND)

    # export
    p = cmds.add_parser("export", help="export workspace packages to rosinstall files")

# Path: src/rosrepo/util.py
# def yaml_load(stream, Loader=SafeLoader):
# def yaml_dump(data, stream=None, Dumper=SafeDumper, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __str__(self):
#     def __getitem__(self, item):
#     def __setitem__(self, item, value):
#     def __len__(self):
# def is_deprecated_package(manifest):
# def deprecated_package_info(manifest):
# def path_has_prefix(path, prefix):
# def has_package_path(obj, paths):
# def env_path_list_contains(path_list, path):
# def makedirs(path):
# def write_atomic(filepath, data, mode=0o644, ignore_fail=False):
# def isatty(fd):
# def get_terminal_size():
# def find_program(program):
#     def is_exe(fpath):
# def getmtime(path):
# def call_process(args, bufsize=0, stdin=None, stdout=None, stderr=None, cwd=None, env=None, input_data=None):
# def create_multiprocess_manager():
# def _worker_init(worker_init, worker_init_args):
# def run_multiprocess_workers(worker, workload, worker_init=None, worker_init_args=(), jobs=None, timeout=None):
# class NamedTuple(object):
# class UserError(RuntimeError):
# 
# Path: src/rosrepo/ui.py
# def error(text, use_color=None):
#     prog = "rosrepo"
#     msg("@!@{rf}%s: error: %s" % (prog, text), indent_next=len(prog) + 9)


# Path: src/rosrepo/main.py
from .util import UserError, YAMLError
from pickle import PickleError
from .ui import error
from pygit2 import GitError
    from argparse import SUPPRESS
    from . import __version__
    from argparse import SUPPRESS, FileType
import sys
import traceback
                import rosrepo.cmd_bash
                import rosrepo.cmd_build
                import rosrepo.cmd_include_exclude
                import rosrepo.cmd_clean
                import rosrepo.cmd_config
                import rosrepo.cmd_depend
                import rosrepo.cmd_git
                import rosrepo.cmd_init
                import rosrepo.cmd_list
                import rosrepo.cmd_export
                import rosrepo.cmd_find
                import rosrepo.cmd_test
    import argparse

    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select packages to include")
    p.set_defaults(func=CMD_INCLUDE_EXCLUDE)

    # exclude
    p = cmds.add_parser("exclude", help="remove packages from default set or pinned set")
    add_common_options(p)
    p.add_argument("-l", "--list", action="store_true", help="list packages but do not change anything")
    p.add_argument("-p", "--protocol", help="use PROTOCOL to clone missing packages from Gitlab (default: ssh)")
    p.add_argument("--delete-unused", action="store_true", help="delete unused projects from workspace (DANGEROUS)")
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("-P", "--pinned", action="store_true", help="remove packages from pinned set")
    m.add_argument("-S", "--default", action="store_true", help="remove packages from default set")
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("-a", "--all", action="store_true", help="select all packages")
    m.add_argument("--last", action="store_true", help="select packages from the last build")
    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select packages to exclude")
    p.set_defaults(func=CMD_INCLUDE_EXCLUDE)

    # depend
    p = cmds.add_parser("depend", help="show package dependencies")
    add_common_options(p)
    m = p.add_mutually_exclusive_group(required=False)
    m.add_argument("--this", action="store_true", help="select packages in the current working directory")
    m.add_argument("packages", metavar="PACKAGE", default=[], nargs="*", help="select affected packages")
    p.set_defaults(func=CMD_DEPEND)

    # export
    p = cmds.add_parser("export", help="export workspace packages to rosinstall files")

    add_common_options(p)