bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14168: 24.3.50; vc: Incorrect 'vc-bzr-print-log' when 'start-revisio


From: Glenn Morris
Subject: bug#14168: 24.3.50; vc: Incorrect 'vc-bzr-print-log' when 'start-revision' and 'limit' are set
Date: Sat, 20 Apr 2013 22:35:54 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Lluís Vilanova wrote:

>> Are you sure this isn't a confusion about what is meant by "starting
>> from the revision"?
>
> Might well be. I understand it as "from given revision to newest
> revision".

This area is confusing. It is not well documented and inconsistently
implemented. The only documentation we have is in the commentary of
vc.el:

;;   If START-REVISION is given, then show the log starting from the
;;   revision.  At this point START-REVISION is only required to work
;;   in conjunction with LIMIT = 1.

This does not make it clear whether START-REVISION is the earliest or
latest revision. If we look at the implementations we see:

bzr  -r..start -l limit
    start is the latest revision
    show from newest to oldest
    show limit revisions

git  -n limit start
    start is the latest revision
    show from newest to oldest
    show limit revisions

hg   -rstart: -l limit
    start is the earliest revision
    show from oldest to newest
    show limit revisions

    for consistency with bzr and git, seems this should be -rstart:0  ?

svn  -rstart --limit limit
    show only single revision start
    limit is ignored

    for consistency with bzr and git, seems this should be -rstart:1 ?

mtn  --from start --last limit
    dunno what this does


In practice, the only place in Emacs that uses this is
vc-annotate-show-log-revision-at-line, which shows a single revision
only. So we have no way to tell what the intended behaviour is when
LIMIT != 1.

We should either document that it only works for LIMIT = 1, or decide
what it is supposed to do and make it consistent.
I'm guessing that START was supposed to be the newest revision, which is
the opposite of what I (like you) first thought.


I have no idea how to sensibly combine this with someone having "bzr log"
aliased to "bzr log --forward".

   bzr log --forward -r ..3 --limit 2 

will display revisions 1 and 2 rather than 2 and 3. There doesn't seem
to be a simple way to get the latter.

https://lists.ubuntu.com/archives/bazaar/2007q4/035828.html
   You are correct that the --limit option does not make much sense with
   the --forward option.  It is not meant to.
https://bugs.launchpad.net/bzr/+bug/320920

I don't know if we should bother trying to figure it out given that the
only caller of this uses LIMIT == 1. I'd probably just stick a
--no-aliases in there.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]