if basedir and basedir[-1]!="/":
basedir=basedir+"/"
mylist=[]
- for myfile in entries["files"].keys():
+ for myfile in entries["files"]:
if "cvs" in entries["files"][myfile]["status"]:
if "0" == entries["files"][myfile]["revision"]:
mylist.append(basedir+myfile)
if recursive:
- for mydir in entries["dirs"].keys():
+ for mydir in entries["dirs"]:
mylist+=findnew(entries["dirs"][mydir],recursive,basedir+mydir)
return mylist
if basedir and basedir[-1]!="/":
basedir=basedir+"/"
mylist=[]
- for myfile in entries["files"].keys():
+ for myfile in entries["files"]:
if "cvs" in entries["files"][myfile]["status"]:
if "current" not in entries["files"][myfile]["status"]:
if "exists" in entries["files"][myfile]["status"]:
if entries["files"][myfile]["revision"]!="0":
mylist.append(basedir+myfile)
if recursive:
- for mydir in entries["dirs"].keys():
+ for mydir in entries["dirs"]:
mylist+=findchanged(entries["dirs"][mydir],recursive,basedir+mydir)
return mylist
if basedir and basedir[-1]!="/":
basedir=basedir+"/"
mylist=[]
- for myfile in entries["files"].keys():
+ for myfile in entries["files"]:
if "cvs" in entries["files"][myfile]["status"]:
if "exists" not in entries["files"][myfile]["status"]:
if "removed" not in entries["files"][myfile]["status"]:
mylist.append(basedir+myfile)
if recursive:
- for mydir in entries["dirs"].keys():
+ for mydir in entries["dirs"]:
mylist+=findmissing(entries["dirs"][mydir],recursive,basedir+mydir)
return mylist
mylist=[]
#ignore what cvs ignores.
- for myfile in entries["files"].keys():
+ for myfile in entries["files"]:
if "cvs" not in entries["files"][myfile]["status"]:
mylist.append(basedir+myfile)
if recursive:
- for mydir in entries["dirs"].keys():
+ for mydir in entries["dirs"]:
mylist+=findunadded(entries["dirs"][mydir],recursive,basedir+mydir)
return mylist
if basedir and basedir[-1]!="/":
basedir=basedir+"/"
mylist=[]
- for myfile in entries["files"].keys():
+ for myfile in entries["files"]:
if "removed" in entries["files"][myfile]["status"]:
mylist.append(basedir+myfile)
if recursive:
- for mydir in entries["dirs"].keys():
+ for mydir in entries["dirs"]:
mylist+=findremoved(entries["dirs"][mydir],recursive,basedir+mydir)
return mylist
def perform_all(x, calc_prelink=0):
mydict = {}
- for k in hashfunc_map.keys():
+ for k in hashfunc_map:
mydict[k] = perform_checksum(x, hashfunc_map[k], calc_prelink)[0]
return mydict
got = " ".join(got)
return False, ("Insufficient data for checksum verification", got, expected)
- for x in mydict.keys():
+ for x in mydict:
if x == "size":
continue
- elif x in hashfunc_map.keys():
+ elif x in hashfunc_map:
myhash = perform_checksum(filename, x, calc_prelink=calc_prelink)[0]
if mydict[x] != myhash:
if strict:
"""Performs a function on each value of each key in a dictlist.
Returns a new dictlist."""
new_dl = {}
- for key in myDict.keys():
+ for key in myDict:
new_dl[key] = []
new_dl[key] = map(func,myDict[key])
return new_dl
for mydict in original_dicts:
if mydict is None:
continue
- for y in mydict.keys():
+ for y in mydict:
if not y in final_dict:
final_dict[y] = []
for x in mydict.values():
myfile.write(x+"\n")
else:
- for x in mydict.keys():
+ for x in mydict:
myfile.write("%s %s\n" % (x, " ".join(mydict[x])))
myfile.close()
except IOError: