gg gexport의 유형 오류
4968 단어 hg-git
묘사
mike@winslow:~$ hg clone https://[email protected]/durin42/hg-git
destination directory: hg-git
requesting all changes
adding changesets
adding manifests
adding file changes
added 360 changesets with 889 changes to 196 files
updating to branch default
56 files updated, 0 files merged, 0 files removed, 0 files unresolved
mike@winslow:~$ cd hg-git/
mike@winslow:~/hg-git$ hg gexport
importing Hg objects into Git
(-25200, False)
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or [email protected]
** Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5]
** Mercurial Distributed SCM (version 1.6.4+177-6bf8d48bec8e)
** Extensions loaded: bookmarks, hggit
Traceback (most recent call last):
File "/usr/local/bin/hg", line 37, in <module>
mercurial.dispatch.run()
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 591, in _dispatch
cmdpats, cmdoptions)
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 402, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 642, in _runcommand
return checkargs()
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 596, in checkargs
return cmdfunc()
File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 589, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/local/lib/python2.6/dist-packages/mercurial/util.py", line 427, in check
return func(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/hg_git-0.2.4-py2.6.egg/hggit/__init__.py", line 83, in gexport
git.export_commits()
File "/usr/local/lib/python2.6/dist-packages/hg_git-0.2.4-py2.6.egg/hggit/git_handler.py", line 115, in export_commits
self.export_git_objects()
File "/usr/local/lib/python2.6/dist-packages/hg_git-0.2.4-py2.6.egg/hggit/git_handler.py", line 187, in export_git_objects
self.export_hg_commit(rev)
File "/usr/local/lib/python2.6/dist-packages/hg_git-0.2.4-py2.6.egg/hggit/git_handler.py", line 241, in export_hg_commit
self.git.object_store.add_object(commit)
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/object_store.py", line 520, in add_object
dir = os.path.join(self.path, obj.id[:2])
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 453, in id
return self.sha().hexdigest()
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 445, in sha
new_sha.update(self._header())
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 424, in _header
return object_header(self.type, self.raw_length())
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 429, in raw_length
for chunk in self.as_raw_chunks():
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 225, in as_raw_chunks
self._chunked_text = self._serialize()
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 1038, in _serialize
self._commit_timezone_neg_utc)))
File "/usr/local/lib/python2.6/dist-packages/dulwich-0.7.0-py2.6-linux-i686.egg/dulwich/objects.py", line 917, in format_timezone
if offset % 60 != 0:
TypeError: unsupported operand type(s) for %: 'tuple' and 'int'
(주의) 위쪽을 거슬러 올라가서 원조를 인쇄했습니다. 이것은 dulwich에 디버깅 스위치를 추가했기 때문입니다.@@ -913,8 +913,12 @@ def format_timezone(offset, negative_utc=False):
:param negative_utc: Whether to use a minus sign for UTC
(-0000 rather than +0000).
"""
- if offset % 60 != 0:
- raise ValueError("Unable to handle non-minute offset.")
+ try:
+ if offset % 60 != 0:
+ raise ValueError("Unable to handle non-minute offset.")
+ except TypeError:
+ print offset
+ raise
if offset < 0 or (offset == 0 and negative_utc):
sign = '-'
else:
토론 #1
나는 이미 문제를 격리시켰다고 생각한다. 요청이 왔다.Reference
이 문제에 관하여(gg gexport의 유형 오류), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/schacon/hg-git/issues/147텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)