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

나는 이미 문제를 격리시켰다고 생각한다. 요청이 왔다.

좋은 웹페이지 즐겨찾기