Using the CGI and largefiles in the server, current code requires that Apache sets the HOME environment variable. HOME existence can't be garanteed. Traceback: """ AttributeError: 'NoneType' object has no attribute 'endswith' Traceback (most recent call last): File "/datos/sources/hg/cgi-bin.jcea/hgwebdir.cgi", line 67, in <module> wsgicgi.launch(application) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/wsgicgi.py", line 76, in launch content = application(environ, start_response) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgwebdir_mod.py", line 147, in __call__ return self.run_wsgi(req) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgwebdir_mod.py", line 205, in run_wsgi return hgweb(repo).run_wsgi(req) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgweb_mod.py", line 127, in run_wsgi return protocol.call(self.repo, req, cmd) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/protocol.py", line 76, in call rsp = wireproto.dispatch(repo, p, cmd) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/wireproto.py", line 344, in dispatch return func(repo, proto, *args) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/proto.py", line 66, in statlfile filename = lfutil.findfile(repo, sha) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 111, in findfile elif inusercache(repo.ui, hash): File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 106, in inusercache return os.path.exists(usercachepath(ui, hash)) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 100, in usercachepath path = os.path.join(os.getenv('HOME'), '.cache', longname, hash) File "/usr/local/lib/python2.7/posixpath.py", line 68, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith' Traceback (most recent call last): File "/datos/sources/hg/cgi-bin.jcea/hgwebdir.cgi", line 67, in <module> wsgicgi.launch(application) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/wsgicgi.py", line 76, in launch content = application(environ, start_response) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgwebdir_mod.py", line 147, in __call__ return self.run_wsgi(req) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgwebdir_mod.py", line 205, in run_wsgi return hgweb(repo).run_wsgi(req) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/hgweb_mod.py", line 127, in run_wsgi return protocol.call(self.repo, req, cmd) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/hgweb/protocol.py", line 76, in call rsp = wireproto.dispatch(repo, p, cmd) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/mercurial/wireproto.py", line 344, in dispatch return func(repo, proto, *args) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/proto.py", line 32, in putlfile lfutil.copytostoreabsolute(repo, tmpname, sha) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 224, in copytostoreabsolute if inusercache(repo.ui, hash): File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 106, in inusercache return os.path.exists(usercachepath(ui, hash)) File "/usr/local/lib/python2.7/site-packages/mercurial-2.0-py2.7-solaris-2.10-i86pc.egg/hgext/largefiles/lfutil.py", line 100, in usercachepath path = os.path.join(os.getenv('HOME'), '.cache', longname, hash) File "/usr/local/lib/python2.7/posixpath.py", line 68, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith' """ Mailing list thread: http://selenic.com/pipermail/mercurial/2011-November/040685.html
Note that by setting largefiles.usercache on your server settings, the error does not occurs, as mercurial will then use the specified path, and will not try to come up with a user store on its own. That configuration is not documented though. (downgrading to bug as there is a workaround)
Fixed by http://selenic.com/repo/hg/rev/971c55ce03b8 Kevin Gessner <kevin@fogcreek.com> largefiles: don't require a user cache (issue3088) (issue3155) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:24 EDT --- This bug was previously known as _bug_ 3088 at http://mercurial.selenic.com/bts/issue3088