Branch: refs/heads/dev Home: https://github.com/galaxyproject/galaxy Commit: 59002f69e6657c1e7f88f8e3095000136f0ffcf0 https://github.com/galaxyproject/galaxy/commit/59002f69e6657c1e7f88f8e309500... Author: Nicola Soranzo <nicola.soranzo@earlham.ac.uk> Date: 2018-04-16 (Mon, 16 Apr 2018) Changed paths: M lib/tool_shed/util/hg_util.py Log Message: ----------- Fix update_repository when hg repo has local modifications Fix the following traceback: ``` 149.155.222.206 - - [13/Apr/2018:11:04:46 +0100] "GET /admin_toolshed/update_to_changeset_revision?name=deseq2&latest_ctx_rev=14&tool_shed_url=https%3A%2F%2Ftoolshed.g2.bx.psu.edu%2F&o wner=iuc&changeset_revision=3660c9088494&latest_changeset_revision=d0c39b5e78cf HTTP/1.1" 500 - "https://galaxy.tgac.ac.uk/admin/repositories?__identifer=lhviib0n1kh" "Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" Traceback (most recent call last): File "lib/galaxy/web/framework/middleware/batch.py", line 75, in __call__ return self.application(environ, start_response) File "lib/galaxy/web/framework/middleware/request_id.py", line 15, in __call__ return self.app(environ, start_response) File "lib/galaxy/web/framework/middleware/xforwardedhost.py", line 23, in __call__ return self.app(environ, start_response) File "lib/galaxy/web/framework/middleware/translogger.py", line 71, in __call__ return self.application(environ, replacement_start_response) File "lib/galaxy/web/framework/middleware/error.py", line 166, in __call__ response = self.exception_handler(exc_info, environ) File "lib/galaxy/web/framework/middleware/error.py", line 181, in exception_handler get_vars = wsgilib.parse_querystring(environ) File "/opt/galaxy/.venv/lib/python2.7/site-packages/paste/request.py", line 107, in parse_querystring strict_parsing=False) File "/usr/lib64/python2.7/urlparse.py", line 408, in parse_qsl pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')] File "lib/galaxy/web/framework/middleware/error.py", line 154, in __call__ app_iter = self.application(environ, sr_checker) File "/opt/galaxy/.venv/lib/python2.7/site-packages/paste/recursive.py", line 85, in __call__ return self.application(environ, start_response) File "/opt/galaxy/.venv/lib/python2.7/site-packages/paste/httpexceptions.py", line 640, in __call__ return self.application(environ, start_response) File "lib/galaxy/web/framework/base.py", line 136, in __call__ return self.handle_request(environ, start_response) File "lib/galaxy/web/framework/base.py", line 215, in handle_request body = method(trans, **kwargs) File "lib/galaxy/web/framework/decorators.py", line 98, in decorator return func(self, trans, *args, **kwargs) File "lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py", line 1650, in update_to_changeset_revision hg_util.update_repository(repo, latest_ctx_rev) File "lib/tool_shed/util/hg_util.py", line 460, in update_repository commands.update(get_configured_ui(), repo, rev=ctx_rev) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/commands.py", line 6973, in update ret = hg.update(repo, rev) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/hg.py", line 680, in update stats = updaterepo(repo, node, False) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/hg.py", line 676, in updaterepo labels=['working copy', 'destination']) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/merge.py", line 1532, in update stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/merge.py", line 1196, in applyupdates complete, r = ms.preresolve(f, wctx, labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/merge.py", line 502, in preresolve return self._resolve(True, dfile, wctx, labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/merge.py", line 457, in _resolve labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/filemerge.py", line 680, in premerge return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/filemerge.py", line 627, in _filemerge r = _premerge(repo, fcd, fco, fca, toolconf, files, labels=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/filemerge.py", line 324, in _premerge r = simplemerge.simplemerge(ui, a, b, c, quiet=True, label=labels) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/simplemerge.py", line 397, in simplemerge out = opener(os.path.basename(local), "w", atomictemp=True) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/scmutil.py", line 530, in __call__ self.audit(path) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/pathutil.py", line 61, in __call__ or _lowerclean(parts[0]) in ('.hg', '.hg.', '') File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/pathutil.py", line 16, in _lowerclean return encoding.hfsignoreclean(s.lower()) File "/opt/galaxy/.venv/lib/python2.7/site-packages/mercurial/encoding.py", line 35, in hfsignoreclean if "\xe2" in s or "\xef" in s: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) ``` Also, use the Mercurial command line interface instead of the internal API, as recommended in https://www.mercurial-scm.org/wiki/MercurialApi . Commit: 3e56c24d0a13f4c0c7bac4deb795de163e214e8c https://github.com/galaxyproject/galaxy/commit/3e56c24d0a13f4c0c7bac4deb795d... Author: Martin Cech <marten@bx.psu.edu> Date: 2018-04-16 (Mon, 16 Apr 2018) Changed paths: M lib/tool_shed/util/hg_util.py Log Message: ----------- Merge pull request #5890 from nsoranzo/fix_update_repository [18.01] Fix update_repository when hg repo has local modifications Commit: 2bb388db201fc261afcfe9bb9337ad383f9e2734 https://github.com/galaxyproject/galaxy/commit/2bb388db201fc261afcfe9bb9337a... Author: Nicola Soranzo <nicola.soranzo@earlham.ac.uk> Date: 2018-04-16 (Mon, 16 Apr 2018) Changed paths: M lib/tool_shed/util/hg_util.py Log Message: ----------- Merge branch 'release_18.01' into dev Compare: https://github.com/galaxyproject/galaxy/compare/a1d76681f6c8...2bb388db201f