diff options
| author | Stefan Monnier | 2008-04-03 02:21:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-03 02:21:33 +0000 |
| commit | 5a3b79c471d9ae3bb54fae2b91b21eac119ae85d (patch) | |
| tree | 2d8be49178a843bb0a335f02c91364187a850187 | |
| parent | bd1d6a63fcf01daeec366af4628d4de049e0e36b (diff) | |
| download | emacs-5a3b79c471d9ae3bb54fae2b91b21eac119ae85d.tar.gz emacs-5a3b79c471d9ae3bb54fae2b91b21eac119ae85d.zip | |
(vc-bzr-checkout): Simplify.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 29 |
2 files changed, 13 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bb89f6bc21..bb5dd122fb0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * vc-bzr.el (vc-bzr-checkout): Simplify. | ||
| 4 | |||
| 3 | * image-mode.el (image-mode-fit-frame): New command. | 5 | * image-mode.el (image-mode-fit-frame): New command. |
| 4 | 6 | ||
| 5 | * simple.el (beginning-of-buffer, end-of-buffer, goto-line, undo) | 7 | * simple.el (beginning-of-buffer, end-of-buffer, goto-line, undo) |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 7425b58bfcf..686dd1db65e 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -400,17 +400,10 @@ REV non-nil gets an error." | |||
| 400 | (vc-bzr-command "cat" t 0 file "-r" rev) | 400 | (vc-bzr-command "cat" t 0 file "-r" rev) |
| 401 | (vc-bzr-command "cat" t 0 file)))) | 401 | (vc-bzr-command "cat" t 0 file)))) |
| 402 | 402 | ||
| 403 | (defun vc-bzr-checkout (file &optional editable rev destfile) | 403 | (defun vc-bzr-checkout (file &optional editable rev) |
| 404 | "Checkout revision REV of FILE from bzr to DESTFILE. | 404 | (if rev (error "Operation not supported") |
| 405 | EDITABLE is ignored." | 405 | ;; Else, there's nothing to do. |
| 406 | (unless destfile | 406 | nil)) |
| 407 | (setq destfile (vc-version-backup-file-name file rev))) | ||
| 408 | (let ((coding-system-for-read 'binary) | ||
| 409 | (coding-system-for-write 'binary)) | ||
| 410 | (with-temp-file destfile | ||
| 411 | (if (and rev (stringp rev) (not (string= rev ""))) | ||
| 412 | (vc-bzr-command "cat" t 0 file "-r" rev) | ||
| 413 | (vc-bzr-command "cat" t 0 file))))) | ||
| 414 | 407 | ||
| 415 | (defun vc-bzr-revert (file &optional contents-done) | 408 | (defun vc-bzr-revert (file &optional contents-done) |
| 416 | (unless contents-done | 409 | (unless contents-done |
| @@ -445,18 +438,18 @@ EDITABLE is ignored." | |||
| 445 | (vc-setup-buffer buffer) | 438 | (vc-setup-buffer buffer) |
| 446 | ;; If the buffer exists from a previous invocation it might be | 439 | ;; If the buffer exists from a previous invocation it might be |
| 447 | ;; read-only. | 440 | ;; read-only. |
| 448 | ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so | 441 | ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so |
| 449 | ;; the log display may not what the user wants - but I see no other | 442 | ;; the log display may not what the user wants - but I see no other |
| 450 | ;; way of getting the above regexps working. | 443 | ;; way of getting the above regexps working. |
| 451 | (dolist (file files) | 444 | (dolist (file files) |
| 452 | (vc-exec-after | 445 | (vc-exec-after |
| 453 | `(let ((inhibit-read-only t)) | 446 | `(let ((inhibit-read-only t)) |
| 454 | (with-current-buffer buffer | 447 | (with-current-buffer buffer |
| 455 | ;; Insert the file name so that log-view.el can find it. | 448 | ;; Insert the file name so that log-view.el can find it. |
| 456 | (insert "Working file: " ',file "\n")) ;; Like RCS/CVS. | 449 | (insert "Working file: " ',file "\n")) ;; Like RCS/CVS. |
| 457 | (apply 'vc-bzr-command "log" ',buffer 'async ',file | 450 | (apply 'vc-bzr-command "log" ',buffer 'async ',file |
| 458 | ',(if (stringp vc-bzr-log-switches) | 451 | ',(if (stringp vc-bzr-log-switches) |
| 459 | (list vc-bzr-log-switches) | 452 | (list vc-bzr-log-switches) |
| 460 | vc-bzr-log-switches)))))) | 453 | vc-bzr-log-switches)))))) |
| 461 | 454 | ||
| 462 | (defun vc-bzr-show-log-entry (revision) | 455 | (defun vc-bzr-show-log-entry (revision) |