From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs 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 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1402072232 22383 80.91.229.3 (6 Jun 2014 16:30:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2014 16:30:32 +0000 (UTC) Cc: 17570-done@debbugs.gnu.org To: Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 06 18:30:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wsx28-00038w-Mu for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jun 2014 18:30:24 +0200 Original-Received: from localhost ([::1]:48280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx27-0001Pg-Oe for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jun 2014 12:30:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx1w-0001AZ-Ib for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:30:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wsx1q-0001fS-Is for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:30:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx1q-0001fM-FY for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:30:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wsx1p-0001LQ-Gg for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:30:05 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jun 2014 16:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 17570 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 17570@debbugs.gnu.org, monnier@iro.umontreal.ca, santiagopim@gmail.com Original-Received: via spool by 17570-done@debbugs.gnu.org id=D17570.14020721965109 (code D ref 17570); Fri, 06 Jun 2014 16:30:04 +0000 Original-Received: (at 17570-done) by debbugs.gnu.org; 6 Jun 2014 16:29:56 +0000 Original-Received: from localhost ([127.0.0.1]:39761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wsx1g-0001KK-DK for submit@debbugs.gnu.org; Fri, 06 Jun 2014 12:29:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wsx1e-0001K8-3d for 17570-done@debbugs.gnu.org; Fri, 06 Jun 2014 12:29:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0BwsUDQsNJBOHZQMJCMpdDYcvF4xeghwHhDgElmGOWINggWqBcYFbIQ X-IPAS-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0BwsUDQsNJBOHZQMJCMpdDYcvF4xeghwHhDgElmGOWINggWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66041921" Original-Received: from 206-248-131-163.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Jun 2014 12:29:48 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 32930600D1; Fri, 6 Jun 2014 12:29:48 -0400 (EDT) In-Reply-To: ("Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta"'s message of "Sat, 24 May 2014 00:57:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90139 Archived-At: > 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 =3D=3D=3D 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=E0 i Miralta + + * vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and + vc-hg-command (bug#17570). + 2014-06-06 Stefan Monnier =20 * international/mule-cmds.el (ucs-names): Add special entry for BEL =3D=3D=3D 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 @@ =20 (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")) =20 ;;; History functions =20