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)
Change History (12)
comment:1 by , 14 years ago
Keywords: | bitesized added |
---|---|
Milestone: | → plugin - mercurial |
by , 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 , 12 years ago
Cc: | added |
---|
by , 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 , 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 , 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.
follow-up: 6 comment:5 by , 12 years ago
Shouldn't the default branch be a per-repository attribute?
comment:6 by , 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 , 2 years ago
Component: | plugin/mercurial → version control/browser |
---|
comment:8 by , 2 years ago
Milestone: | plugin - mercurial → 1.7.1 |
---|
Sure, we already received that feature request once and this shouldn't be hard to add.