From 2af767a869fd9ac5b959bc5382ac09e38fc735af Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Wed, 2 Oct 2024 15:20:31 -0400 Subject: [PATCH] Properly operate on current fileset revision in vc-hg-print-log If hg log doesn't receive a -r argument, it logs starting from the most recent commit created anywhere ("tip"). But vc-print-log is supposed to log starting from the working revision ("."). Those are usually the same, but not always; the current fileset might not even exist in "tip". Fix this by just logging "." if no START-REVISION is passed to vc-hg-print-log. * lisp/vc/vc-hg.el (vc-hg-print-log): If start-revision is nil, reliably log the working revision. --- lisp/vc/vc-hg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index c0afb225871..58a2df3469f 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -408,8 +408,8 @@ vc-hg-print-log (with-current-buffer buffer (apply #'vc-hg-command buffer 'async files "log" + (format "-r%s:0" (or start-revision ".")) (nconc - (when start-revision (list (format "-r%s:0" start-revision))) (when limit (list "-l" (format "%s" limit))) (when (eq vc-log-view-type 'with-diff) (list "-p")) -- 2.39.3