This commit is contained in:
Martin Cech
2016-03-31 11:10:58 -04:00
parent 7c94ac8d93
commit dc4d4cbce7
3 changed files with 7 additions and 0 deletions
+3
View File
@@ -35,6 +35,9 @@ database_file = database/community.sqlite
# The default is the Galaxy installation directory.
#hgweb_config_dir = None
# Disable Mercurial pushing to repositories.
#disable_push = True
# Where tool shed repositories are stored.
file_path = database/community_files
# Temporary storage for additional datasets,
+1
View File
@@ -136,6 +136,7 @@ class Configuration( object ):
self.sentry_dsn = kwargs.get( 'sentry_dsn', None )
# Where the tool shed hgweb.config file is stored - the default is the Galaxy installation directory.
self.hgweb_config_dir = resolve_path( kwargs.get( 'hgweb_config_dir', '' ), self.root )
self.disable_push = string_as_bool( kwargs.get( "disable_push", "True" ) )
# Proxy features
self.apache_xsendfile = kwargs.get( 'apache_xsendfile', False )
self.nginx_x_accel_redirect_base = kwargs.get( 'nginx_x_accel_redirect_base', False )
@@ -74,6 +74,9 @@ class Hg( object ):
connection.execute( sql_cmd )
connection.close()
elif cmd in [ 'unbundle', 'pushkey' ]:
if self.config[ 'disable_push' ]:
msg = 'Pushing to Tool Shed is disabled.'
return self.__display_exception_remotely( start_response, msg )
# This is an hg push from the command line. When doing this, the following commands, in order,
# will be retrieved from environ (see the docs at http://mercurial.selenic.com/wiki/WireProtocol):
# # If mercurial version >= '2.2.3': capabilities -> batch -> branchmap -> unbundle -> listkeys -> pushkey -> listkeys