GNU bug report logs -
#5961
23.1 regression: vc-hg does not show 0 version number for 'added files
Previous Next
Reported by: Dan Nicolaescu <dann <at> gnu.org>
Date: Fri, 16 Apr 2010 20:08:02 UTC
Severity: normal
Done: Dan Nicolaescu <dann <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5961 in the body.
You can then email your comments to 5961 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5961
; Package
emacs
.
(Fri, 16 Apr 2010 20:08:02 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
After this change:
Show working revision correctly for mercurial.
* vc-hg.el (vc-hg-working-revision): Use hg parent instead of
hg log as suggested by Alex Harsanyi <alexharsanyi <at> gmail.com>,
the mode-line show Hg@ instead of Hg <at> 0 for files in the VC 'added state. This is a regression from 23.1.
The problem is that the "hg parent " command does not distinguish
between the 'added and 'unregistered files.
Should the patch below go into the 23.2 branch?
=== modified file 'lisp/vc-hg.el'
--- lisp/vc-hg.el 2010-04-07 05:56:35 +0000
+++ lisp/vc-hg.el 2010-04-16 19:36:29 +0000
@@ -196,16 +196,16 @@ If nil, use the value of `vc-diff-switch
(let*
((status nil)
(default-directory (file-name-directory file))
+ ;; Avoid localization of messages so we can parse the output.
+ (avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C" "HGRC=")
+ process-environment))
(out
(with-output-to-string
(with-current-buffer
standard-output
(setq status
(condition-case nil
- (let ((process-environment
- ;; Avoid localization of messages so we can parse the output.
- (append (list "TERM=dumb" "LANGUAGE=C" "HGRC=")
- process-environment)))
+ (let ((process-environment avoid-local-env))
;; Ignore all errors.
(process-file
"hg" nil t nil
@@ -213,7 +213,21 @@ If nil, use the value of `vc-diff-switch
;; Some problem happened. E.g. We can't find an `hg'
;; executable.
(error nil)))))))
- (when (eq 0 status) out)))
+ (if (eq 0 status)
+ out
+ ;; Check if the file is in the 'added state, the above hg
+ ;; command does not distinguish between 'added and 'unregistered.
+ (setq status
+ (condition-case nil
+ (let ((process-environment avoid-local-env))
+ ;; Ignore all errors.
+ (process-file
+ "hg" nil nil nil
+ "log" "-l1" (file-relative-name file)))
+ ;; Some problem happened. E.g. We can't find an `hg'
+ ;; executable.
+ (error nil)))
+ (when (eq 0 status) "0"))))
;;; History functions
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5961
; Package
emacs
.
(Sat, 17 Apr 2010 00:31:02 GMT)
Full text and
rfc822 format available.
Message #6 received at 5961 <at> debbugs.gnu.org (full text, mbox):
Dan Nicolaescu <dann <at> gnu.org> writes:
> After this change:
>
> Show working revision correctly for mercurial.
> * vc-hg.el (vc-hg-working-revision): Use hg parent instead of
> hg log as suggested by Alex Harsanyi <alexharsanyi <at> gmail.com>,
>
> the mode-line show Hg@ instead of Hg <at> 0 for files in the VC 'added
> state. This is a regression from 23.1.
>
> The problem is that the "hg parent " command does not distinguish
> between the 'added and 'unregistered files.
>
> Should the patch below go into the 23.2 branch?
Yes please. I don't have hg installed at the moment, so it's
inconvenient for me to double check your work, but if you're confident
it's correct then please go ahead and commit it.
Thanks.
Reply sent
to
Dan Nicolaescu <dann <at> gnu.org>
:
You have taken responsibility.
(Sat, 17 Apr 2010 16:11:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dan Nicolaescu <dann <at> gnu.org>
:
bug acknowledged by developer.
(Sat, 17 Apr 2010 16:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 5961-done <at> debbugs.gnu.org (full text, mbox):
Chong Yidong <cyd <at> stupidchicken.com> writes:
> Dan Nicolaescu <dann <at> gnu.org> writes:
>
>> After this change:
>>
>> Show working revision correctly for mercurial.
>> * vc-hg.el (vc-hg-working-revision): Use hg parent instead of
>> hg log as suggested by Alex Harsanyi <alexharsanyi <at> gmail.com>,
>>
>> the mode-line show Hg@ instead of Hg <at> 0 for files in the VC 'added
>> state. This is a regression from 23.1.
>>
>> The problem is that the "hg parent " command does not distinguish
>> between the 'added and 'unregistered files.
>>
>> Should the patch below go into the 23.2 branch?
>
> Yes please. I don't have hg installed at the moment, so it's
> inconvenient for me to double check your work, but if you're confident
> it's correct then please go ahead and commit it.
Thanks, done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 16 May 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.