At 05:54 AM 7/22/2011, Remigiusz Modrzejewski wrote:
 >On Jul 22, 2011, at 14:46 , Richard Hipp wrote:
 >> The --bgcolor on the last commit is optional.  But it is nice
 >> to have color on branches.
 >
 >By the way: this is one of the more cumbersome things about the
 >UI. I'd really like to see this done automatically. But then
 >again, I don't feel like wasting my time on this, so I don't
 >expect anyone to waste theirs...

It would be nice if branches had a default color distinct from
the trunk. Naturally, the --bgcolor option should still be
available to override that default, and the UI could still change
it later. One way to do that that *might* be at least somewhat
immune to bikeshedding would be generate a hash of the branch tag
name and use it for the color.

For extra credit make the hash function naturally get white for
the trunk, and guarantee that it can generate enough different
colors to be "interesting" in a bushy repo, but not too many or
any that are too dark.

The latter condition is easy to get by computing a small (perhaps
eight bit) hash value, and assigning its bits to color components
in a way that distributes them among the colors and sets a
minimum brightness. The former condition is easily achieved by
adding a suitable constant to the result of the hash such that
the finished color is white.

I wouldn't worry much about hash collisions, just as long as most
collisions for the trunk are "unlikely" branch names.


Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to