Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: metabrainz/musicbrainz-server
base: 6d449382ee
...
head fork: metabrainz/musicbrainz-server
compare: e773336526
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 14, 2012
@navap navap MBS-4551: Display active git branch a99ed7c
Commits on Apr 16, 2012
@navap navap MBS-4551: Remove unnecessary IF aa780d9
Oliver Charles Merge remote branch 'navap/mbs-4551-display-active-branch'
* navap/mbs-4551-display-active-branch:
  MBS-4551: Remove unnecessary IF
  MBS-4551: Display active git branch
e773336
View
15 lib/DBDefs.pm.default
@@ -256,11 +256,16 @@ This server is temporarily in read-only mode
for database maintainance.
EOF
-# This defines the version of the server. Only used by things which display
-# the server version, e.g. at the foot of each web page. Basically it can be
-# whatever you want. If you leave it blank, the current subversion revision
-# will be shown (if subversion is in use).
-sub VERSION { "master" }
+# Development server feature.
+# Used to display which git branch is currently active.
+sub GIT_BRANCH
+{
+ if (DB_STAGING_SERVER) {
+ my $git_branch = `git branch --no-color 2> /dev/null | sed -e '/^[^*]/d'`;
+ $git_branch =~ s/\* (.+)/$1/;
+ return $git_branch;
+ }
+}
# How long (in seconds) a web/rdf session can go "idle" before being timed out
sub WEB_SESSION_SECONDS_TO_LIVE { 3600 * 3 }
View
8 lib/MusicBrainz/Server/Controller/Root.pm
@@ -269,12 +269,8 @@ sub end : ActionClass('RenderView')
developement_server => &DBDefs::DEVELOPMENT_SERVER
};
- # Determine which server version to display. If the DBDefs string is empty
- # attempt to display the current subversion revision
- if (&DBDefs::VERSION)
- {
- $c->stash->{server_details}->{version} = &DBDefs::VERSION;
- }
+ # Display which git branch is active (only on dev servers)
+ $c->stash->{server_details}->{git_branch} = &DBDefs::GIT_BRANCH;
# For displaying release attributes
$c->stash->{release_attribute} = \&MusicBrainz::Server::Release::attribute_name;
View
5 root/layout.tt
@@ -62,6 +62,11 @@
[% form_submit(l('Search'), "header-search") %]
</form>
</div>
+ [%- IF server_details.git_branch -%]
+ <div class="git-branch">
+ [%- l('Development branch: {branch}', { branch => server_details.git_branch }) -%]
+ </div>
+ [%- END -%]
</div>
<div id="header-menu">
<div>
View
6 root/static/styles/layout.css
@@ -116,6 +116,12 @@ pre code {
padding-right: 1em;
}
+#header-logo div.git-branch {
+ position: absolute;
+ top: 2px;
+ right: 18px;
+}
+
#header-logo #id-type {
margin-right: 4px;
margin-left: 10px;

No commit comments for this range

Something went wrong with that request. Please try again.