Upgraded Debian, hatta fails with

Create issue
Issue #115 new
Former user created an issue

I just upgraded my server from Debian 9 to 10. hatta wouldn't start, so I found the new Mercurial repository and clone it. I get this error:

  File "/var/www/mywiki/scripts/hatta.wsgi", line 16, in <module>
    wiki = hatta.Wiki(config)
  File "/usr/src/hatta-new/hatta/wiki.py", line 133, in __init__
    self.index.update(self)
  File "/usr/src/hatta-new/hatta/search.py", line 315, in update
    rev = self.storage.repo_revision()
  File "/usr/src/hatta-new/hatta/storage.py", line 317, in repo_revision
    return self._changectx().rev()
  File "/usr/src/hatta-new/hatta/storage.py", line 328, in _changectx
    tip = self.repo.changectx()
  File "/usr/lib/python2.7/dist-packages/mercurial/repoview.py", line 252, in __getattr__
    return getattr(self._unfilteredrepo, attr)
AttributeError: 'derivedrepo:/var/www/mywifi' object has no attribute 'changectx'

How can I fix this?

Comments (1)

  1. Adam Sjøgren

    This is with Mercurial 4.8.2. The code in question failing reads:

    def _changectx(self):
        """Get the changectx of the tip."""
    
        thread_id = thread.get_ident()
        try:
            return self._tips[thread_id]
        except KeyError:
            try:
                # This is for Mercurial 1.0
                tip = self.repo.changectx()
            except TypeError:
                # Mercurial 1.3 (and possibly earlier) needs an argument
                tip = self.repo.changectx('tip')
            self._tips[thread_id] = tip
            return tip
    

    I wonder if another workaround is needed for Mercurial 4.8.2?

    Searching for the error leads me to a Redmine bug: https://www.redmine.org/issues/28725 - unfortunately I wasn’t able to “translate” the solution into the hatta code.

  2. Log in to comment