[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/debbugs da6a351 132/311: Handle blocked bugs in debbugs
From: |
Stefan Monnier |
Subject: |
[elpa] externals/debbugs da6a351 132/311: Handle blocked bugs in debbugs |
Date: |
Sun, 29 Nov 2020 18:41:56 -0500 (EST) |
branch: externals/debbugs
commit da6a351c16da0164243903bb7535c94d81efe1e9
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Handle blocked bugs in debbugs
* debbugs-gnu.el (debbugs-gnu-mode-map): Add keys "b" and "B".
(debbugs-gnu-show-blocked-by-reports)
(debbugs-gnu-show-blocking-reports): New defuns.
(debbugs-gnu-send-control-message): Implement "unmerge", "block"
and "unblock".
* debbugs.el (debbugs-get-status): Handle also `blocks' and `blockedby.
---
Debbugs.wsdl | 2 +-
debbugs-gnu.el | 44 ++++++++++++++++++++++++++++++++++++++++----
debbugs-org.el | 2 +-
debbugs.el | 13 ++++++++-----
debbugs.texi | 2 +-
5 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/Debbugs.wsdl b/Debbugs.wsdl
index b186c80..427a381 100644
--- a/Debbugs.wsdl
+++ b/Debbugs.wsdl
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2011-2014 Free Software Foundation, Inc.
+<!-- Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is not part of GNU Emacs.
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3fe88ca..97c67e4 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1,6 +1,6 @@
;;; debbugs-gnu.el --- interface for the GNU bug tracker
-;; Copyright (C) 2011-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Michael Albinus <michael.albinus@gmx.org>
@@ -92,6 +92,8 @@
;; RET: Show corresponding messages in Gnus
;; "C": Send a control message
;; "t": Mark the bug locally as tagged
+;; "b": Show bugs this bug is blocked by
+;; "B": Show bugs this bug is blocking
;; "d": Show bug attributes
;; Furthermore, you could apply the global actions
@@ -791,6 +793,8 @@ Used instead of `tabulated-list-print-entry'."
(define-key map "x" 'debbugs-gnu-toggle-suppress)
(define-key map "/" 'debbugs-gnu-narrow-to-status)
(define-key map "w" 'debbugs-gnu-widen)
+ (define-key map "b" 'debbugs-gnu-show-blocked-by-reports)
+ (define-key map "B" 'debbugs-gnu-show-blocking-reports)
(define-key map "C" 'debbugs-gnu-send-control-message)
map))
@@ -926,6 +930,24 @@ The following commands are available:
(when id
(debbugs-gnu-goto id))))
+(defun debbugs-gnu-show-blocked-by-reports ()
+ "Display all bug reports this report is blocked by."
+ (interactive)
+ (let ((id (debbugs-gnu-current-id))
+ (status (debbugs-gnu-current-status)))
+ (if (null (cdr (assq 'blockedby status)))
+ (message "Bug %d is not blocked by any other bug" id)
+ (apply 'debbugs-gnu-bugs (cdr (assq 'blockedby status))))))
+
+(defun debbugs-gnu-show-blocking-reports ()
+ "Display all bug reports this report is blocking."
+ (interactive)
+ (let ((id (debbugs-gnu-current-id))
+ (status (debbugs-gnu-current-status)))
+ (if (null (cdr (assq 'blocks status)))
+ (message "Bug %d is not blocking any other bug" id)
+ (apply 'debbugs-gnu-bugs (cdr (assq 'blocks status))))))
+
(defun debbugs-gnu-narrow-to-status (string &optional status-only)
"Only display the bugs matching STRING.
If STATUS-ONLY (the prefix), ignore matches in the From and
@@ -1104,8 +1126,9 @@ removed instead."
"Control message: "
'("serious" "important" "normal" "minor" "wishlist"
"done" "donenotabug" "donewontfix" "doneunreproducible"
- "unarchive" "reopen" "close"
+ "unarchive" "unmerge" "reopen" "close"
"merge" "forcemerge"
+ "block" "unblock"
"owner" "noowner"
"invalid"
"reassign"
@@ -1134,18 +1157,31 @@ removed instead."
(format "%s.%s"
(match-string 1 emacs-version)
(match-string 2 emacs-version)))
- (t emacs-version))))))
+ (t emacs-version)))))
+ (status (debbugs-gnu-current-status)))
(with-temp-buffer
(insert "To: control@debbugs.gnu.org\n"
"From: " (message-make-from) "\n"
(format "Subject: control message for bug #%d\n" id)
"\n"
(cond
- ((member message '("unarchive" "reopen" "noowner"))
+ ((member message '("unarchive" "unmerge" "reopen" "noowner"))
(format "%s %d\n" message id))
((member message '("merge" "forcemerge"))
(format "%s %d %s\n" message id
(read-string "Merge with bug #: ")))
+ ((member message '("block" "unblock"))
+ (format
+ "%s %d by %s\n" message id
+ (mapconcat
+ 'identity
+ (completing-read-multiple
+ (format "%s with bug(s) #: " (capitalize message))
+ (if (equal message "unblock")
+ (mapcar 'number-to-string
+ (cdr (assq 'blockedby status))))
+ nil (and (equal message "unblock") status))
+ " ")))
((equal message "owner")
(format "owner %d !\n" id))
((equal message "reassign")
diff --git a/debbugs-org.el b/debbugs-org.el
index 8a98aec..d49219f 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -1,6 +1,6 @@
;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
-;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.org>
;; Keywords: comm, hypermedia, maint, outlines
diff --git a/debbugs.el b/debbugs.el
index 725a394..35caf83 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -1,6 +1,6 @@
;;; debbugs.el --- SOAP library to access debbugs servers
-;; Copyright (C) 2011-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hypermedia
@@ -309,10 +309,13 @@ Example:
(setcdr y (mapcar
(lambda (z) (if (numberp z) (number-to-string z) z))
(cdr y))))
- ;; "mergedwith" is a string, containing blank separated bug numbers.
- (setq y (assoc 'mergedwith (cdr (assoc 'value x))))
- (when (stringp (cdr y))
- (setcdr y (mapcar 'string-to-number (split-string (cdr y) " " t))))
+ ;; "mergedwith", "blocks" and "blockedby are strings,
+ ;; containing blank separated bug numbers.
+ (dolist (attribute '(mergedwith blocks blockedby))
+ (setq y (assoc attribute (cdr (assoc 'value x))))
+ (when (stringp (cdr y))
+ (setcdr y (mapcar
+ 'string-to-number (split-string (cdr y) " " t)))))
;; "package" is a string, containing comma separated
;; package names. "keywords" and "tags" are strings,
;; containing blank separated package names.
diff --git a/debbugs.texi b/debbugs.texi
index 8c70e26..c26717a 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -8,7 +8,7 @@
@end direntry
@copying
-Copyright @copyright{} 2011-2014 Free Software Foundation, Inc.
+Copyright @copyright{} 2011-2015 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
- [elpa] externals/debbugs e794c6c 104/311: Adapt copyright years., (continued)
- [elpa] externals/debbugs e794c6c 104/311: Adapt copyright years., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 698e4c8 095/311: * debbugs.el (debbugs-get-usertag): Change parameters to a KEY-VALUE sequence., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 902baa4 106/311: Only keep the strictly necessary *-pkg.el files, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs d11276e 112/311: Update copyright years., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 399edb4 113/311: New command `debbugs-org-regenerate-status', Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 792d98f 116/311: * debbugs-org.el (debbugs-org-show-buffer-name): New defvar., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 37eba87 117/311: * debbugs-gnu.el (debbugs-gnu-default-packages): Add new packages., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs e27f085 124/311: * packages/debbugs/debbugs-org.el: Miscellanous cleanups., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 6b87b3b 126/311: Update the debbugs tag face when switching it off, too, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 9136369 130/311: Add a lot of Emacs maintainer DWIM, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs da6a351 132/311: Handle blocked bugs in debbugs,
Stefan Monnier <=
- [elpa] externals/debbugs f50bf5d 137/311: New file debbugs-reference.el, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs b021f3b 138/311: * debbugs-ug.texi (Minor Modes): New node., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 1883e24 053/311: * debbugs.el (debbugs-get-bugs): Extend syntax for packages (and, Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs a40dc43 076/311: * debbugs-gnu.el (debbugs-gnu-phrase-prompt): New defconst., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 6f5d15b 078/311: (debbugs-gnu-show-reports): Increase the stale time to two weeks., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 220e57b 077/311: * debbugs-gnu.el (debbugs-gnu-show-reports): Only list merged bugs once., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs f919ced 094/311: Fix typo., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs ad9c74d 096/311: * debbugs.el (debbugs-get-usertag): Fix comments., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 3371e00 097/311: * debbugs-gnu.el (debbugs-gnu-usertags): Show also local tags., Stefan Monnier, 2020/11/29
- [elpa] externals/debbugs 46fd25b 100/311: * debbugs.texi: Add 2012 to copyright years., Stefan Monnier, 2020/11/29