diff options
| author | Sam Steingold | 2010-04-02 10:21:57 -0400 |
|---|---|---|
| committer | Sam Steingold | 2010-04-02 10:21:57 -0400 |
| commit | 3fb87bf50d9de85aebc897023f5300008077c9ed (patch) | |
| tree | 45e49a8fe9cb2f54219e75d87a5cdd574ff5b822 | |
| parent | 7a5a264fc27bde6870f08ecc5d85eddc36fa0336 (diff) | |
| download | emacs-3fb87bf50d9de85aebc897023f5300008077c9ed.tar.gz emacs-3fb87bf50d9de85aebc897023f5300008077c9ed.zip | |
(vc-hg-push, vc-hg-pull): Use `apply' when calling
`vc-hg-command' with a list of flags.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 25 |
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 @@ | |||
| 1 | 2010-04-02 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling | ||
| 4 | `vc-hg-command' with a list of flags. | ||
| 5 | |||
| 1 | 2010-04-02 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2010-04-02 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * tmm.el (tmm-get-keymap): Check with symbolp before passing | 8 | * 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." | |||
| 235 | (with-current-buffer | 235 | (with-current-buffer |
| 236 | buffer | 236 | buffer |
| 237 | (apply 'vc-hg-command buffer 0 files "log" | 237 | (apply 'vc-hg-command buffer 0 files "log" |
| 238 | (append | 238 | (nconc |
| 239 | (when start-revision (list (format "-r%s:" start-revision))) | 239 | (when start-revision (list (format "-r%s:" start-revision))) |
| 240 | (when limit (list "-l" (format "%s" limit))) | 240 | (when limit (list "-l" (format "%s" limit))) |
| 241 | (when shortlog '("--style" "compact")) | 241 | (when shortlog (list "--style" "compact")) |
| 242 | vc-hg-log-switches))))) | 242 | vc-hg-log-switches))))) |
| 243 | 243 | ||
| 244 | (defvar log-view-message-re) | 244 | (defvar log-view-message-re) |
| @@ -419,7 +419,8 @@ COMMENT is ignored." | |||
| 419 | (defun vc-hg-checkin (files rev comment &optional extra-args) | 419 | (defun vc-hg-checkin (files rev comment &optional extra-args) |
| 420 | "Hg-specific version of `vc-backend-checkin'. | 420 | "Hg-specific version of `vc-backend-checkin'. |
| 421 | REV is ignored." | 421 | REV is ignored." |
| 422 | (apply 'vc-hg-command nil 0 files (append (list "commit" "-m" comment) extra-args))) | 422 | (apply 'vc-hg-command nil 0 files |
| 423 | (nconc (list "commit" "-m" comment) extra-args))) | ||
| 423 | 424 | ||
| 424 | (defun vc-hg-find-revision (file rev buffer) | 425 | (defun vc-hg-find-revision (file rev buffer) |
| 425 | (let ((coding-system-for-read 'binary) | 426 | (let ((coding-system-for-read 'binary) |
| @@ -611,22 +612,22 @@ REV is the revision to check out into WORKFILE." | |||
| 611 | (interactive) | 612 | (interactive) |
| 612 | (let ((marked-list (log-view-get-marked))) | 613 | (let ((marked-list (log-view-get-marked))) |
| 613 | (if marked-list | 614 | (if marked-list |
| 614 | (vc-hg-command | 615 | (apply #'vc-hg-command |
| 615 | nil 0 nil | 616 | nil 0 nil |
| 616 | (cons "push" | 617 | "push" |
| 617 | (apply 'nconc | 618 | (apply 'nconc |
| 618 | (mapcar (lambda (arg) (list "-r" arg)) marked-list)))) | 619 | (mapcar (lambda (arg) (list "-r" arg)) marked-list))) |
| 619 | (error "No log entries selected for push")))) | 620 | (error "No log entries selected for push")))) |
| 620 | 621 | ||
| 621 | (defun vc-hg-pull () | 622 | (defun vc-hg-pull () |
| 622 | (interactive) | 623 | (interactive) |
| 623 | (let ((marked-list (log-view-get-marked))) | 624 | (let ((marked-list (log-view-get-marked))) |
| 624 | (if marked-list | 625 | (if marked-list |
| 625 | (vc-hg-command | 626 | (apply #'vc-hg-command |
| 626 | nil 0 nil | 627 | nil 0 nil |
| 627 | (cons "pull" | 628 | "pull" |
| 628 | (apply 'nconc | 629 | (apply 'nconc |
| 629 | (mapcar (lambda (arg) (list "-r" arg)) marked-list)))) | 630 | (mapcar (lambda (arg) (list "-r" arg)) marked-list))) |
| 630 | (error "No log entries selected for pull")))) | 631 | (error "No log entries selected for pull")))) |
| 631 | 632 | ||
| 632 | ;;; Internal functions | 633 | ;;; Internal functions |