'bzr tags' should provide options to displays tags in sorted order
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
<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
Changed in bzr: | |
milestone: | none → 1.0rc1 |
status: | Fix Committed → Fix Released |
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?