From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-devel@gnu.org
Subject: vc-annotate: HG, change display, switch
Date: Sat, 31 Oct 2015 12:48:02 +0000 [thread overview]
Message-ID: <87oaffqk59.fsf@mat.ucm.es> (raw)
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
next reply other threads:[~2015-10-31 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 12:48 Uwe Brauer [this message]
2015-10-31 13:08 ` vc-annotate: HG, change display, switch Dmitry Gutov
2015-10-31 18:11 ` Uwe Brauer
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=87oaffqk59.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-devel@gnu.org \
/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.