all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 73604@debbugs.gnu.org
Subject: bug#73604: [PATCH] Properly operate on current fileset revision in vc-hg-print-log
Date: Wed, 02 Oct 2024 15:21:20 -0400	[thread overview]
Message-ID: <iered4y1fbj.fsf@janestreet.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

Tags: patch


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.

In GNU Emacs 29.2.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-09-23 built on
 igm-qws-u22796a
Repository revision: 340ed90ce4518de238610461047b6c8767ca0cdc
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --with-x-toolkit=lucid --without-gpm --without-gconf
 --without-selinux --without-imagemagick --with-modules --with-gif=no
 --with-tree-sitter --with-native-compilation=aot
 PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Properly-operate-on-current-fileset-revision-in-vc-h.patch --]
[-- Type: text/patch, Size: 1329 bytes --]

From 2af767a869fd9ac5b959bc5382ac09e38fc735af Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@janestreet.com>
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


             reply	other threads:[~2024-10-02 19:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 19:21 Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-10-03  2:16 ` bug#73604: [PATCH] Properly operate on current fileset revision in vc-hg-print-log Sean Whitton
2024-10-03  6:50   ` Eli Zaretskii
2024-10-03  7:04     ` Sean Whitton
2024-10-03 15:18       ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-11  4:43         ` Sean Whitton
2024-10-11 20:53           ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12  7:36             ` Eli Zaretskii
2024-10-12  8:58               ` Sean Whitton
2024-10-12  8:56             ` Sean Whitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iered4y1fbj.fsf@janestreet.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73604@debbugs.gnu.org \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.