Unable to push a revision
I'm trying to mirror the Python github repository.
I have successfully mirror locally (using hg clone git:...). Then I try to push it to an heptapod instance version 0.13.0rc.
I have successfully push 49657 commits.
For the following one the push fail, this is the offending patch:
$ hg log -r 69181 -p
changeset: 69181:282570c7598b
user: Victor Stinner <victor.stinner@haypocalc.com>
date: Wed May 25 00:19:07 2011 +0200
summary: Issue #12057: Add tests for the HZ encoding
diff -r 13c3fe31249f -r 282570c7598b Lib/test/cjkencodings/hz-utf8.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/test/cjkencodings/hz-utf8.txt Wed May 25 00:19:07 2011 +0200
@@ -0,0 +1,2 @@
+This sentence is in ASCII.
+The next sentence is in GB.己所不欲,勿施於人。Bye.
diff -r 13c3fe31249f -r 282570c7598b Lib/test/cjkencodings/hz.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/test/cjkencodings/hz.txt Wed May 25 00:19:07 2011 +0200
@@ -0,0 +1,2 @@
+This sentence is in ASCII.
+The next sentence is in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye.
diff -r 13c3fe31249f -r 282570c7598b Lib/test/test_codecencodings_cn.py
--- a/Lib/test/test_codecencodings_cn.py Tue May 24 23:10:54 2011 +0200
+++ b/Lib/test/test_codecencodings_cn.py Wed May 25 00:19:07 2011 +0200
@@ -50,6 +50,35 @@
)
has_iso10646 = True
+class Test_HZ(test_multibytecodec_support.TestBase, unittest.TestCase):
+ encoding = 'hz'
+ tstring = test_multibytecodec_support.load_teststring('hz')
+ codectests = (
+ # test '~\n' (3 lines)
+ (b'This sentence is in ASCII.\n'
+ b'The next sentence is in GB.~{<:Ky2;S{#,~}~\n'
+ b'~{NpJ)l6HK!#~}Bye.\n',
+ 'strict',
+ u'This sentence is in ASCII.\n'
+ u'The next sentence is in GB.'
+ u'\u5df1\u6240\u4e0d\u6b32\uff0c\u52ff\u65bd\u65bc\u4eba\u3002'
+ u'Bye.\n'),
+ # test '~\n' (4 lines)
+ (b'This sentence is in ASCII.\n'
+ b'The next sentence is in GB.~\n'
+ b'~{<:Ky2;S{#,NpJ)l6HK!#~}~\n'
+ b'Bye.\n',
+ 'strict',
+ u'This sentence is in ASCII.\n'
+ u'The next sentence is in GB.'
+ u'\u5df1\u6240\u4e0d\u6b32\uff0c\u52ff\u65bd\u65bc\u4eba\u3002'
+ u'Bye.\n'),
+ # invalid bytes
+ (b'ab~cd', 'replace', u'ab\uFFFDd'),
+ (b'ab\xffcd', 'replace', u'ab\uFFFDcd'),
+ (b'ab~{\x81\x81\x41\x44~}cd', 'replace', u'ab\uFFFD\uFFFD\u804Acd'),
+ )
Heptapod trace:
[2020-05-18 15:15:58 +0000] [34] [ERROR] Error handling request /@hashed/d5/9e/d59eced1ded07f84c145592f65bdf854358e009c5cd705f5215bf18697fed103.hg?cmd=unbundle
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 181, in handle_request
for item in respiter:
File "/usr/local/lib/python2.7/dist-packages/heptapod/wsgi.py", line 128, in run_wsgi
for r in self._runwsgi(req, res):
File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi
for r in self._runwsgi(req, res, repo):
File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 353, in _runwsgi
rctx, req, res, self.check_perm
File "/usr/local/lib/python2.7/dist-packages/mercurial/wireprotoserver.py", line 233, in handlewsgirequest
_callhttp(repo, req, res, proto, cmd)
File "/usr/local/lib/python2.7/dist-packages/mercurial/wireprotoserver.py", line 469, in _callhttp
rsp = wireprotov1server.dispatch(repo, proto, cmd)
File "/usr/local/lib/python2.7/dist-packages/mercurial/wireprotov1server.py", line 82, in dispatch
return func(repo, proto, *args)
File "/usr/local/lib/python2.7/dist-packages/mercurial/wireprotov1server.py", line 664, in unbundle
repo, gen, their_heads, b'serve', proto.client()
File "/usr/local/lib/python2.7/dist-packages/mercurial/exchange.py", line 2824, in unbundle
lockandtr[2].close()
File "/usr/local/lib/python2.7/dist-packages/mercurial/transaction.py", line 46, in _active
return func(self, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/mercurial/transaction.py", line 521, in close
self._validatecallback[category](self)
File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py", line 2193, in validate
b'pretxnclose', throw=True, **pycompat.strkwargs(tr.hookargs)
File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1754, in hook
return hook.hook(self.ui, self, name, throw, **args)
File "/usr/local/lib/python2.7/dist-packages/mercurial/hook.py", line 256, in hook
res = runhooks(ui, repo, htype, hooks, throw=throw, **args)
File "/usr/local/lib/python2.7/dist-packages/mercurial/hook.py", line 328, in runhooks
ui, repo, htype, hname, hookfn, args, throw
File "/usr/local/lib/python2.7/dist-packages/mercurial/hook.py", line 116, in pythonhook
r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args))
File "/usr/local/lib/python2.7/dist-packages/heptapod/hooks/gitlab_mirror.py", line 13, in mirror
gitlab_mirror(ui, repo)
File "/usr/local/lib/python2.7/dist-packages/hgext3rd/heptapod/__init__.py", line 124, in gitlab_mirror
git.HeptapodGitHandler(repo, repo.ui).export_commits()
File "/usr/local/lib/python2.7/dist-packages/hggit/git_handler.py", line 371, in export_commits
self.export_git_objects()
File "/usr/local/lib/python2.7/dist-packages/hggit/git_handler.py", line 530, in export_git_objects
self.export_hg_commit(ctx.node(), exporter)
File "/usr/local/lib/python2.7/dist-packages/hggit/git_handler.py", line 607, in export_hg_commit
self.git.object_store.add_object(obj)
File "/usr/local/lib/python2.7/dist-packages/dulwich/object_store.py", line 840, in add_object
with GitFile(path, 'wb') as f:
File "/usr/local/lib/python2.7/dist-packages/dulwich/file.py", line 88, in GitFile
return _GitFile(filename, mode, bufsize)
File "/usr/local/lib/python2.7/dist-packages/dulwich/file.py", line 132, in __init__
raise FileLocked(filename, self._lockfilename)
Jean-François