From b61abd5ff5ebf69f08f1ec17471578676e88e028 Mon Sep 17 00:00:00 2001 From: pauget Date: Sat, 2 Aug 2003 21:35:53 +0200 Subject: [PATCH] Pour les diff avec mdp -- Fred darcs-hash:20030802193553-41617-6ed5605a38b4cf012377d441ad755866ee13b8b0.gz --- syncmail | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/syncmail b/syncmail index e299b21c..9a3306a2 100755 --- a/syncmail +++ b/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]