From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.devel Subject: vc-annotate: HG, change display, switch Date: Sat, 31 Oct 2015 12:48:02 +0000 Message-ID: <87oaffqk59.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446295708 28596 80.91.229.3 (31 Oct 2015 12:48:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 12:48:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 31 13:48:19 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZsVZy-000840-C8 for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2015 13:48:18 +0100 Original-Received: from localhost ([::1]:55525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVZx-0006HP-PV for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2015 08:48:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVZu-0006H8-7u for emacs-devel@gnu.org; Sat, 31 Oct 2015 08:48:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsVZr-0005NQ-1m for emacs-devel@gnu.org; Sat, 31 Oct 2015 08:48:14 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVZq-0005NM-RP for emacs-devel@gnu.org; Sat, 31 Oct 2015 08:48:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZsVZp-0007vf-6V for emacs-devel@gnu.org; Sat, 31 Oct 2015 13:48:09 +0100 Original-Received: from 171.pool85-55-19.dynamic.orange.es ([85.55.19.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2015 13:48:09 +0100 Original-Received: from oub by 171.pool85-55-19.dynamic.orange.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2015 13:48:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 53 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 171.pool85-55-19.dynamic.orange.es Mail-Copies-To: never User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:5QgqkWJGmzdxFgKp8OGJhT4N4mE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193014 Archived-At: Hello It seems that I am not the only one who finds vc-annotate for HG not very useful: http://stackoverflow.com/questions/4670726/how-can-i-improve-emacs-vc-mode-annotation The problems are the following: - date is displayed in ISO format - filename includes all the directory structure so the prefix can be quite long >From that website 297 Wed Oct 06 15:21:30 2010 -0600 aws/lib/survey/creator/dbTemplates/web/views.sql: $$,$$ At the same page two different solutions are proposed. The second is nice since its displays the annotate buffer with different colours. However this solution is *slow* especially on large buffers. The first solution is shorter but causes that the display of the buffer lacks colours. It seems to me that the switches for hg annotate should be hg annotate -dq -u -n Rationale: -dq means short date, so all the ISO clutter goes away. - -f or --fellow does not allow to get rid of the directory structure, for most version of hg. As I have been told that will change in the next release, but I think one should not rely on features which are only included in the most recent version of HG. That is why I think this option should be left out. Any comments? That leaves me to propose: (defun vc-hg-annotate-command (file buffer &optional revision) "Execute \"hg annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." (apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-u" "-n" (append (vc-switches 'hg 'annotate) (if revision (list (concat "-r" revision)))))) However with this switch the colour display does not work neither. Could somebody who knows the code could please comment on this issue? Thanks Uwe Brauer