# 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

    def __contains__(self, item):
        return self._find_ref(item.ref_name if hasattr(item, "ref_name") else str(item), scope=self._ref + "/") is not None

    def __iter__(self):
        return self._iter_ref(
            flt=lambda x: (x.startswith(self._ref + "/"), x[len(self._ref) + 1:]),
            cls=self._cls
        )

    def _from_string(self, name):
        if name == "":
            return self
        return self._cls(name)


class Branches(ReferenceCollection):
    __slots__ = ()

    def __init__(self, repo):
        super(Branches, self).__init__(repo, "refs/heads", lambda x: BranchReference(repo, x))

    def __delattr__(self, name):
        self.repo.git.branch(name, delete=True)

    def new(self, name, *args, **kwargs):
        self.repo.git.branch(name, *args, **kwargs)
        return self._cls(name)



# 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


    def __contains__(self, item):
        return self._find_ref(item.ref_name if hasattr(item, "ref_name") else str(item), scope=self._ref + "/") is not None

    def __iter__(self):
        return self._iter_ref(
            flt=lambda x: (x.startswith(self._ref + "/"), x[len(self._ref) + 1:]),
            cls=self._cls
        )

    def _from_string(self, name):
        if name == "":
            return self
        return self._cls(name)


class Branches(ReferenceCollection):
    __slots__ = ()

    def __init__(self, repo):
        super(Branches, self).__init__(repo, "refs/heads", lambda x: BranchReference(repo, x))

    def __delattr__(self, name):
        self.repo.git.branch(name, delete=True)

    def new(self, name, *args, **kwargs):
        self.repo.git.branch(name, *args, **kwargs)
        return self._cls(name)



class Tags(ReferenceCollection):