in assets/development/digest/genCVSlog.py [0:0]
def processBranchChanges( grouping, tag, branchChanges ):
for user, changes2 in branchChanges.items():
if tag == "": tag = "HEAD"
merged = ""
css_tag = "branch"
if grouping:
for mbranch in merged_branches:
if len(tag) and tag.find ( mbranch ) != -1:
merged = " [ <a href='#merged_%s'>and it was merged</a> ]" \
% ( mbranch, )
css_tag = "mergedbranch"
print "\n<a name='%s'></a><a name='%s_%s'></a><div class=\"%s\">%s was changed by %s(%s)%s</div>" % \
( tag, tag, user, css_tag, tag, getFullName(user), user, merged )
mergedBranches = {} # "merged_branch": ( file1, file2 , etc )
for change, changes3 in changes2.items():
# if change == "integrated" and summarizeIntegration :
# # build summary of files on branches here
# for comment, elements in changes3.items():
# pass
#
# else:
for comment, elements in changes3.items():
comment = bugMatch.sub( replaceWithIZLink, comment )
# print >>sys.stderr, "comment is ", comment
print "<div class='%s'>%s : %s" % ( change, change, comment )
print "<div class=\"file-list\">"
if len (elements) :
files={}
fileNo = 0
for i in elements:
fileNo += 1
if i.find ( "http:" ) == -1:
cleanest = i.strip().replace ( " ", "/" )
else:
clean = re.sub("http://.*/browse/","", i )
cleaner = re.sub("\.diff\?.*","", clean )
cleanest = re.sub("\?.*","", cleaner )
if verbose:
print >>sys.stderr, "stripped:", cleanest
#dirE = re.sub("/[a-zA-Z0-9_.]*","",cleanest)
file = re.sub(".*/","",cleanest)
dirE = cleanest [ :-len(file)]
if verbose:
print >>sys.stderr, "branch=",tag, "dir=", dirE, " and file=", file
if not files.has_key( dirE ): files [ dirE ] = []
if i.find ( "http:" ) == -1:
files [ dirE ].append ( file )
else:
if suppressFilesOn .has_key( tag ) and suppressFilesOn [ tag ].has_key(user) \
and file.find ( suppressFilesOn [ tag ][user] ) != -1 :
files [ dirE ].append ( "<a href='%s'>%s</a>" % ( i, fileNo ))
else:
files [ dirE ].append ( "<a href='%s'>%s</a>" % ( i, file ))
if change=="removed" or ( change=="modified" and \
( comment.find(u"RESYNC:; FILE MERGED") != -1 ) ):
#print >>sys.stderr, change, files
print " files from:"
for d,fs in files.items():
if len(fs) == 1:
print "%s%s" % ( d, fs[0] )
else:
print "%s:" %( d, )
for f in fs:
print "%s," %( f, )
else:
for d,fs in files.items():
if len(fs) == 1:
print "\t\t%s%s" % ( d, fs[0] )
else:
print "\t\t", d, " : ",
for i in range(len(fs)-1):
print "%s," % ( fs[i],),
print "%s ;" % ( fs[len(fs) -1],)
#print "<br>"
else:
print "\t\t",
for i in elements:
clean = re.sub("http://.*/browse/","", i )
cleaner = re.sub("\.diff\?.*","", clean )
cleanest = re.sub("\?.*","", cleaner )
#dirE = re.sub("/[a-zA-Z0-9_.]*","",cleanest)
#file = re.sub(".*/","",cleanest)
if len ( cleaner ) == 0:
cleanest = re.sub("\?rev=.*","", clean )
print "<a href='%s'> %s</a>" % (i, cleanest)
if len(elements) > 1: ", ",
#print "<br>"
print "</div>"
print "</div>"
print "<p>"