GNU bug report logs - #5960
24.0.50; vc-annotate buffer commands fail in subdirectories with Hg

Previous Next

Package: emacs;

Reported by: Magnus Henoch <magnus.henoch <at> gmail.com>

Date: Fri, 16 Apr 2010 17:49:02 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 5960 <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: Magnus Henoch <magnus.henoch <at> gmail.com>, cyd <at> stupidchicken.com
Cc: 5960 <at> debbugs.gnu.org
Subject: Re: bug#5960: 24.0.50;
	vc-annotate buffer commands fail in subdirectories with Hg
Date: Fri, 16 Apr 2010 14:45:54 -0400
Magnus Henoch <magnus.henoch <at> gmail.com> writes:

> cd /tmp
> hg init reproduce
> cd reproduce
> mkdir foo
> echo foo > foo/foo.txt
> hg add foo/foo.txt
> hg commit -m "Added foo.txt."
> emacs -Q foo/foo.txt
>
> C-x v g
> l
>
> Expected result: the *vc-change-log* buffer lists the changeset that added
> foo.txt.
> Actual result: the *vc-change-log* buffer is empty.
>
> I took a look in the code, and it seems that
> vc-hg-annotate-extract-revision-at-line expands filenames against the
> current directory, while `hg annotate' displays filenames relative to
> the project root.  Thus this patch:
>
> === modified file 'lisp/vc-hg.el'
> --- lisp/vc-hg.el	2010-04-07 05:56:35 +0000
> +++ lisp/vc-hg.el	2010-04-16 17:43:15 +0000
> @@ -356,7 +356,7 @@
>        (if (match-beginning 3)
>  	  (match-string-no-properties 1)
>  	(cons (match-string-no-properties 1)
> -	      (expand-file-name (match-string-no-properties 4)))))))
> +              (expand-file-name (match-string-no-properties 4) (vc-hg-root default-directory)))))))
>  
>  (defun vc-hg-previous-revision (file rev)
>    (let ((newrev (1- (string-to-number rev))))
>

Thanks!
This is a regression from 23.1, so this should go into the emacs-23
branch if that branch is still open for regressions.  Yidong?

Please check it in.




This bug report was last modified 15 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.