From 3cff9b442dbe16a0b52a7739d64a97836282385e Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Tue, 23 Oct 2012 14:59:31 -0400 Subject: [PATCH] Add help text to the tool shed repository upload form to advertise John Chilton's recent enhancement allowing for mercurial repository urls staring with hg:// or hgs://. --- lib/galaxy/webapps/community/controllers/upload.py | 11 +++++------ templates/webapps/community/repository/upload.mako | 5 ++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/webapps/community/controllers/upload.py b/lib/galaxy/webapps/community/controllers/upload.py index ab476a963da..6aa8da71c52 100644 --- a/lib/galaxy/webapps/community/controllers/upload.py +++ b/lib/galaxy/webapps/community/controllers/upload.py @@ -48,13 +48,12 @@ class UploadController( BaseUIController ): message = 'No files were entered on the upload form.' status = 'error' uploaded_file = None - elif url and url.startswith("hg"): - # Use mercurial clone to fetch repository, contents will then - # be copied over. + elif url and url.startswith( 'hg' ): + # Use mercurial clone to fetch repository, contents will then be copied over. uploaded_directory = tempfile.mkdtemp() - repo_url = "http%s" % url[len("hg"):] - repo_url = repo_url.encode('ascii', 'replace') - commands.clone(get_configured_ui(), repo_url, uploaded_directory) + repo_url = 'http%s' % url[ len( 'hg' ): ] + repo_url = repo_url.encode( 'ascii', 'replace' ) + commands.clone( get_configured_ui(), repo_url, uploaded_directory ) elif url: valid_url = True try: diff --git a/templates/webapps/community/repository/upload.mako b/templates/webapps/community/repository/upload.mako index d0235bf95f6..a0206a4f697 100644 --- a/templates/webapps/community/repository/upload.mako +++ b/templates/webapps/community/repository/upload.mako @@ -85,7 +85,10 @@
- Enter a URL to upload your files via http. + Enter a URL to upload your files via http. URLs that point to mercurial repositories (URLs that start with hg:// or hgs://) + are allowed. This mechanism results in the tip revision of an external mercurial repository being added to the tool shed + repository as a single new changeset. The revision history of the originating external mercurial repository is not uploaded + to the tool shed repository.