Issue #56 resolved

TypeError: b2a_hex() argument 1 must be string or read-only buffer, not None

Peter Arrenbrecht
created an issue

{{{ $ hg svnclone http://jsyntaxpane.googlecode.com/svn test ... [r73] ayman.alsairafi: Test commit for release 0.9.5 - Could Be Incomplete and p transaction abort! rollback completed unknown exception encountered, details follow report bug details to http://www.selenic.com/mercurial/bts or mercurial@selenic.com Mercurial Distributed SCM (version 88e223a00a8d) Extensions loaded: guessrenames, alias, bookmarks, color, crecord, extdiff, graphlog, mq, parentrevspec, patchbomb, pbranch, qct, rebase, record, transplant, hgsvn Traceback (most recent call last): File "/home/peo/local/bin/hg", line 27, in <module> mercurial.dispatch.run() File "/home/peo/local/lib/python/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/home/peo/local/lib/python/mercurial/dispatch.py", line 25, in dispatch return _runcatch(u, args) File "/home/peo/local/lib/python/mercurial/dispatch.py", line 41, in _runcatch return _dispatch(ui, args) File "/home/peo/local/lib/python/mercurial/dispatch.py", line 366, in _dispatch ret = _runcommand(ui, options, cmd, d) File "/home/peo/local/lib/python/mercurial/dispatch.py", line 415, in _runcommand return checkargs() File "/home/peo/local/lib/python/mercurial/dispatch.py", line 375, in checkargs return cmdfunc() File "/home/peo/local/lib/python/mercurial/dispatch.py", line 360, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/home/peo/local/lib/python/mercurial/util.py", line 718, in check return func(*args, kwargs) File "/home/peo/dev/hg/dev-hgsvn/__init__.py", line 51, in svn_fetch res = fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, opts) File "/home/peo/dev/hg/dev-hgsvn/fetch_command.py", line 87, in fetch_revisions replay_convert_rev(hg_editor, svn, r) File "/home/peo/dev/hg/dev-hgsvn/fetch_command.py", line 147, in replay_convert_rev hg_editor.commit_current_delta() File "/home/peo/dev/hg/dev-hgsvn/hg_delta_editor.py", line 635, in commit_current_delta new_hash = self.repo.commitctx(current_ctx) File "/home/peo/local/lib/python/mercurial/localrepo.py", line 852, in commitctx update_dirstate=False) File "/home/peo/local/lib/python/mercurial/localrepo.py", line 899, in commitctx new[f] = self.filecommit(fctx, m1, m2, linkrev, trp, changed) File "/home/peo/local/lib/python/mercurial/localrepo.py", line 763, in filecommit self.ui.debug((" %s: copy %s:%s\n") % (fn, cf, hex(cr))) TypeError: b2a_hex() argument 1 must be string or read-only buffer, not None }}}

Comments (6)

  1. Martijn Pieters

    This still occurs. Trying to follow what happened here:

    1. r70: create a new, empty branch /branches/r095
    2. r71: copy trunk over to /branches/r095/jsyntaxpane and modify some
    3. r72: some more additions and modifications
    4. r73: more changes and modifications, but some files were svn copied, then the source svn removed, including the following entry:
       A /branches/r095/jsyntaxpane/src/main/java/jsyntaxpane/actions/FindReplaceAction.java (from /branches/r095/jsyntaxpane/src/main/java/jsyntaxpane/actions/FindReplaceActions.java:72)
       D /branches/r095/jsyntaxpane/src/main/java/jsyntaxpane/actions/FindReplaceActions.java
    

    It's that entry that hg clone svn+ trips over, as the last line of --debug output shows:

      jsyntaxpane/src/main/java/jsyntaxpane/actions/FindReplaceAction.java: searching for copy revision for src/main/java/jsyntaxpane/actions/FindReplaceActions.java
    

    This log entry is emitted a few lines above the traceback.

  2. Martijn Pieters

    One thing to note here is that this svn repository does not use a standard trunk/branches layout. Trunk was copied over to /branches/r095/jsyntaxpane, and I suspect this is what is confusing hgsubversion resulting in incorrect manifest metadata when importing.

  3. Log in to comment