# 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):


import os
from distutils.version import LooseVersion as Version
from .util import call_process, PIPE, iteritems
    from itertools import imap as map
    @property
    def repo(self):
        return self._repo

    @property
    def ref_name(self):
        return self._ref

    def _resolve_ref(self, ref):
        try:
            stdout = self.repo.git.rev_parse(ref, verify=True)
            return stdout.strip() or None
        except GitError:
            return None

    def _find_ref(self, name, scope=None):
        try:
            stdout = self.repo.git.show_ref(name)
            data = (s.split(" ", 1)[-1].strip() for s in stdout.split("\n"))
            for r in data:
                if scope is None or r.startswith(scope):
                    return r
        except GitError:
            pass
        return None

    def _iter_ref(self, flt, cls):
        stdout = self.repo.git.show_ref()
        data = (s.split(" ", 1)[-1].strip() for s in stdout.split("\n"))
        result = set()

# 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/git.py
import os
from distutils.version import LooseVersion as Version
from .util import call_process, PIPE, iteritems
    from itertools import imap as map

    @property
    def repo(self):
        return self._repo

    @property
    def ref_name(self):
        return self._ref

    def _resolve_ref(self, ref):
        try:
            stdout = self.repo.git.rev_parse(ref, verify=True)
            return stdout.strip() or None
        except GitError:
            return None

    def _find_ref(self, name, scope=None):
        try:
            stdout = self.repo.git.show_ref(name)
            data = (s.split(" ", 1)[-1].strip() for s in stdout.split("\n"))
            for r in data:
                if scope is None or r.startswith(scope):
                    return r
        except GitError:
            pass
        return None

    def _iter_ref(self, flt, cls):
        stdout = self.repo.git.show_ref()
        data = (s.split(" ", 1)[-1].strip() for s in stdout.split("\n"))
        result = set()

        for r in data: