moving hg to new server, hgweb setup problem

scott scott at tnstaafl.net
Sun Mar 24 23:55:24 UTC 2024


Thanks, I just figured out the problem.  I had unintentionally deleted the "b" in the string definition for the configuration file.ScottSent from my Galaxy
-------- Original message --------From: John W <jwdevel at gmail.com> Date: 3/24/24  16:51  (GMT-08:00) To: Scott Derrick <scott at tnstaafl.net> Cc: mercurial at lists.mercurial-scm.org Subject: Re: moving hg to new server, hgweb setup problem I don't have direct experience with configuring hgweb, but have you seen this old mailing list item?https://lists.mercurial-scm.org/pipermail/mercurial/2020-August/052200.htmlSeems worth a shot, at least.(perhaps also see the rest of that thread)-JohnOn Sun, Mar 24, 2024 at 10:04 AM Scott Derrick <scott at tnstaafl.net> wrote:

  

    
  
  
    Hi,
    
    Moved to a new server
    Ubuntu 22
    python3.10
    mercurial 6.1
    
    This is the apache2 error I  get when hitting the web site address
    https://URL/hg  I don't understand what "Mercurial only supports
    encoded strings" means? 
    
    
      [Sun Mar 24 16:48:30.464715 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215: Traceback (most recent call
        last):: /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.464776 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215:   File
        "/var/www/cgi-hg/hgweb.cgi", line 21, in <module>:
        /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.464798 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215:     application =
        hgweb("hgweb.config"): /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.464864 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215:   File
        "/usr/lib/python3/dist-packages/mercurial/hgweb/__init__.py",
        line 41, in hgweb: /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.464894 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215:     raise
        error.ProgrammingError(: /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.464945 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] AH01215:
        mercurial.error.ProgrammingError: Mercurial only supports
        encoded strings: 'hgweb.config': /var/www/cgi-hg/hgweb.cgi
      [Sun Mar 24 16:48:30.473397 2024] [cgi:error] [pid 41415]
        [client 172.0.6.80:56644] End of script output before headers:
        hgweb.cgi
    
    
    here is my hgweb.cgi file
    
    
      #!/usr/bin/env python3
      #
      # An example hgweb CGI script, edit as necessary
      # See also
        https://mercurial-scm.org/wiki/PublishingRepositories
      # Path to repo or hgweb config to serve (see 'hg help hgweb')
      config = "/var/www/cgi-hg/hbweb.config"
      # Uncomment and adjust if Mercurial is not installed
        system-wide
      # (consult "installed modules" path from 'hg debuginstall'):
      #import sys; sys.path.insert(0, "/path/to/python/lib")
      # Uncomment to send python tracebacks to the browser if an
        error occurs:
      #import cgitb; cgitb.enable()
      from mercurial import demandimport
      demandimport.enable()
      from mercurial.hgweb import hgweb, wsgicgi
      application = hgweb("hgweb.config")
      wsgicgi.launch(application)
    
    
    here is my hgweb.config file
    
    
      [paths]
      #VIRTUAL_PATH = /REAL/PATH
      #mbel  = /home/repos/mbel
      admin = /home/repos/admin
      mbepp = /home/repos/mbepp
      mbepEditor = /home/repos/mbepEditor
      monitor= /home/repos/monitor
      solrproxy= /home/repos/solrproxy
      mbep-data= /home/repos/mbep-data
      mbep-util= /home/repos/mbep-util
      mbep-editor= /home/repos/mbep-editor
      installer=/home/repos/installer
      updater=/home/repos/updater
      [web]
      style = gitweb
    
    here is my apache hg.conf file
    
    
      ScriptAliasMatch        ^/hg(.*)       
        /var/www/cgi-hg/hgweb.cgi/$1
      <Directory /var/www/cgi-hg/>
              Options ExecCGI FollowSymLinks Indexes MultiViews
              AllowOverride All
              Order allow,deny
              Allow from all
      </Directory>
      <Directory /home/repos/>
       Options FollowSymLinks
       AllowOverride None
       Allow from all
      </Directory>
    
    I tried python 2.7 didn't change anything.  I was using a very old
    version of mercurial(past eol) on the old server, but I really don't
    want to go back to that is possible.
    
    Scott
    Scott
  

_______________________________________________
Mercurial mailing list
Mercurial at lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20240324/3dbdbeb3/attachment.html>


More information about the Mercurial mailing list