我们的 CI 服务器上有一个 Mercurial 存储库,可通过 Windows 网络共享 ( \\server\hg_repo
) 使用。我们的 7 名开发人员团队定期推送和拉取那里。CI服务器本身也很明显。
定期存储库因错误而损坏:
stdout: requesting all changes
adding changesets
adding manifests
stderr: transaction abort!
rollback completed
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.0.1)
** Extensions loaded:
Traceback (most recent call last):
File "hg", line 42, in <module>
File "mercurial\dispatch.pyo", line 27, in run
File "mercurial\dispatch.pyo", line 64, in dispatch
File "mercurial\dispatch.pyo", line 87, in _runcatch
File "mercurial\dispatch.pyo", line 684, in _dispatch
File "mercurial\dispatch.pyo", line 466, in runcommand
File "mercurial\dispatch.pyo", line 738, in _runcommand
File "mercurial\dispatch.pyo", line 692, in checkargs
File "mercurial\dispatch.pyo", line 681, in <lambda>
File "mercurial\util.pyo", line 455, in check
File "mercurial\commands.pyo", line 1137, in clone
File "mercurial\hg.pyo", line 347, in clone
File "mercurial\localrepo.pyo", line 2056, in clone
File "mercurial\localrepo.pyo", line 1486, in pull
File "mercurial\localrepo.pyo", line 1871, in addchangegroup
File "mercurial\revlog.pyo", line 1157, in addgroup
File "mercurial\changegroup.pyo", line 187, in deltachunk
File "mercurial\changegroup.pyo", line 152, in chunklength
File "mercurial\changegroup.pyo", line 17, in readexactly
File "mercurial\util.pyo", line 863, in read
File "mercurial\util.pyo", line 841, in splitbig
File "mercurial\localrepo.pyo", line 1774, in gengroup
File "mercurial\revlog.pyo", line 1122, in group
File "mercurial\changegroup.pyo", line 244, in revchunk
File "mercurial\revlog.pyo", line 852, in revdiff
File "mercurial\revlog.pyo", line 831, in _chunk
File "mercurial\revlog.pyo", line 115, in decompress
zlib.error: Error -3 while decompressing data: invalid distance too far back
有趣的是,并非所有开发人员都可能出现错误,例如当我可以毫无错误地进行拉/推时,CI 服务器出现错误。
当我们从其他副本重新创建中央仓库时,它又可以正常工作了。
如何解决此错误?
**
更新:
**
当它今天再次发生时,我运行hg verify
它的混淆输出如下:
XXX> hg verify
checking changesets
checking manifests
hg.exe : 2355: reading manifest delta 2da8374dc3db: Error -3 while decompressing data: invalid distance too far back
+ CategoryInfo : NotSpecified: ( 2355: reading ...ce too far back:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
2356: reading manifest delta 784e9c245c61: unknown compression type '\xfb'
2357: reading manifest delta 5b147ce7d2a5: unknown compression type 'e'
2358: reading manifest delta e1aa758953b2: unknown compression type '\xb3'
2359: reading manifest delta 61dcc0da8106: unknown compression type 'F'
2360: reading manifest delta 7579106dd2fe: unknown compression type '\xfa'
2361: reading manifest delta b021c8e5ae34: unknown compression type '\xd2'
2362: reading manifest delta 04e2a8673e61: unknown compression type '\x84'
crosschecking files in changesets and manifests
checking files
XXX.csproj@2358: 564af8d2dcea not in manifests
XXX.cs@2356: d1d2086e 9b69 not in manifests
.......... // here are more 'not in manifests errors'
20 integrity errors encountered!
(first damaged changeset appears to be 2355)
14811 files, 3040 changesets, 31214 total revisions