unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 17945@debbugs.gnu.org
Subject: bug#17945: 24.4.50; vc-git-annotate-command is too slow
Date: Wed, 25 Feb 2015 18:46:12 +0100	[thread overview]
Message-ID: <87wq35yjdn.fsf@wanadoo.es> (raw)
In-Reply-To: <54ECE538.1070601@yandex.ru> (Dmitry Gutov's message of "Tue, 24 Feb 2015 22:55:20 +0200")

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 02/24/2015 07:57 PM, Glenn Morris wrote:
>
>> except vc-annotate-switches does not exist and would also
>> need to be added.
>
> I think this is only justified if we expect different backends'
> annotate command to receive the same options.

As the docstrings of vc-BACKEND-annotate-switches mention
vc-annotate-switches *and* vc-switches checks vc-annotate-switches, I
changed my mind again and implemented vc-annotate-switches with a caveat
on the docstring. Please review and suggest a better wording, if
necessary:

(defcustom vc-annotate-switches nil
  "A string or list of strings specifying switches for annotate under VC.
When running annotate under a given BACKEND, VC uses the first
non-nil value of `vc-BACKEND-annotate-switches', `vc-annotate-switches',
and `annotate-switches', in that order.  Since nil means to check the
next variable in the sequence, either of the first two may use
the value t to mean no switches at all.  `vc-annotate-switches'
should contain switches that are specific to version control, but
not specific to any particular backend.

As very few switches (if any) are used across different VC tools,
please consider using the specific `vc-BACKEND-annotate-switches'
for the backend you use."
  :type '(choice (const :tag "Unspecified" nil)
		 (const :tag "None" t)
		 (string :tag "Argument String")
		 (repeat :tag "Argument List" :value ("") string))
  :group 'vc
  :version "25.1")


> So far, only '-w' looks a likely candidate, albeit its descriptions
> are a bit different between Git and Hg. And it's not in e.g. Bzr.
>
> What if the user sets `vc-annotate-switches' to '-w', and then calls
> `vc-annotate' in a Bazaar repository, where it'll obviously lead to
> failure?
>
>> And for consistency, presumably all backends should
>> get the same treatment. Thanks.
>
> Probably. But I'd rather the present patch gets installed without too
> much delay.

I extended the vc-switches support to the rest of backends that
implement `vc-BACKEND-annotate-command', except rcs, that does some
complicated things (and I have no easy way of testing it.)

Once we agree on the resolution of the vc-annotate-switches issue, I'll
commit the changes.





  parent reply	other threads:[~2015-02-25 17:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05 12:28 bug#17945: 24.4.50; vc-git-annotate-command is too slow William Xu
2014-07-05 13:34 ` Dmitry
2014-07-05 15:16   ` William Xu
2014-07-05 16:15   ` Stefan Monnier
2015-02-24  7:39     ` Glenn Morris
2015-02-24 15:31       ` Óscar Fuentes
2015-02-24 16:12         ` Eli Zaretskii
2015-02-24 16:36           ` Dmitry Gutov
2015-02-24 17:57         ` Glenn Morris
2015-02-24 20:55           ` Dmitry Gutov
2015-02-24 22:25             ` Óscar Fuentes
2015-02-25 17:46             ` Óscar Fuentes [this message]
2015-02-25 17:58               ` Dmitry Gutov
2015-02-25 18:06                 ` Óscar Fuentes
2015-02-25 20:37                   ` Dmitry Gutov
2015-02-26 14:56           ` Óscar Fuentes
2015-02-24 16:47       ` Dmitry Gutov
2015-02-24 17:56         ` Glenn Morris
2015-02-24 18:04           ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq35yjdn.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=17945@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).