GNU bug report logs -
#10822
23.4; `l' in vc-dir with hg backend moves to the first commit
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Thu, 16 Feb 2012 03:10:02 UTC
Severity: minor
Found in version 23.4
Done: Leo <sdl.web <at> gmail.com>
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 10822 in the body.
You can then email your comments to 10822 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Thu, 16 Feb 2012 03:10:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 16 Feb 2012 03:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In a vc-dir buffer with hg backend, hitting `l' (vc-print-log) point is
moved to the first commit in *vc-change-log* buffer. This seems
inconsistent with other backends where point is moved to the newest
commit. I wonder if this is a bug?
Software: Mercurial Distributed SCM (version 2.1)
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Sun, 19 Feb 2012 14:11:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 10822 <at> debbugs.gnu.org (full text, mbox):
Leo <sdl.web <at> gmail.com> writes:
> In a vc-dir buffer with hg backend, hitting `l' (vc-print-log) point is
> moved to the first commit in *vc-change-log* buffer. This seems
> inconsistent with other backends where point is moved to the newest
> commit. I wonder if this is a bug?
>
> Software: Mercurial Distributed SCM (version 2.1)
We might as well make it consistent. Patch welcome.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Mon, 12 Mar 2012 11:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 10822 <at> debbugs.gnu.org (full text, mbox):
On 2012-02-19 22:08 +0800, Chong Yidong wrote:
> We might as well make it consistent. Patch welcome.
It turns out the bug I am seeing is due to the broken
vc-hg-working-revision.
I intend to install the following fix in the next few days. Could you
comment on the this patch? Thanks.
=== modified file 'lisp/vc/vc-hg.el'
--- lisp/vc/vc-hg.el 2012-02-25 04:29:09 +0000
+++ lisp/vc/vc-hg.el 2012-03-12 10:47:55 +0000
@@ -226,45 +226,14 @@
(defun vc-hg-working-revision (file)
"Hg-specific version of `vc-working-revision'."
- (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")
- process-environment))
- (out
- (with-output-to-string
- (with-current-buffer
- standard-output
- (setq status
- (condition-case nil
- (let ((process-environment avoid-local-env))
- ;; Ignore all errors.
- (process-file
- vc-hg-program nil t nil
- "--config" "alias.parents=parents"
- "--config" "defaults.parents="
- "parents" "--template" "{rev}" (file-relative-name file)))
- ;; Some problem happened. E.g. We can't find an `hg'
- ;; executable.
- (error nil)))))))
- (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))
- (process-file
- vc-hg-program nil nil nil
- ;; We use "log" here, if there's a faster command
- ;; that returns true for an 'added file and false
- ;; for an 'unregistered one, we could use that.
- "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"))))
+ (let ((default-directory (if (file-directory-p file)
+ (file-name-as-directory file)
+ (file-name-directory file))))
+ (with-output-to-string
+ (ignore-errors
+ (process-file vc-hg-program nil standard-output nil
+ "log" "-l" "1" "--template" "{rev}"
+ (file-relative-name file))))))
;;; History functions
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Mon, 12 Mar 2012 19:49:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 10822 <at> debbugs.gnu.org (full text, mbox):
Leo <sdl.web <at> gmail.com> wrote:
> On 2012-02-19 22:08 +0800, Chong Yidong wrote:
>> We might as well make it consistent. Patch welcome.
>
> It turns out the bug I am seeing is due to the broken
> vc-hg-working-revision.
>
> I intend to install the following fix in the next few days. Could you
> comment on the this patch? Thanks.
Hi,
I haven't touched vc-hg for many years, I can't comment on the patch.
Try someone who's touched the code recently...
Take care,
--
Ivan Kanis
http://kanis.fr
A lie gets halfway around the world before the truth has a chance to
get its pants on.
-- Winston Churchill
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Mon, 12 Mar 2012 20:45:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 10822 <at> debbugs.gnu.org (full text, mbox):
> I intend to install the following fix in the next few days. Could you
> comment on the this patch? Thanks.
It looks good, from the point of view of someone who doesn't use
vc-hg.el (nor Mercurial). The only doubt I have is whether the
ignore-errors is sufficient to handle all the possible problems.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10822
; Package
emacs
.
(Tue, 13 Mar 2012 11:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 10822 <at> debbugs.gnu.org (full text, mbox):
On 2012-03-13 04:14 +0800, Stefan Monnier wrote:
> It looks good, from the point of view of someone who doesn't use
> vc-hg.el (nor Mercurial). The only doubt I have is whether the
> ignore-errors is sufficient to handle all the possible problems.
I personally don't use hg much except some python packages I am
interested are using it.
I have checked in the patch (revision 107598) for more testing.
Leo
Reply sent
to
Leo <sdl.web <at> gmail.com>
:
You have taken responsibility.
(Wed, 14 Mar 2012 11:11:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo <sdl.web <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 14 Mar 2012 11:11:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 10822-done <at> debbugs.gnu.org (full text, mbox):
Fixed in 24.0.95
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 11 Apr 2012 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 39 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.