On Thu, Oct 28, 2010 at 03:13:21PM +0200, Gianluca Montecchi wrote: > I have not a way to sort the targets in the order I want, since when > I read the bug list, they are reported in creation order, with the > newer first.
Cheap answer:
I think targets can be ordered by with dependency trees, and sorted by
$ ./be depend -t 0 /773
bea/773 blocked by:
bea/275:fm: Fix Unicode handling.
Although of course you'd want to reformat the output for HTML.
Mid-range answer:
I suggest people just pick a sane target naming scheme that can be
sorted correctly by distutils.version.LooseVersion (see PEP 386 [1]),
and we add a LooseVersion-based summary sorter.
Luxury answer:
> Also the depend field it is not usefull in this occasion, since while it is
> still true that a 1.1 version will be released after a 1.0 version, it is not
> always true that a 1.2 version will be released before a 2.0 version, so
If the order of 1.2 vs 2.0 is not defined, we can list them in
whatever order we want. If you want to *enforce* an ordering, than
one of them depends on the other, and a dependency ordering (see
below) will list them in the proper order.
> I cannot set that V2 depend on V1.2, but even if I do it, I still get that V2
> will be showed before V1.2 since it is newer.
This is because of the default sort (libbe.bug.cmp_full) sorts by
time. The list sorting code (libbe.command.list.List._sort_bugs)
shows how you can sort a list of bugs by any parameter you like.
If you want a dependency-ordered list, you could traverse the
dependency tree à la libbe.command.depend.DependencyTree, which would
break your list of targets into disjoint trees. Then you'd have to
develop a way to sort disjoint trees (e.g. by root, or "greatest" tip,
or ...). A step in this direction would be generalizing
libbe.command.depend.DependencyTree to libbe.command.depend.DiGraph.
> 1) add a field "deadline" to the bug
I think the "targets as bugs" treatment is worthwhile because it keeps
the base system simple while allowing people to use targets if they
want. We should try to restrict feature extensions to things that
work nicely in libbe.commands.*, and not go delving into the base
system in libbe.* itself.
> 2) add a file that contain the target in the correct order
Yuck ;).
[1]: http://www.python.org/dev/peps/pep-0386/
--
This email may be signed or encrypted with GPG (http://www.gnupg.org).
The GPG signature (if present) will be attached as 'signature.asc'.
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
pgpUXldS2VgLA.pgp
Description: PGP signature
_______________________________________________ Be-devel mailing list [email protected] http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
