[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5846: problems with mercurial commands in *VC Annotate* bu

From: Andy Moreton
Subject: bug#5846: problems with mercurial commands in *VC Annotate* buffer on Windows
Date: Tue, 20 Apr 2010 15:13:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (windows-nt)

On Mon 19 Apr 2010, Andy Moreton wrote:

> On Sat 17 Apr 2010, Chong Yidong wrote:
>>> In GNU Emacs (i386-mingw-nt5.1.2600)
>>> Using Mercurial from TortoiseHg 0.9, which contains Mercurial-1.4,
>>> Python-2.5.4, PyGTK-2.12.1, GTK-2.16.1
>>> Start emacs with "c:\emacs\23.1.95\bin\emacs -Q"
>>> Open a file from a mercurial repository
>>> Type "C-x v g" to annotate the file
>>> In the *VC Annotate* buffer:
>>> 1) Type "l" (vc-annotate-show-log-revision-at-line)
>>>    The Hg command runs, but the *vc-change-log* buffer is empty
>>> 2) Type "f" (vc-annotate-find-revision-at-line)
>>>    Emacs displays a message "Cannot open load file: vc-nil"
>> It looks like this is the same bug as the one just fixed in
>>   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5960
>> You can find the patch there, and it will be included in the next
>> pretest.
>> Thanks for the bug report.
> I've rebuilt emacs from the emacs-23 branch today, and the problems are
> still there. In addition, the modeline display shows "Hg-" suggesting that
> emacs is not correctly detecting the working revision of the file.

Ive retested with the 23.1.96 pretest tarball, and have found the
problem. In vc-hg-working-revision (in vc-hg.el):

      (let ((process-environment avoid-local-env))
        ;; Ignore all errors.
         "hg" nil t nil
         "parent" "--template" "{rev}" (file-relative-name file)))

1) TortoiseHg does not seem to honour the "HGRC=" set in
`avoid-local-env'. for local configration it reads some of the 
the following config files:

2) I had the following setting in "~/.hgrc":
   parenttag = parents --template "{latesttag} +{latesttagdistance}\n"

The combined effect is that TortoiseHg read my ~/.hgrc file, thus making
the "hg parent" command ambiguous (could be "parents" or "parenttag").

`vc-hg-working-revision' should use "hg parents" to make the command


reply via email to

[Prev in Thread] Current Thread [Next in Thread]