[Reproducible-commits] [misc] 01/01: edit-notes: add -u to remove entire note blocks

Mattia Rizzolo mattia at mapreri.org
Sun Jul 26 10:38:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

mapreri-guest pushed a commit to branch master
in repository misc.

commit 363fa7bbfa99cda8a8b52acecb8b3d06e18e17ad
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Sun Jul 26 10:38:49 2015 +0000

    edit-notes: add -u to remove entire note blocks
---
 edit-notes | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/edit-notes b/edit-notes
index 9b14d57..b635509 100755
--- a/edit-notes
+++ b/edit-notes
@@ -14,6 +14,8 @@ parser.add_argument('-v', '--take-version', action='store_true')
 parser.add_argument('-c', '--set-comment')
 parser.add_argument('-b', '--add-bug', action='append', default=[])
 parser.add_argument('-d', '--fix-deterministic', action='store_true')
+parser.add_argument('-u', dest='remove', action='store_true',
+                    help='remove the whole note block')
 parser.add_argument('packages', nargs='*')
 args = parser.parse_args()
 
@@ -74,4 +76,11 @@ if __name__ == '__main__':
         if args.set_comment:
             data['comments'] = args.set_comment
 
+    if args.remove:
+        for pkg in args.packages:
+            try:
+                notes.pop(pkg)
+            except KeyError:
+                print('%s is not in the notes, skipping removing', pkg)
+
     clean.write_out(notes)

-- 
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