Lines 1414-1433
Link Here
|
1414 |
for y in fails[x]: |
1414 |
for y in fails[x]: |
1415 |
print " "+y |
1415 |
print " "+y |
1416 |
|
1416 |
|
1417 |
def grouplist(mylist,seperator="/"): |
1417 |
def grouplist(mylist,separator="/"): |
1418 |
"""(list,seperator="/") -- Takes a list of elements; groups them into |
1418 |
"""(list,separator="/") -- Takes a list of elements; groups them into |
1419 |
same initial element categories. Returns a dict of {base:[sublist]} |
1419 |
same initial element categories. Returns a dict of {base:[sublist]} |
1420 |
From: ["blah/foo","spork/spatula","blah/weee/splat"] |
1420 |
From: ["blah/foo","spork/spatula","blah/weee/splat"] |
1421 |
To: {"blah":["foo","weee/splat"], "spork":["spatula"]}""" |
1421 |
To: {"blah":["foo","weee/splat"], "spork":["spatula"]}""" |
1422 |
mygroups={} |
1422 |
mygroups={} |
1423 |
for x in mylist: |
1423 |
for x in mylist: |
1424 |
xs=string.split(x,seperator) |
1424 |
xs=string.split(x,separator) |
1425 |
if xs[0]==".": |
1425 |
if xs[0]==".": |
1426 |
xs=xs[1:] |
1426 |
xs=xs[1:] |
1427 |
if xs[0] not in mygroups.keys(): |
1427 |
if xs[0] not in mygroups.keys(): |
1428 |
mygroups[xs[0]]=[string.join(xs[1:],seperator)] |
1428 |
mygroups[xs[0]]=[string.join(xs[1:],separator)] |
1429 |
else: |
1429 |
else: |
1430 |
mygroups[xs[0]]+=[string.join(xs[1:],seperator)] |
1430 |
mygroups[xs[0]]+=[string.join(xs[1:],separator)] |
1431 |
return mygroups |
1431 |
return mygroups |
1432 |
|
1432 |
|
1433 |
if mymode!="commit": |
1433 |
if mymode!="commit": |