branch: externals/debbugs
commit b0bd33b0658d578e5540efc8f3f2f2adc77d636a
Author: Michael Albinus <[email protected]>
Commit: Michael Albinus <[email protected]>
* debbugs.el (debbugs-get-status): Handle the case of nil BUG-NUMBERS.
---
ChangeLog | 5 +++++
debbugs.el | 61 +++++++++++++++++++++++++++++++------------------------------
2 files changed, 36 insertions(+), 30 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bb174fd..e7f7ae6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-06 Michael Albinus <[email protected]>
+
+ * debbugs.el (debbugs-get-status): Handle the case of nil
+ BUG-NUMBERS.
+
2011-08-12 Michael Albinus <[email protected]>
* Debbugs.wsdl (ArrayOfArrayOfAnyType)
diff --git a/debbugs.el b/debbugs.el
index 4e5f5bd..550d554 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -288,37 +288,38 @@ Example:
\(last_modified . 1271200046.0)
\(pending . \"pending\")
\(package \"emacs\")))"
- (let ((object
- (car
- (soap-invoke
- debbugs-wsdl debbugs-port "get_status"
- (apply 'vector bug-numbers)))))
- (mapcar
- (lambda (x)
- (let (y)
- ;; "archived" is the number 1 or 0.
- (setq y (assoc 'archived (cdr (assoc 'value x))))
- (setcdr y (= (cdr y) 1))
- ;; "found_versions" and "fixed_versions" are lists,
- ;; containing strings or numbers.
- (dolist (attribute '(found_versions fixed_versions))
- (setq y (assoc attribute (cdr (assoc 'value x))))
- (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))))
- ;; "package" is a string, containing comma separated package names.
- ;; "keywords" and "tags" are strings, containing blank
- ;; separated package names.
- (dolist (attribute '(package keywords tags))
- (setq y (assoc attribute (cdr (assoc 'value x))))
+ (when bug-numbers
+ (let ((object
+ (car
+ (soap-invoke
+ debbugs-wsdl debbugs-port "get_status"
+ (apply 'vector bug-numbers)))))
+ (mapcar
+ (lambda (x)
+ (let (y)
+ ;; "archived" is the number 1 or 0.
+ (setq y (assoc 'archived (cdr (assoc 'value x))))
+ (setcdr y (= (cdr y) 1))
+ ;; "found_versions" and "fixed_versions" are lists,
+ ;; containing strings or numbers.
+ (dolist (attribute '(found_versions fixed_versions))
+ (setq y (assoc attribute (cdr (assoc 'value x))))
+ (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 (split-string (cdr y) ",\\| " t))))
- (cdr (assoc 'value x))))
- object)))
+ (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.
+ (dolist (attribute '(package keywords tags))
+ (setq y (assoc attribute (cdr (assoc 'value x))))
+ (when (stringp (cdr y))
+ (setcdr y (split-string (cdr y) ",\\| " t))))
+ (cdr (assoc 'value x))))
+ object))))
(defun debbugs-get-bug-log (bug-number)
"Return a list of messages related to BUG-NUMBER.