]> err.no Git - dak/commitdiff
Do not break manual rejects when a note exists
authorJoerg Jaspert <joerg@debian.org>
Wed, 25 Nov 2009 21:21:29 +0000 (22:21 +0100)
committerJoerg Jaspert <joerg@debian.org>
Wed, 25 Nov 2009 21:21:29 +0000 (22:21 +0100)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/process_new.py
daklib/queue.py

index 7841a7d765003f23f08874257713009d894fc41a..060fa236964d539dbc2aa7ec5b49e7929f0b6513 100755 (executable)
@@ -679,7 +679,7 @@ def do_new(upload, session):
         elif answer == 'M' and not Options["Trainee"]:
             aborted = upload.do_reject(manual=1,
                                        reject_message=Options["Manual-Reject"],
-                                       note=get_new_comments(changes.get("source", ""), session=session))
+                                       notes=get_new_comments(changes.get("source", ""), session=session))
             if not aborted:
                 upload.pkg.remove_known_changes(session=session)
                 session.commit()
index c9a653288e8a2b49d29f6ea28cb6e423c9ddc9fb..5ea545fdc3ebdd45a3111b54431d25c5e0ba521d 100755 (executable)
@@ -2061,7 +2061,7 @@ distribution."""
             os.close(dest_fd)
 
     ###########################################################################
-    def do_reject (self, manual=0, reject_message="", note=""):
+    def do_reject (self, manual=0, reject_message="", notes=""):
         """
         Reject an upload. If called without a reject message or C{manual} is
         true, spawn an editor so the user can write one.
@@ -2080,9 +2080,10 @@ distribution."""
         if manual and not reject_message:
             (fd, temp_filename) = utils.temp_filename()
             temp_file = os.fdopen(fd, 'w')
-            if len(note) > 0:
-                for line in note:
-                    temp_file.write(line)
+            if len(notes) > 0:
+                for note in notes:
+                    temp_file.write("\nAuthor: %s\nVersion: %s\nTimestamp: %s\n\n%s" \
+                                    % (note.author, note.version, note.notedate, note.comment))
             temp_file.close()
             editor = os.environ.get("EDITOR","vi")
             answer = 'E'