Skip to content
Snippets Groups Projects
  1. Nov 06, 2020
    • Gregory Szorc's avatar
      global: use python3 in shebangs · c102b704edb5
      Gregory Szorc authored
      Python 3 is the future. We want Python scripts to be using Python 3
      by default.
      
      This change updates all `#!/usr/bin/env python` shebangs to use
      `python3`.
      
      Does this mean all scripts use or require Python 3: no.
      
      In the test environment, the `PATH` environment variable in tests is
      updated to guarantee that the Python executable used to run
      run-tests.py is used. Since test scripts all now use
      `#!/usr/bin/env python3`, we had to update this code to install
      a `python3` symlink instead of `python`.
      
      It is possible there are some random scripts now executed with the
      incorrect Python interpreter in some contexts. However, I would argue
      that this was a pre-existing bug: we should almost always be executing
      new Python processes using the `sys.executable` from the originating
      Python script, as `python` or `python3` won't guarantee we'll use the
      same interpreter.
      
      Differential Revision: https://phab.mercurial-scm.org/D9273
      c102b704edb5
  2. Sep 02, 2020
    • haraldkl's avatar
      hgweb: compatibility of hgweb.cgi template with Python 3 · d58a205d0672
      haraldkl authored
      When running Mercurial on Python 3 hgweb expects the config variable to be a
      bytestring.
      The solution proposed by Anton Shestakov is to use a byteprefix to the literal
      string defined cgi script as provided in this patch for hgweb.cgi,
      contrib/hgweb.fcgi and contrib/hgweb.wsgi.
      I am not sure whether this covers all relevant templates, but I couldn't find
      others.
      
      Differential Revision: https://phab.mercurial-scm.org/D8978
      d58a205d0672
  3. Nov 16, 2019
  4. Sep 30, 2015
  5. Nov 10, 2011
  6. Jul 03, 2010
  7. Apr 26, 2010
  8. Feb 18, 2008
  9. Feb 12, 2008
  10. Feb 01, 2008
  11. Nov 30, 2007
  12. Aug 25, 2007
  13. Aug 18, 2007
  14. Dec 11, 2006
  15. Dec 04, 2006
  16. Jun 27, 2006
    • Eric Hopper's avatar
      This patch make several WSGI related alterations. · d0db3462d568
      Eric Hopper authored
      First, it changes the server to be almost a generic WSGI server.
      
      Second, it changes request.py to have wsgiapplication and
      _wsgirequest.  wsgiapplication is a class that creates _wsgirequests
      when called by a WSGI compliant server.  It needs to know whether
      or not it should create hgwebdir or hgweb requests.
      
      Lastly, wsgicgi.py is added, and the CGI scripts are altered to
      use it to launch wsgiapplications in a WSGI compliant way.
      
      As a side effect, all the keepalive code has been removed from
      request.py.  This code needs to be moved so that it is exclusively
      in server.py
      d0db3462d568
  17. Jun 17, 2005
    • mpm's avatar
      hgweb: pull cgitb into CGI script example, where it can easily be disabled · 5f65a108a559
      mpm authored
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1
      
      hgweb: pull cgitb into CGI script example, where it can easily be disabled
      
      This also eliminates cgitb dumps in the logging output of hg serve
      
      manifest hash: a0aa07a706c2c388c0b49505e2960197f716920c
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.0 (GNU/Linux)
      
      iD8DBQFCsv9DywK+sNU5EO8RAieFAJwOjdfkz7pILNVUTvpMkRa6/OIhIQCgo2TP
      I2E4hxQ0N7mTtl45pXEFLsk=
      =tG0v
      -----END PGP SIGNATURE-----
      5f65a108a559
  18. Jun 01, 2005
  19. May 26, 2005
    • mpm's avatar
      Add example CGI script · f9d8620ef469
      mpm authored
      This gives an example of how to easily use hgweb via CGI
      f9d8620ef469
Loading