无法提交商品回购 [英] Cannot commit in mercurial repo

查看:101
本文介绍了无法提交商品回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Mercuirial(3.6.1)项目.每次我尝试提交时,都会收到下一个错误.

I have a Mercuirial (3.6.1) project. Every time I try to commit I get the next error.

(project)➜  project hg:(default) ✗ hg commit -m "TICK-190" subfolder/models.py


** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2]
** Mercurial Distributed SCM (version 3.6.1)
** Extensions loaded: 
Traceback (most recent call last):
  File "/home/django/project/bin/hg", line 43, in <module>
    mercurial.dispatch.run()
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 54, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 116, in dispatch
    ret = _runcatch(req)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 187, in _runcatch
    return _dispatch(req)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 920, in _dispatch
    cmdpats, cmdoptions)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 679, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/django/plantbid/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1051, in _runcommand
    return checkargs()
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1011, in checkargs
    return cmdfunc()
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 917, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/util.py", line 801, in check
    return func(*args, **kwargs)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/commands.py", line 1584, in commit
    node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/cmdutil.py", line 2491, in commit
    return commitfunc(ui, repo, message, matcher, opts)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/project.py", line 1578, in commitfunc
    extra=extra)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/localrepo.py", line 64, in wrapper
    return orig(repo.unfiltered(), *args, **kwargs)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/localrepo.py", line 1550, in commit
    allowemptycommit = (wctx.branch() != wctx.p1().branch()
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/context.py", line 533, in branch
    return encoding.tolocal(self._changeset[5].get("branch"))
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/util.py", line 534, in __get__
    result = self.func(obj)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/context.py", line 502, in _changeset
    return self._repo.changelog.read(self.rev())
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/changelog.py", line 338, in read
    text = self.revision(node)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 1110, in revision
    bins = self._chunks(chain, df=_df)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 1015, in _chunks
    self._chunkraw(revs[0], revs[-1], df=df)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 990, in _chunkraw
    return self._getchunk(start, length, df=df)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 981, in _getchunk
    return self._loadchunk(offset, length, df=df)
  File "/home/django/project/local/lib/python2.7/site-packages/mercurial/revlog.py", line 966, in _loadchunk
    return util.buffer(d, offset - realoffset, length)
ValueError: size must be zero or positive

我无法解释的更多细节.我提交我的代码时没有问题,突然此错误开始显示.我无法提交任何文件.我可以毫无疑问地询问gor hg的状态.

There's no much more detail I can explain. I was commiting my code without problems and suddenly this error started to show. I cannot commit any file. I can ask gor hg status with no problem.

由于这是我最近得到的一个遗留项目,因此我想进行尽可能少的更改.

Since this is a legacy project I've recently got, I want to make as little changes as possible.

更新:

hg verify

repository uses revlog format 1
checking changesets
 changelog@?: data length off by 1066185 bytes
 changelog@?: rev 6801 points to nonexistent changeset -1
 (expected 6801)
 6802: unpacking changeset b087b38d690d: revlog decompress error: Error -5 while decompressing data: incomplete or truncated stream
checking manifests
 manifest@?: data length off by 1894563 bytes
 manifest@?: rev 6729 points to nonexistent changeset -1                        
 manifest@?: 000000000000 not in changesets                                     
 manifest@?: rev 6730 points to unexpected changeset 6802                       
 manifest@?: 9363dc75d5fb not in changesets                                     
 ?: reading manifest delta 9363dc75d5fb: revlog decompress error: Error -5 while decompressing data: incomplete or truncated stream
crosschecking files in changesets and manifests                                 
checking files
 plantbid/templates/rfp_edit_nursery_responses3.html@?: rev 8 points to unexpected changeset 6802
 (expected )                                                                    
 plantbid/templates/rfp_edit_nursery_responses3.html@?: 7e15c24e6859 not in manifests
 plantrfp/views.py@4684: broken revlog! (index data/plantrfp/views.py.i is corrupted)
warning: orphan revlog 'data/plantrfp/views.py.i'                               
2266 files, 6803 changesets, 13181 total revisions
3 warnings encountered!
12 integrity errors encountered!
(first damaged changeset appears to be 4684)

推荐答案

您可能已经在Mercurial中发现了一个错误,但是在提交错误报告之前,请先尝试更新到最新的Mercurial版本(3.9). https://www.mercurial-scm.org

You may have found a bug in Mercurial, but try updating to the latest Mercurial version (3.9) first before you file a bug report. https://www.mercurial-scm.org

Re:Update:看来您的存储库有故障.也许您的硬盘有错误?这是存储库的唯一副本,还是其他地方?您最好的选择可能是尝试找到一个不间断的副本.

Re:Update: That looks like your repository is faulty. Maybe your hard drive has errors? Is this the only copy of the repository, or is there another one somewhere else? You best bet is probably to try and find a non-broken copy.

这篇关于无法提交商品回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆