From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Santiago Payà i Miralta" <santiagopim@gmail.com>
Cc: 17570-done@debbugs.gnu.org
Subject: bug#17570: * lisp/vc/vc-hg.el (vc-hg-working-revision): Fix returning working revision instead of last revision.
Date: Fri, 06 Jun 2014 12:29:47 -0400 [thread overview]
Message-ID: <jwvmwdqt3rn.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CABmqNJVhcDxeDpCuSBtOTb2XOirSVX814euZ_KMQjUDW=YCPNg@mail.gmail.com> ("Santiago Payà i Miralta"'s message of "Sat, 24 May 2014 00:57:19 +0200")
> I wish to fix the lisp/vc/vc-hg.el (vc-hg-working-revision) function with
> the `hg parent' command.
Good idea, thanks. But your patch's indentation was completely messed
up (as well as placement of line breaks).
I installed a cleaned up version into `emacs-24' (contrary to the
previous patch which I installed into `trunk' since it was a new
feature rather than a bug-fix).
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2014-06-06 14:25:39 +0000
+++ lisp/ChangeLog 2014-06-06 16:27:21 +0000
@@ -1,3 +1,8 @@
+2014-06-06 Santiago Payà i Miralta <santiagopim@gmail.com>
+
+ * vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
+ vc-hg-command (bug#17570).
+
2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
* international/mule-cmds.el (ucs-names): Add special entry for BEL
=== modified file 'lisp/vc/vc-hg.el'
--- lisp/vc/vc-hg.el 2014-05-11 02:01:08 +0000
+++ lisp/vc/vc-hg.el 2014-06-06 16:26:37 +0000
@@ -227,14 +227,11 @@
(defun vc-hg-working-revision (file)
"Hg-specific version of `vc-working-revision'."
- (let ((default-directory (if (file-directory-p file)
- (file-name-as-directory file)
- (file-name-directory file))))
- (ignore-errors
+ (or (ignore-errors
(with-output-to-string
- (process-file vc-hg-program nil standard-output nil
- "log" "-l" "1" "--template" "{rev}"
- (file-relative-name file))))))
+ (vc-hg-command standard-output 0 file
+ "parent" "--template" "{rev}")))
+ "0"))
;;; History functions
prev parent reply other threads:[~2014-06-06 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 22:57 bug#17570: * lisp/vc/vc-hg.el (vc-hg-working-revision): Fix returning working revision instead of last revision Santiago Payà i Miralta
2014-06-06 16:29 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmwdqt3rn.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=17570-done@debbugs.gnu.org \
--cc=santiagopim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.