Edgewall Software
Modify

Opened 6 years ago

Last modified 18 months ago

#10136 new enhancement

Way to configure by default displayed branch

Reported by: Mitar Owned by:
Priority: normal Milestone: plugin - mercurial
Component: plugin/mercurial Version: 0.12.2
Severity: normal Keywords: bitesized
Cc: mmitar@…, thirschfamily@…
Release Notes:
API 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@… 5 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@… 5 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@… 5 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@… 5 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 (10)

comment:1 Changed 6 years ago by Christian Boos

Keywords: bitesized added
Milestone: plugin - mercurial

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

comment:2 Changed 6 years ago by Mitar

Ping? ;-)

comment:3 Changed 6 years ago by Remy Blank

Changed 5 years ago by thirschfamily@…

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 Changed 5 years ago by thirschfamily@…

Cc: thirschfamily@… added

Changed 5 years ago by thirschfamily@…

Attachment: default_branch_10136.2.diff added

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

Changed 5 years ago by thirschfamily@…

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.

Changed 5 years ago by thirschfamily@…

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 Changed 5 years ago by Remy Blank

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

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

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.

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.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences .

 
Note: See TracTickets for help on using tickets.