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://.

This commit is contained in:
Greg Von Kuster
2012-10-23 14:59:31 -04:00
parent 17ea1182f1
commit 3cff9b442d
2 changed files with 9 additions and 7 deletions
@@ -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:
@@ -85,7 +85,10 @@
<input name="url" type="textfield" value="${url | h}" size="40"/>
</div>
<div class="toolParamHelp" style="clear: both;">
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.
</div>
<div style="clear: both"></div>
</div>