Edgewall Software
Modify

Opened 14 years ago

Last modified 2 years ago

#10136 new enhancement

Way to configure by default displayed branch

Reported by: Mitar Owned by:
Priority: normal Milestone: 1.7.1
Component: version control/browser Version: 0.12.2
Severity: normal Keywords: bitesized
Cc: mmitar@…, thirschfamily@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

For (at least Mercurial) it would be great to be able to configure which branch should be displayed as default in source code browser. Currently tip is displayed, but sometimes it is useful that default is some more "stable" branch.

Attachments (4)

default_branch_10136.diff (1.7 KB ) - added by thirschfamily@… 12 years ago.
Please find attached a possible solution for the requested feature. It's build based on the tag for Trac 0.12. The patch adds a new setting to the group hg called default_branch. The default value is 'default'. If the option is empty, the plugin uses the tip as before.
default_branch_10136.2.diff (2.1 KB ) - added by thirschfamily@… 12 years ago.
Please mark the previous patch as obsolete. This file is the correct version of the patch.
default_branch_10362.diff (2.1 KB ) - added by thirschfamily@… 12 years ago.
Please find attached a new version of the patch. There was an error on looking up the default branch in an empty (-1) repository. The plugin is now running for about 4 weeks at our production Trac systems.
default_branch_10136.3.diff (2.5 KB ) - added by thirschfamily@… 12 years ago.
Sorry, I mixed up something in the filename and the file contained a wrong method call.

Download all attachments as: .zip

Change History (12)

comment:1 by Christian Boos, 14 years ago

Keywords: bitesized added
Milestone: plugin - mercurial

Sure, we already received that feature request once and this shouldn't be hard to add.

comment:2 by Mitar, 13 years ago

Ping? ;-)

comment:3 by Remy Blank, 13 years ago

by thirschfamily@…, 12 years ago

Attachment: default_branch_10136.diff added

Please find attached a possible solution for the requested feature. It's build based on the tag for Trac 0.12. The patch adds a new setting to the group hg called default_branch. The default value is 'default'. If the option is empty, the plugin uses the tip as before.

comment:4 by thirschfamily@…, 12 years ago

Cc: thirschfamily@… added

by thirschfamily@…, 12 years ago

Attachment: default_branch_10136.2.diff added

Please mark the previous patch as obsolete. This file is the correct version of the patch.

by thirschfamily@…, 12 years ago

Attachment: default_branch_10362.diff added

Please find attached a new version of the patch. There was an error on looking up the default branch in an empty (-1) repository. The plugin is now running for about 4 weeks at our production Trac systems.

by thirschfamily@…, 12 years ago

Attachment: default_branch_10136.3.diff added

Sorry, I mixed up something in the filename and the file contained a wrong method call.

comment:5 by Remy Blank, 12 years ago

Shouldn't the default branch be a per-repository attribute?

in reply to:  5 comment:6 by thirschfamily@…, 12 years ago

Replying to rblank:

Shouldn't the default branch be a per-repository attribute?

That's a good idea, but is that already possible in Trac 0.12? I noticed the comment in mercurial-plugin/tracext/hg/backend.py#L473 and thought that it might be possible with the upcoming version but not in 0.12. Therefore I used the same structure as the other config settings like hgrc etc. so that a change to a per-repository could also contain the new default-branch setting.

comment:7 by Ryan J Ollos, 2 years ago

Component: plugin/mercurialversion control/browser

comment:8 by Ryan J Ollos, 2 years ago

Milestone: plugin - mercurial1.7.1

#10599 made the same request for TracGit and pointed here, so I've changed the component.

#13486 closed as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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