diff options
| author | Spencer Baugh | 2024-10-02 15:20:31 -0400 |
|---|---|---|
| committer | Sean Whitton | 2024-10-12 16:55:03 +0800 |
| commit | fbeb3d22b7fabf13cd788772ade2ed594ee60872 (patch) | |
| tree | 959ce88b330fcaa2e7c1ea0153095208fd3a65a1 | |
| parent | 6e80509099e27e237787186f4e8731bfdfb9b00d (diff) | |
| download | emacs-fbeb3d22b7fabf13cd788772ade2ed594ee60872.tar.gz emacs-fbeb3d22b7fabf13cd788772ade2ed594ee60872.zip | |
Properly operate on current fileset revision in vc-hg-print-log
* lisp/vc/vc-hg.el (vc-hg-print-log): If start-revision is nil,
reliably log the working revision. (bug#73604)
| -rw-r--r-- | lisp/vc/vc-hg.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 876d86dc24f..4cdcfe5cb96 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -397,8 +397,11 @@ specific file to query." | |||
| 397 | (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) | 397 | (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) |
| 398 | "Print commit log associated with FILES into specified BUFFER. | 398 | "Print commit log associated with FILES into specified BUFFER. |
| 399 | If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. | 399 | If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. |
| 400 | If START-REVISION is non-nil, it is the newest revision to show. | 400 | If LIMIT is non-nil, show no more than this many entries. |
| 401 | If LIMIT is non-nil, show no more than this many entries." | 401 | |
| 402 | If START-REVISION is nil, the commit log is printed starting from the | ||
| 403 | working directory parent (revset \".\"). If START-REVISION is non-nil, | ||
| 404 | the log is printed starting from that revision." | ||
| 402 | ;; `vc-do-command' creates the buffer, but we need it before running | 405 | ;; `vc-do-command' creates the buffer, but we need it before running |
| 403 | ;; the command. | 406 | ;; the command. |
| 404 | (vc-setup-buffer buffer) | 407 | (vc-setup-buffer buffer) |
| @@ -408,8 +411,8 @@ If LIMIT is non-nil, show no more than this many entries." | |||
| 408 | (with-current-buffer | 411 | (with-current-buffer |
| 409 | buffer | 412 | buffer |
| 410 | (apply #'vc-hg-command buffer 'async files "log" | 413 | (apply #'vc-hg-command buffer 'async files "log" |
| 414 | (format "-r%s:0" (or start-revision ".")) | ||
| 411 | (nconc | 415 | (nconc |
| 412 | (when start-revision (list (format "-r%s:0" start-revision))) | ||
| 413 | (when limit (list "-l" (format "%s" limit))) | 416 | (when limit (list "-l" (format "%s" limit))) |
| 414 | (when (eq vc-log-view-type 'with-diff) | 417 | (when (eq vc-log-view-type 'with-diff) |
| 415 | (list "-p")) | 418 | (list "-p")) |