GNU bug report logs -
#14168
24.3.50; vc: Incorrect 'vc-bzr-print-log' when 'start-revision' and 'limit' are set
Previous Next
Reported by: Lluís Vilanova <vilanova <at> ac.upc.edu>
Date: Tue, 9 Apr 2013 19:28:02 UTC
Severity: normal
Found in version 24.3.50
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14168 in the body.
You can then email your comments to 14168 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Tue, 09 Apr 2013 19:28:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lluís Vilanova <vilanova <at> ac.upc.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 09 Apr 2013 19:28:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
According to vc.el (when describing 'print-log'):
If START-REVISION is given, then show the log starting from the
revision.
Instead, the bazaar backend shows revisions since the beginning of the file's
history, up to the given revision.
To fix this, the line using 'start-revision' should read:
(when start-revision (list (format "-r%s.." start-revision)))
Instead of the current:
(when start-revision (list (format "-r..%s" start-revision)))
Thanks,
Lluis
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Tue, 09 Apr 2013 19:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 14168 <at> debbugs.gnu.org (full text, mbox):
> From: Lluís Vilanova <vilanova <at> ac.upc.edu>
> Date: Tue, 09 Apr 2013 21:17:35 +0200
>
> According to vc.el (when describing 'print-log'):
>
> If START-REVISION is given, then show the log starting from the
> revision.
>
> Instead, the bazaar backend shows revisions since the beginning of the file's
> history, up to the given revision.
Are you sure this isn't a confusion about what is meant by "starting
from the revision"?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Tue, 09 Apr 2013 19:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14168 <at> debbugs.gnu.org (full text, mbox):
Bazaar's log command supports the "--forward" argument, which can be set in
bazaar's configuration file (beyond emacs' knowledge; e.g. using the alias
"log = log --forward"). This explains why the current implementation is breaking
the declared generic semantics (by assuming "--forward" is not being used).
This can be fixed by changing it into:
(if (and start-revision (= limit 1))
(list (format "-c%s" start-revision))
(append
(when start-revision (list (format "-r%s.." start-revision)))
(when limit (list "-l" (format "%s" limit)))))
Note that this will still break if both are given and limit is different from 1
(in which case "-c" cannot be used), but this is explicitly forbidden by the
generic semantics.
Thanks,
Lluis
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Tue, 09 Apr 2013 19:55:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 14168 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii writes:
>> From: Lluís Vilanova <vilanova <at> ac.upc.edu>
>> Date: Tue, 09 Apr 2013 21:17:35 +0200
>>
>> According to vc.el (when describing 'print-log'):
>>
>> If START-REVISION is given, then show the log starting from the
>> revision.
>>
>> Instead, the bazaar backend shows revisions since the beginning of the file's
>> history, up to the given revision.
> 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".
In any case, it breaks if the user adds the "--forward" argument. See my other
reply to the bug (which should be changed according to the meaning of "starting
from the revision").
Thanks,
Lluis
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Sun, 21 Apr 2013 02:41:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 14168 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Sun, 21 Apr 2013 19:03:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 14168 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris writes:
> 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:
[...]
> 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.
Nice, I didn't know about the "--no-aliases" argument, and that might prove
useful. As a side note, I sent a small patch for the case where LIMIT is 1.
Looking at the code, I'd rather rename START-REVISION as REVISION, which I think
would be less confusing given the current semantics.
Lluis
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 24 Apr 2013 08:20:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lluís Vilanova <vilanova <at> ac.upc.edu>
:
bug acknowledged by developer.
(Wed, 24 Apr 2013 08:20:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 14168-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
Hopefully improved in trunk.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Wed, 24 Apr 2013 13:04:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 14168 <at> debbugs.gnu.org (full text, mbox):
Wouldn't this break when aliases are present and limit is 1? AFAIK, this is the
case in which I found out the "error".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14168
; Package
emacs
.
(Wed, 24 Apr 2013 16:47:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 14168 <at> debbugs.gnu.org (full text, mbox):
Lluís Vilanova wrote:
> Wouldn't this break when aliases are present and limit is 1? AFAIK,
> this is the case in which I found out the "error".
Yeah, sorry, I realized that later. Will fix.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 23 May 2013 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 345 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.