From 9b8d843802a9c57505f36ab9ca5dc47ed825aff5 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 11 Feb 2009 22:01:05 +0100 Subject: [PATCH] Only add notes in second pass if the first was a failure --- notes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notes.py b/notes.py index 8dd5e36..17119b7 100755 --- a/notes.py +++ b/notes.py @@ -116,9 +116,11 @@ def _redo_pu(full, terse): full.extend(sha1, split_and_tab(t.cooking_notes)) full.append_line(sha1, '\n') -def _redo_for_query(full, terse, query): +def _redo_for_query(full, terse, query, skip_if_exists=False): count = 0 for cmt, mail in query: + if skip_if_exists and cmt.sha1 in full: + continue f, t = compute_notes(cmt, mail) if not (f or t): continue @@ -147,7 +149,7 @@ def _redo_patches(full, terse): db.Mail.post_date==db.Commit.adate))) .filter(db.Commit.upstream==True) .filter(db.Mail.has_patch==True)) - _redo_for_query(full, terse, query) + _redo_for_query(full, terse, query, True) def _redo_all(): count = 0 -- 2.11.4.GIT