Exemplo n.º 1
0
def Main(argv):
  working_set = common.ReadWorkingSet()
  object_index = common.ReadObjectIndex(argv[1])

  for oi in object_index:
    working_set[int(oi)] = 0

  common.WriteWorkingSet(working_set)

  return 0
Exemplo n.º 2
0
def Main(argv):
    """Switch part of the objects file in working set to (possible) bad ones."""
    working_set = common.ReadWorkingSet()
    objects_file = common.ReadObjectsFile()
    object_index = common.ReadObjectIndex(argv[1])

    for oi in object_index:
        working_set[oi] = objects_file[oi]

    common.WriteWorkingSet(working_set)

    return 0
def Main(argv):
    working_set = common.ReadWorkingSet()
    object_index = common.ReadObjectIndex(argv[1])

    for oi in object_index:
        working_set[int(oi)] = 0

    shutil.copy(argv[1], './noinc_prune_good')

    common.WriteWorkingSet(working_set)

    return 0
Exemplo n.º 4
0
def Main(argv):
    working_set = common.ReadWorkingSet()
    object_index = common.ReadObjectIndex(argv[1])

    # Random number so the results can be checked
    for oi in object_index:
        working_set[int(oi)] = 42

    common.WriteWorkingSet(working_set)
    with open('tmp_file', 'w') as f:
        f.write(argv[1])

    return 0
def Main(_):
  working_set = common.ReadWorkingSet()

  if not os.path.exists(os.environ['BISECT_GOOD_SET']):
    print('Good set file does not exist!')
    return 1

  object_index = common.ReadObjectIndex(os.environ['BISECT_GOOD_SET'])

  for oi in object_index:
    working_set[int(oi)] = 0

  common.WriteWorkingSet(working_set)

  return 0
def Main(_):
    """Switch part of the objects file in working set to (possible) bad ones."""
    working_set = common.ReadWorkingSet()
    objects_file = common.ReadObjectsFile()

    if not os.path.exists(os.environ['BISECT_BAD_SET']):
        print('Bad set file does not exist!')
        return 1

    object_index = common.ReadObjectIndex(os.environ['BISECT_BAD_SET'])

    for oi in object_index:
        working_set[int(oi)] = objects_file[oi]

    common.WriteWorkingSet(working_set)

    return 0