Pour les diff avec mdp
-- Fred darcs-hash:20030802193553-41617-6ed5605a38b4cf012377d441ad755866ee13b8b0.gz
This commit is contained in:
parent
04f967de8e
commit
b61abd5ff5
1 changed files with 11 additions and 3 deletions
14
syncmail
14
syncmail
|
@ -185,9 +185,6 @@ def calculate_diff(filespec, contextlines):
|
|||
str(e), '\n***** file: ', file, ' cwd: ', os.getcwd()]
|
||||
elif newrev == 'NONE':
|
||||
lines = ['--- %s DELETED ---\n' % file]
|
||||
elif string.find(file,"httpd.conf") == 0 or string.find(file,"create_sondage.py") == 0:
|
||||
# Il y a le mdp mysql pour les sondages dans ces fichiers
|
||||
lines = ['--- diff de %s masquée ---n' % file]
|
||||
else:
|
||||
# This /has/ to happen in the background, otherwise we'll run into CVS
|
||||
# lock contention. What a crock.
|
||||
|
@ -203,6 +200,17 @@ def calculate_diff(filespec, contextlines):
|
|||
# ignore the error code, it always seems to be 1 :(
|
||||
## if sts:
|
||||
## return 'Error code %d occurred during diff\n' % (sts >> 8)
|
||||
|
||||
try:
|
||||
# On vire du diff les lignes marquées avec *PASS*
|
||||
a=0
|
||||
while 1:
|
||||
a=a+1
|
||||
if string.find(lines[a],'*PASS*') > -1:
|
||||
lines[a]= '[ Mot de passe ]\n'
|
||||
except:
|
||||
a=0
|
||||
|
||||
if len(lines) > DIFF_TRUNCATE_IF_LARGER:
|
||||
removedlines = len(lines) - DIFF_HEAD_LINES - DIFF_TAIL_LINES
|
||||
del lines[DIFF_HEAD_LINES:-DIFF_TAIL_LINES]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue