pretxncommit hook can corrupt repository

Issue #860 resolved
Alexey Larikov created an issue

Add pretxncommit hook in RhodeCode VCS settings, underr advanced link. Edit file in web UI and commit it. If this hook fails, server error 500 is returned. Respective repository cannot be accessed or modified any more.

Version 1.7.1.

Module rhodecode.controllers.changeset:2 in index
Module rhodecode.lib.auth:508 in __wrapper
>>  return func(*fargs, **fkwargs)
Module rhodecode.controllers.changeset:2 in index
Module rhodecode.lib.auth:570 in __wrapper
>>  return func(*fargs, **fkwargs)
Module rhodecode.controllers.changeset:315 in index
>>  return self._index(revision, method=method)
Module rhodecode.controllers.changeset:254 in _index
>>  ignore_whitespace=ign_whitespace_lcl, context=context_lcl)
Module rhodecode.lib.vcs.backends.hg.repository:281 in get_diff
>>  context=context)))
Module mercurial.patch:1576 in diff
>>  changes = repo.status(ctx1, ctx2, match=match)
Module mercurial.localrepo:1536 in status
>>  mf2 = mfmatches(ctx2)
Module mercurial.localrepo:1451 in mfmatches
>>  mf = ctx.manifest().copy()
Module mercurial.context:180 in manifest
>>  return self._manifest
Module mercurial.util:277 in __get__
>>  result = self.func(obj)
Module mercurial.context:150 in _manifest
>>  return self._repo.manifest.read(self._changeset[0])
Module mercurial.util:277 in __get__
>>  result = self.func(obj)
Module mercurial.context:146 in _changeset
>>  return self._repo.changelog.read(self.rev())
Module mercurial.changelog:282 in read
>>  text = self.revision(node)
Module mercurial.revlog:934 in revision
>>  text = self._checkhash(text, node, rev)
Module mercurial.revlog:943 in _checkhash
>>  % (self.indexfile, rev))
RevlogError: integrity check failed on 00changelog.i:11647

Comments (3)

  1. Log in to comment