summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2010-04-02 10:21:57 -0400
committerSam Steingold <sds@gnu.org>2010-04-02 10:21:57 -0400
commit3fb87bf50d9de85aebc897023f5300008077c9ed (patch)
tree45e49a8fe9cb2f54219e75d87a5cdd574ff5b822
parent7a5a264fc27bde6870f08ecc5d85eddc36fa0336 (diff)
downloademacs-3fb87bf50d9de85aebc897023f5300008077c9ed.tar.gz
(vc-hg-push, vc-hg-pull): Use `apply' when calling
`vc-hg-command' with a list of flags.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-hg.el25
2 files changed, 18 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1bbc73872ab..d38826011f4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-02 Sam Steingold <sds@gnu.org>
+
+ * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
+ `vc-hg-command' with a list of flags.
+
2010-04-02 Jan Djärv <jan.h.d@swipnet.se>
* tmm.el (tmm-get-keymap): Check with symbolp before passing
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index f28d6e75110..7b00e5766a6 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -235,10 +235,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(with-current-buffer
buffer
(apply 'vc-hg-command buffer 0 files "log"
- (append
+ (nconc
(when start-revision (list (format "-r%s:" start-revision)))
(when limit (list "-l" (format "%s" limit)))
- (when shortlog '("--style" "compact"))
+ (when shortlog (list "--style" "compact"))
vc-hg-log-switches)))))
(defvar log-view-message-re)
@@ -419,7 +419,8 @@ COMMENT is ignored."
(defun vc-hg-checkin (files rev comment &optional extra-args)
"Hg-specific version of `vc-backend-checkin'.
REV is ignored."
- (apply 'vc-hg-command nil 0 files (append (list "commit" "-m" comment) extra-args)))
+ (apply 'vc-hg-command nil 0 files
+ (nconc (list "commit" "-m" comment) extra-args)))
(defun vc-hg-find-revision (file rev buffer)
(let ((coding-system-for-read 'binary)
@@ -611,22 +612,22 @@ REV is the revision to check out into WORKFILE."
(interactive)
(let ((marked-list (log-view-get-marked)))
(if marked-list
- (vc-hg-command
- nil 0 nil
- (cons "push"
+ (apply #'vc-hg-command
+ nil 0 nil
+ "push"
(apply 'nconc
- (mapcar (lambda (arg) (list "-r" arg)) marked-list))))
- (error "No log entries selected for push"))))
+ (mapcar (lambda (arg) (list "-r" arg)) marked-list)))
+ (error "No log entries selected for push"))))
(defun vc-hg-pull ()
(interactive)
(let ((marked-list (log-view-get-marked)))
(if marked-list
- (vc-hg-command
- nil 0 nil
- (cons "pull"
+ (apply #'vc-hg-command
+ nil 0 nil
+ "pull"
(apply 'nconc
- (mapcar (lambda (arg) (list "-r" arg)) marked-list))))
+ (mapcar (lambda (arg) (list "-r" arg)) marked-list)))
(error "No log entries selected for pull"))))
;;; Internal functions