All pastes #942574 Raw Edit

Unbenannt

public text v1 · immutable
·published 2008-03-14 16:51 UTC
rendered paste body
import launchpadbugs.connector as Connector

def get_all_dups(bugs, buglist, dup, level=0):
	for b in bugs:
		if b == None or b in buglist or b == dup:
			continue
		bug = Bug(b)
		if bug.duplicate_of != dup:
			buglist.add(b)
			print "%sHandling bug %d: %s" % ("\t"*level, b, bug.title)
			print "\t"*level, "-> Found:", ', '.join([ str(x) for x in set([bug.duplicate_of]) | bug.duplicates])
		get_all_dups(set([bug.duplicate_of]) | bug.duplicates, buglist, dup, level+1)

Bug = Connector.ConnectBug()
Bug.authentication="cookies.txt"

dup_list = set()
start_list = [190647, 190762, 191179, 192539, 193302, 193832, 193937, 196975, 197710, 197712, 197904, 198094, 200066, 200128, 200746]
masterbug = 160266

get_all_dups(start_list, dup_list, masterbug)