log --limit --forward should select *last* N revisions, not first N

Bug #320920 reported by Gioele Barabucci
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

bzr --limit N --forward shows the first N revisions (from revision 1 to N) in reverse order. I think it would be more natural to change --limit N to mean last N revisions when --forward is used.

More advanced users can always used the "head" command to select the first N revisions in reverse order.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Of course "natural" is often subjective....

--limit is very similar to head, it limits the number of revisions shown.

I think what *you* want here is better achieved with:

 bzr log --forward -r-<N>..

i.e: log the last N revisions

Changed in bzr:
status: New → Invalid
Revision history for this message
Gioele Barabucci (gioele) wrote :

Of course "natural' is subjective. Yet, I don't see the point of having a simple command to give the first N then revisions in reverse order while to get the last N revisions in reverse order (that is way more common) one has to dig into a special case of the --revision option.

I think that "--limit 10" is more usable and understandable than "-r-10..". And I think this is quite objective, not subjective.

Also, please note that the trailing ".." if often missed, even by bzr developers and bzr power-users, as shown by recent discussion on the mailing list.

Revision history for this message
Gioele Barabucci (gioele) wrote :

Both svn and git have a limit option that limits to the *last* N revisions when run in (default for them) --forward mode.

Revision history for this message
Gioele Barabucci (gioele) wrote :

Oops, the last comment about svn and git is wrong, influenced by my local settings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.