From unknown Mon Aug 18 02:05:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1903 <1903@debbugs.gnu.org> To: bug#1903 <1903@debbugs.gnu.org> Subject: Status: 23.0.60; vc-hg-diff fails for files in different directories Reply-To: bug#1903 <1903@debbugs.gnu.org> Date: Mon, 18 Aug 2025 09:05:34 +0000 retitle 1903 23.0.60; vc-hg-diff fails for files in different directories reassign 1903 emacs submitter 1903 Magnus Henoch severity 1903 normal thanks From magnus@erlang-consulting.com Wed Jan 14 10:19:10 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Jan 2009 18:19:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD, IMPRONONCABLE_2,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0EIJ1MQ019065 for ; Wed, 14 Jan 2009 10:19:06 -0800 Received: from mail.gnu.org ([199.232.76.166]:44236 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LNAJA-000455-Cr for emacs-pretest-bug@gnu.org; Wed, 14 Jan 2009 13:17:40 -0500 Received: from zimbra.erlangsystems.com ([88.208.247.62]:34719) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LN9xN-0000m8-0A for emacs-pretest-bug@gnu.org; Wed, 14 Jan 2009 12:55:09 -0500 Received: from localhost (localhost.erlangsystems.com [127.0.0.1]) by zimbra.erlangsystems.com (Postfix) with ESMTP id E17A522A07D for ; Wed, 14 Jan 2009 17:55:05 +0000 (GMT) X-Virus-Scanned: amavisd-new at Received: from zimbra.erlangsystems.com ([127.0.0.1]) by localhost (zimbra.erlangsystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ygb2KI4tVyJa for ; Wed, 14 Jan 2009 17:55:03 +0000 (GMT) Received: from linux-b2a3.site (unknown [192.168.42.57]) by zimbra.erlangsystems.com (Postfix) with ESMTP id 8AEDD22A042 for ; Wed, 14 Jan 2009 17:55:02 +0000 (GMT) From: Magnus Henoch To: emacs-pretest-bug@gnu.org Subject: 23.0.60; vc-hg-diff fails for files in different directories X-Hashcash: 1:25:090114:emacs-pretest-bug@gnu.org::kz7YRgY0F7X/dUcJ:000000000000000000000000000000000004ZxB0 Date: Wed, 14 Jan 2009 17:58:31 +0000 Message-ID: <84r635rcqg.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Using vc-dir on a Mercurial working directory, when marking edited files in different directories and typing C-x v =, hg complains about not finding some of the files. This is because vc-hg-diff uses the directory of the first file for the --cwd switch, and then discards the directory of all other files. This patch seems to fix the problem, but I'm not sure why the code jumps through the hoops of using relative filenames at all. 2009-01-14 Magnus Henoch * vc-hg.el (vc-hg-diff): Use relative filenames instead of discarding the directory part. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 05a1ae5..c5da02a 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -265,7 +265,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (when (and (not oldvers) newvers) (setq oldvers working)) (apply #'vc-hg-command (or buffer "*vc-diff*") nil - (mapcar (lambda (file) (file-name-nondirectory file)) files) + (mapcar (lambda (file) + (file-relative-name file (file-name-directory firstfile))) + files) "--cwd" (or (when firstfile (file-name-directory firstfile)) (expand-file-name default-directory)) "diff" If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.0.60/etc/DEBUG for instructions. In GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-01-13 on linux-b2a3 Windowing system distributor `The X.Org Foundation', version 11.0.10400090 configured using `configure '--enable-maintainer-mode'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t jabber-activity-mode: t jabber-mode-line-mode: t eldoc-mode: t show-paren-mode: t server-mode: t iswitchb-mode: t icomplete-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: l C-s 5 f 1 2 2 d C-h f f i l e - e r e l a C-c C-c C-x b C-s C-e M-d r e l a t i v e - n a m e C-/ C-/ C-/ r e l a t i v e - n a m e M-d M-f C-M-b C-e C-d C-d C-d M-f M-b SPC M-f SPC ( f l i l e - n a m e - d i r e c t o r y SPC f i r s t f i l e ) ) C-x C-s C-c c M-x e m a c s - l i - b y - - - C-x b v c - d i r C-x v = C-x 1 C-x b C-x b C-s M-x r e p o r t - e Recent messages: Type C-x 4 C-o RET to restore the other window. Buffer is read-only: # [2 times] Undo! [3 times] Wrote /home/magnus/src/emacs/lisp/vc-hg.el Compiling /home/magnus/src/emacs/lisp/vc-hg.el... Fontifying *Compile-Log*... (regexps........................................................) Compiling /home/magnus/src/emacs/lisp/vc-hg.el...done Wrote /home/magnus/src/emacs/lisp/vc-hg.elc Loading /home/magnus/src/emacs/lisp/vc-hg.elc...done Finding changes in /home/magnus/raven/make/apps-common.mk /home/magnus/raven/make/apps-defs.mk /home/magnus/raven/utils/new-app.sh /home/magnus/raven/utils/app-skeleton/Makefile /home/magnus/raven/utils/app-skeleton/vsn.mk /home/magnus/raven/utils/app-skeleton/doc/overview.edoc /home/magnus/raven/utils/app-skeleton/src/skeleton.app.src /home/magnus/raven/utils/app-skeleton/test/skeleton_suite.erl.src...done From dann@mothra.ics.uci.edu Thu Jan 15 00:09:29 2009 Received: (at 1903-done) by emacsbugs.donarmstrong.com; 15 Jan 2009 08:09:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0F89NF4003725 for <1903-done@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 00:09:24 -0800 Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n0F88u25019458; Thu, 15 Jan 2009 00:08:56 -0800 (PST) Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n0F88tsq018134; Thu, 15 Jan 2009 00:08:55 -0800 (PST) Date: Thu, 15 Jan 2009 00:08:55 -0800 (PST) Message-Id: <200901150808.n0F88tsq018134@mothra.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Cc: 1903-done@debbugs.gnu.org Subject: Re: bug#1903: 23.0.60; vc-hg-diff fails for files in different directories References: <84r635rcqg.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <84r635rcqg.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 14 Jan 2009 17:58:31 +0000") Lines: 9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n0F88u25019458 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu Magnus Henoch writes: > Using vc-dir on a Mercurial working directory, when marking edited files > in different directories and typing C-x v =, hg complains about not > finding some of the files. This is because vc-hg-diff uses the > directory of the first file for the --cwd switch, and then discards the > directory of all other files. Thanks, I checked in a slightly different patch. From unknown Mon Aug 18 02:05:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Feb 2009 15:24:08 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator