[Reproducible-commits] [misc] 04/06: generalise add_{bug, note} handling
Chris Lamb
lamby at moszumanska.debian.org
Tue Jul 7 08:32:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository misc.
commit a3d9a53ccc6315d2fd241026da7b66dd0b857573
Author: Chris Lamb <lamby at debian.org>
Date: Tue Jul 7 09:30:43 2015 +0100
generalise add_{bug,note} handling
---
edit-notes | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/edit-notes b/edit-notes
index fe766a6..da12a8a 100755
--- a/edit-notes
+++ b/edit-notes
@@ -52,17 +52,15 @@ if __name__ == '__main__':
' seems to be fixed')
package_issues.remove(fix)
- for add in args.add_note:
- if 'issues' not in data:
- data['issues'] = []
- if add not in data['issues']:
- data['issues'].append(add)
-
- for x in args.add_bug:
- if 'bugs' not in data:
- data['bugs'] = []
- if x not in data['bugs']:
- data['bugs'].append(x)
+ for src, dst in (
+ (args.add_bug, 'bugs'),
+ (args.add_note, 'issues'),
+ ):
+ for x in src:
+ if dst not in data:
+ data[dst] = []
+ if x not in data[dst]:
+ data[dst].append(x)
if args.set_comment:
data['comments'] = args.set_comment
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list