Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8843 closed enhancement (fixed)

Display branch name in timeline

Reported by: Yann Dirson <ydirson@…> Owned by: Christian Boos
Priority: normal Milestone: 0.12
Component: timeline Version: 0.12dev
Severity: normal Keywords: needmajor
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The timeline is highly uninformative about commits, when there are branches in a repository. No way to see at first glance which branch was impacted (and well, enforcing a trac-like "branchname in commit message" policy is not the best idea ;)

Attachments (2)

t8843-mercurial.patch (582 bytes ) - added by Christian Boos 12 years ago.
TracMercurial: add MercurialChangeset.get_branches()
t8843-timeline-show-branches-r9234.patch (3.3 KB ) - added by Christian Boos 12 years ago.
TracTimeline: display branch information for changesets, when available.

Download all attachments as: .zip

Change History (13)

comment:1 by Yann Dirson <ydirson@…>, 12 years ago

I realize that for svn this issue is tied to #1135 and possibly not that trivial, but for SCMs with real branch support (git, hg and such), such a feature should not be too hard to implement.

comment:2 by Christian Boos, 12 years ago

Keywords: needmajor added
Milestone: 0.12

Note that for svn, you can already get some quite informative display when using the following setting in your trac.ini:

[timeline]
changeset_show_files = location

In 0.12, you will see the repository name, in case you're using multiple repositories for tracking your branches (typical Mercurial style, though this is changing with increased support of in-repository named branches).

So, yes, that's a possible improvement we should consider, possibly by adding a branch method to the Changeset class.

comment:3 by Yann Dirson <ydirson@…>, 12 years ago

Another related issue would be the display of tags. I am not sure if the hg plugin handles tags aside from adding them to the quickjmp list (there is something about Tags as node properties which could get them displayed, but then I'm no hg user and could find no trac-hg public install showing this). Would this better belong to another ticket ?

comment:4 by Christian Boos, 12 years ago

No, it's fine to discuss that here.

We should probably have a display similar to what the other repository browsers do (e.g. http://selenic.com/repo/hg, http://repo.or.cz/w/git.git).

comment:5 by Christian Boos, 12 years ago

Owner: set to Christian Boos

First version in attachment:t8843-timeline-show-branches-r9234.patch for the Trac part and attachment:t8843-mercurial.patch for the MercurialChangeset.get_branches().

by Christian Boos, 12 years ago

Attachment: t8843-mercurial.patch added

TracMercurial: add MercurialChangeset.get_branches()

by Christian Boos, 12 years ago

TracTimeline: display branch information for changesets, when available.

comment:6 by Remy Blank, 12 years ago

Looks good. You could make the non-head background slightly darker, something like #ffb. As it is, it looks mostly white on my screen. OTOH, too much color is bad, too, so maybe a light grey background would be even better.

in reply to:  6 ; comment:7 by Christian Boos, 12 years ago

Replying to rblank:

… OTOH, too much color is bad, too, so maybe a light grey background would be even better.

Yes, I don't think the non-head branch info should catch the eye, so even if it looks mostly white, I think it's fine. Therefore I picked a lightgrey background in [9247].

Last edited 12 years ago by Christian Boos (previous) (diff)

comment:8 by Christian Boos, 12 years ago

Resolution: fixed
Status: newclosed

Related changes for TracMercurial committed in [9248].

in reply to:  7 comment:9 by Christian Boos, 12 years ago

Follow-up to cboos:

I don't think the non-head branch info should catch the eye, so even if it looks mostly white, I think it's fine.

And btw. I think that it still catches too much the eye, so one could even try:

  • trac/htdocs/css/timeline.css

    diff --git a/trac/htdocs/css/timeline.css b/trac/htdocs/css/timeline.css
    a b  
    7777dd.changeset .changes .move    { background: #ccc }
    7878dd.changeset .branch {
    7979 font-size: 85%;
    80  background: #f6f6f6;
    81  border: 1px solid #ddd;
     80 background: none;
     81 border: 1px solid #eee;
    8282 margin: 0 .5em 0 0;
    8383 padding: 0 .2em;
    8484 float: left;

comment:10 by Remy Blank, 12 years ago

No background looks good, too, but I'd keep the border at #ddd, otherwise it starts looking too much like the branch name is part of the message.

comment:11 by Remy Blank, 12 years ago

On second thought, I think I prefer the grey background.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.