From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19045: 25.0.50; [PATCH] vc-git-print-log use --follow Date: Fri, 16 Feb 2018 00:07:20 +0200 Organization: LINKOV.NET Message-ID: <87bmgpoqjr.fsf@mail.linkov.net> References: <87d28rt4jl.fsf@telefonica.net> <874lmxloo1.fsf@mail.linkov.net> <87d11kquw2.fsf@mail.linkov.net> <9c8f9d73-af0d-fdc7-7935-1a8a904c5c15@yandex.ru> <87607bunrz.fsf@mail.linkov.net> <52b6e1bb-5657-722f-eafe-73fc6c3a82a4@yandex.ru> <87r2pxvlah.fsf@mail.linkov.net> <87d11csg1u.fsf@mail.linkov.net> <2f104cc5-6629-b74c-4a9b-4d678d888841@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518735181 12635 195.159.176.226 (15 Feb 2018 22:53:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Feb 2018 22:53:01 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 19045@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 15 23:52:57 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emSOM-0001xZ-6h for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Feb 2018 23:52:38 +0100 Original-Received: from localhost ([::1]:40296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emSQO-0005K7-4i for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Feb 2018 17:54:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emS5S-0000oa-6Q for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 17:33:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emS5O-0000TC-8e for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 17:33:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emS5O-0000T2-4o for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 17:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1emS5N-00033v-UD for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 17:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Feb 2018 22:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19045 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19045-submit@debbugs.gnu.org id=B19045.151873397411743 (code B ref 19045); Thu, 15 Feb 2018 22:33:01 +0000 Original-Received: (at 19045) by debbugs.gnu.org; 15 Feb 2018 22:32:54 +0000 Original-Received: from localhost ([127.0.0.1]:45283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emS5G-00033L-CC for submit@debbugs.gnu.org; Thu, 15 Feb 2018 17:32:54 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:40694 helo=homiemail-a101.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emS5F-00033E-JL for 19045@debbugs.gnu.org; Thu, 15 Feb 2018 17:32:54 -0500 Original-Received: from homiemail-a101.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTP id C4D82117E06A; Thu, 15 Feb 2018 14:32:52 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-100-74.cust.tele2.ee [91.129.100.74]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTPSA id B17DF117E065; Thu, 15 Feb 2018 14:32:51 -0800 (PST) In-Reply-To: <2f104cc5-6629-b74c-4a9b-4d678d888841@yandex.ru> (Dmitry Gutov's message of "Mon, 12 Feb 2018 03:18:16 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:143325 Archived-At: >> "Running %s in foreground..." > > Same as with "background". > >> "Running %s...OK = %d" > > Success (status 0): ... > >> "Running %s...FAILED (%s)" > > Failed (status 3): ... > > Something like that. If the exit code is longer than 1 digit (pretty rare), > maybe remove the extra space after "Failed". Like this? diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index b0d2221..c1de2f0 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -290,16 +290,12 @@ vc-do-command (let* ((files (mapcar (lambda (f) (file-relative-name (expand-file-name f))) (if (listp file-or-list) file-or-list (list file-or-list)))) + (message-truncate-lines t) (full-command - ;; What we're doing here is preparing a version of the command - ;; for display in a debug-progress message. If it's fewer than - ;; 20 characters display the entire command (without trailing - ;; newline). Otherwise display the first 20 followed by an ellipsis. (concat (if (string= (substring command -1) "\n") (substring command 0 -1) command) - " " - (vc-delistify (mapcar (lambda (s) (if (> (length s) 20) (concat (substring s 0 2) "...") s)) flags)) + " " (vc-delistify flags) " " (vc-delistify files)))) (save-current-buffer (unless (or (eq buffer t) @@ -324,7 +320,7 @@ vc-do-command (apply 'start-file-process command (current-buffer) command squeezed)))) (when vc-command-messages - (message "Running %s in background..." full-command)) + (message "Running in background: %s" full-command)) ;; Get rid of the default message insertion, in case we don't ;; set a sentinel explicitly. (set-process-sentinel proc #'ignore) @@ -332,10 +328,11 @@ vc-do-command (setq status proc) (when vc-command-messages (vc-run-delayed - (message "Running %s in background... done" full-command)))) + (let ((message-truncate-lines t)) + (message "Finished in background: %s" full-command))))) ;; Run synchronously (when vc-command-messages - (message "Running %s in foreground..." full-command)) + (message "Running in foreground: %s" full-command)) (let ((buffer-undo-list t)) (setq status (apply 'process-file command nil t nil squeezed))) (when (and (not (eq t okstatus)) @@ -345,13 +342,14 @@ vc-do-command (pop-to-buffer (current-buffer)) (goto-char (point-min)) (shrink-window-if-larger-than-buffer)) - (error "Running %s...FAILED (%s)" full-command - (if (integerp status) (format "status %d" status) status))) + (error "Failed (%s): %s" + (if (integerp status) (format "status %d" status) status) + full-command)) (when vc-command-messages - (message "Running %s...OK = %d" full-command status)))) + (message "Success (%d): %s" status full-command)))) (vc-run-delayed - (run-hook-with-args 'vc-post-command-functions - command file-or-list flags)) + (run-hook-with-args 'vc-post-command-functions + command file-or-list flags)) status)))) (defun vc-do-async-command (buffer root command &rest args)