'bzr tags' should provide options to displays tags in sorted order

Bug #120231 reported by Jamu Kakar
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Dato Simó

Bug Description

The following discussion from IRC highlights the point:

<jkakar> It'd be nice if there was a --sort-by-date for bzr tags.
         This isn't obvious to newcomers: bzr tags|sort -k 2 -t \-
* jkakar looks to see if a bug has already been filed
<fullermd> It isn't really obvious that sort-by-date is meaningful in
           a branched history...
<LeoNerd> Each revision is unique. Revisions can be ordered by their
          commit date. Tags can be ordered by the date of the
          revisions they point at
<fullermd> Yes, but it's not clear to me that that's a meaningful
           thing to _do_. If you tagged a rev on 3/4, I tagged a rev
           on 5/6, and I merged your branch on 7/8, I might just as
           well expect my tag to be 'before' yours as vice versa.
<LeoNerd> Tags are per-branch though, aren't they/
<fullermd> The 'proper' order is very context-dependent.
<jkakar> fullermd: Yeah, I can see that. My use case right now is
         that I have a "production" branch that I add tags to
         everytime I make a release. So I have tags like "0.1.0",
         "0.2.0", "milestone-2", etc. When I list the tags in this
         case I want them in date-order because they represent a
         chronological set of events.
<LeoNerd> Don't the tags come in date order anyway..? They seem to
          when I do it But that might be a coincidence on their names
<fullermd> I think they come out in lexical order by the names.
<LeoNerd> Ahh
<jkakar> Yep, at least in 0.16.
<fullermd> jkakar: It might make more sense to instead show revnos
           instead of revids, and sort based on them, in your case.
<jkakar> fullermd: Maybe reusing the revisionspec names could be nice.
         bzr tags --sort-by date or bzr tags --sort-by revno

Revision history for this message
Alexander Belchenko (bialix) wrote :

tags don't have date information. The only thing you can sort by is revno. But propoer sorting should understand dotted revno. How to sort 10.1.2.3 and 10.2.1 properly?

Revision history for this message
Martin Pool (mbp) wrote :

You could plausibly sort by the date the tag was placed (which we currently do not record), or by the date of the referenced revision (which we do know.)

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

Fix available in his branch.

Changed in bzr:
assignee: nobody → adeodato
status: Confirmed → Fix Committed
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 1.0rc1
status: Fix Committed → Fix Released
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.