From unknown Mon Aug 18 15:40:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1903: 23.0.60; vc-hg-diff fails for files in different directories Reply-To: Magnus Henoch , 1903@debbugs.gnu.org Resent-From: Magnus Henoch Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 14 Jan 2009 18:25:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 1903 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123195715019071 (code B ref -1); Wed, 14 Jan 2009 18:25:07 +0000 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 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 unknown Mon Aug 18 15:40:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Magnus Henoch Subject: bug#1903 closed by Dan Nicolaescu (Re: bug#1903: 23.0.60; vc-hg-diff fails for files in different directories) Message-ID: References: <200901150808.n0F88tsq018134@mothra.ics.uci.edu> <84r635rcqg.fsf@linux-b2a3.site> X-Emacs-PR-Message: they-closed 1903 X-Emacs-PR-Package: emacs Reply-To: 1903@debbugs.gnu.org Date: Thu, 15 Jan 2009 08:15:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1232007303-4978-1" This is a multi-part message in MIME format... ------------=_1232007303-4978-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1903: 23.0.60; vc-hg-diff fails for files in different directories It has been closed by Dan Nicolaescu . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Dan Nicolaescu by replying to this email. --=20 1903: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1903 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1232007303-4978-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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. ------------=_1232007303-4978-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1232007303-4978-1--