Ejemplo n.º 1
0
Archivo: state.py Proyecto: zhangpf/arc
    def __init__(self):
        self._mods = collections.defaultdict(list)
        android_submodule_paths = internal.get_android_submodule_paths()
        for mod in rebase_mod.get_all_arc_android_mods():
            android_submodule_path = internal.identify_containing_submodule(
                mod.android_path, submodules=android_submodule_paths)
            # logging.debug('%s %s', android_submodule_path, mod.new_mod_path)
            self._mods[android_submodule_path].append(mod)

        self._verified_mods = []
        self._rebased_mods = []
        self._rebased_submodules = 0
Ejemplo n.º 2
0
Archivo: mod.py Proyecto: epowers/arc
def get_arc_android_mod(mod_path, submodules=None):
  submodules = internal.ensure_android_submodule_paths(submodules)

  mod_path = internal.relpath(mod_path, constants.ARC_ROOT)
  android_path = internal.get_android_path_for_mod(mod_path)
  if not android_path:
    return None

  android_module_path = internal.identify_containing_submodule(
      android_path, submodules=submodules)

  uses_mod_track = android_path != staging.get_default_tracking_path(mod_path)

  return _ModState(mod_path, android_path, android_module_path, uses_mod_track)
Ejemplo n.º 3
0
def get_arc_android_mod(mod_path, submodules=None):
    submodules = internal.ensure_android_submodule_paths(submodules)

    mod_path = internal.relpath(mod_path, constants.ARC_ROOT)
    android_path = internal.get_android_path_for_mod(mod_path)
    if not android_path:
        return None

    android_module_path = internal.identify_containing_submodule(
        android_path, submodules=submodules)

    uses_mod_track = android_path != staging.get_default_tracking_path(
        mod_path)

    return _ModState(mod_path, android_path, android_module_path,
                     uses_mod_track)