[issue2479] convert: crash on converting main bzr repo, trying to convert into old repo

Arne Babenhauserheide bugs at mercurial.selenic.com
Mon Nov 8 08:23:11 UTC 2010


New submission from Arne Babenhauserheide <arne_bab at web.de>:

Hi, 

Converting the main Bazaar repo crashed for me, but I can’t reproduce it
anymore after having deleted the old target repo and converting into a new
one ⇒ can be marked as resolved, but I wanted to save it here for
documentations sake. 

What I did:  

1. Use a pristine hg (without ~/.hgrc)
2. bzr init-repo /tmp/bzr; bzr branch lp:bzr /tmp/bzr/bzr.dev
3. hg --config "extensions.convert=" convert --datesort /tmp/bzr/bzr.dev bzr

g --config "extensions.convert=" convert --datesort /tmp/bzr/bzr.dev bzr
Durchsuche Quelle...
Sortiere...
Konvertiere...
23793 [merge] bzr.dev 2276
Transaktion abgebrochen!
Zurückrollen abgeschlossen
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (release26-maint, Sep 28 2010, 17:13:01) [GCC 4.4.3]
** Mercurial Distributed SCM (version 1.7)
** Erweiterungen geladen: convert
Traceback (most recent call last):
  File "/usr/bin/hg-2.6", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 16,
in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 36,
in dispatch
    return _runcatch(u, args)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 58,
in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 590,
in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 401,
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 641,
in _runcommand
    return checkargs()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 595,
in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 588,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 427, in
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/__init__.py", line
254, in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
433, in convert
    c.convert(sortmode)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
359, in convert
    self.copy(c)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
328, in copy
    source, self.map)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/hg.py", line 171,
in putcommit
    self.repo.commitctx(ctx)
  File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line
1004, in commitctx
    changed)
  File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line
827, in _filecommit
    self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(crev)))
TypeError: b2a_hex() argument 1 must be string or read-only buffer, not None

$ hg --config "extensions.convert=" convert /tmp/bzr/bzr.dev bzr
Durchsuche Quelle...
Sortiere...
Konvertiere...
23793 Snapshot dirstate development
23792 Fix getting two different tree roots in the
set_parent_trees_no_content dirstate test.
23791 Correct row updates during DirState.set_parent_trees.
23790 test_set_parent_trees_no_content dirstate test now passing.
23789 First DirState.add() method test passing.
23788 Dirstate: Fix setting of parent trees to record data about entries not
in
23787 Now all tests matching dirstate pass - added generation of inventories
for parent trees.
23786 Fix the format 4 tree layout test.
23785 Partial implementation of WorkingTree4._add.
23784 Test adding of directories to the root of a dirstate.
23783 Dirstate: fix adding of directories to setup the next directories
block, and test representation of symlinks. Also fix iter_rows to not reset
the dirty bit.
23782 Dirstate - truncate state file fixing bug in saving a smaller file,
get more tree_implementation tests passing.
23781 Implement WorkingTreeFormat4._write_inventory for better compatability
with existing code, letting more test_test_trees pass, now up to
test_tree_with_subdirs_and_all_content_types.
23780 tweaks - finishes off all the test_test_trees tests for dirstate.
23779 Dirstate: all tree_implementation tests passing.
23778 Remove unneeded and unportable WorkingTree basis-inventory test 
23777 Bypass irrelevant basis_inventory tests for dirstate.
23776 Add WorkingTree4._last_revision, making
workingtree_implementations.test_changes_from pass.
23775 Dirstate: implement WorkingTree4.unversion, letting some test_commit
tests pass.
23774 When parsing the contents, ghosts are not records, so should not be
included in the line parsing.
23773 When adding ghosts revision_tree() raises RevisionNotPresent because
of Knit, not NoSuchRevision
23772 DirstateRevisionTrees need to be read_locked before they will work as
BasisTree
23771 Use a clearer variable for num_present_parents while reading dirblocks
23770 Fix a copyright statement to let 'source' tests pass
23769 TestWorkingTree.test__write_inventory needs to lock the tree before
calling _write_inventory for dirstate.
23768 Change the error raised from Dirstate.add for an unversioned parent
path to match the WorkingTree interface.
23767 Some workingtree_implementations/test_workingtree.py test work - add
DirStateRevisionTree.has_filename, locks around appropriate calls in tests.
23766 Work in progress to make merge_inner work with dirstate trees.
23765 Make test_clear_merge_conflicts pass for dirstate. This involved
working
23764 Correct thunko in refactoring a few commits back.
23763 Fix WorkingTree4 parent_ids logic to use the dirstate to answer parent
ids list queries.
23762 Remove inappropriate use of inventory in tree executability tests. The
inventory is not the authoritative source of executability.
23761 Fix Dirstate unversioning of entries which are in a parent.
23760 Get TestExecutable.test_06_pull working on DirState: fix cloning and
the set_last_revision api on WorkingTree4.
23759 Fix WorkingTree4.pull to work.
23758 WorkingTree4: flush can only be used during write locks.
23757 Remove incomplete and unused dirstate api add_parent_tree.
23756 Fix Dirstate.get_parent_ids to return a copy of the ids, not a list
whose mutation will break us.
23755 Fix WorkingTree4.set_parent_trees.
23754 WorkingTree4.add must not require a file to exist to add it when kind
etc is given.
23753 Fix tree unlock on readonly Format4 trees with dirty hashcache.
23752 Dirstate - fix revision_tree() behaviour to match the interface
contract.
23751 Dirstate - unversion should set the tree state as dirty.
23750 Adjust walkdirs tests to talk a lock around walk_dirs.
23749 Write out a placeholder for parent info when a file is added.
23748 set_state_from_inventory needs to include NULL records for parents
when there wasn't an entry before
23747 merge only needs a lock_tree_write() on the working tree, not a full
lock_write()
23746 simple rewrap for 79 char lines
23745 Dirstate - fix workingtree.list_files to use the public interface to
access the trees inventory.
23744 Teach TreeTransform to lock basis_trees if it acquires them, fixing
revert on a dirstate working tree.
23743 Add in non-normalized filename sanity check to dirstate add().
23742 add extra flush() call to make _update_tree work for dirstate.
23741 Dirstate: bring set_last_revision into line with the tested API.
23740 Dirstate test change: TestWorkingTree.test_rename_dirs should lock
around accessing the trees inventory.
23739 Fix the way we used osutils.normalized_filename in dirstate to support
overriding in tests - and document this in the original location it was
used.
23738 All WorkingTree4 and dirstate tests passing.
23737 Add an explicit exception since tree.list_files() requires a lock (at
least for dirstate
23736 Find callers of list_files() and make sure the tree is always locked.
23735 add a workingtree_implementations test that makes sure smart_add_tree
orks properly
23734 track down a couple other places where we are using list_files.
23733 Add the DirStateRevisionTree to the list of 'tree_implementations'
23732 override path2id because it should be optimized anyway
23731 Move _get_row and _get_block_row_index into Dirstate itself.
23730 Switch to the fast form for path2id
23729 Switch the WorkingTree4 internals to use state._get_block_row_index
23728 Implement annotate_iter, get_revision_id, and walkdirs so that all
tree_implementations now pass
23727 Minor improvements to DirStateRevisionTree.walkdirs()
23726 Add a test for list_files, and implement it for DirStateRevisionTree
23725 Add some tests for WorkingTree.basis_tree()
23724 50% speedup in the dirstate->inventory conversion logic by caching the
parent ids as we walk the tree. Some further work would be to maintain a
stack of parents as we know we visit depth first.
23723 Minor performance optimisation in _generate_inventory by avoiding
normalisation checks and just using a factory to create the inventory
entries.
23722 Correct generation of revisiontree inventories to handle out of order
parents.
23721 Add tests for revision trees with a different unique root to the
current tree.
23720 Tune working inventory generation more: walk the blocks, skipping
deleted rows.
23719 Really finish the prior commit.
23718 Take out repository locks from Dirstate revision trees, to improve
file text access performance.
23717 In status, read lock the old and new trees being used to let data
caching occur.
23716 WorkingTree4: Implement filter_unversioned_files to use dirstate
bisection.
23715 various notes about find_ids_across_trees
23714 Http redirections are not followed by default. Do not use hints
23713 Add tests.
23712 Add comments and fix typos
23711 Take Aaron comments into account.
23710 Revert BzrDirFormat1 registering.
23709 Cleanup docstring for Aaron Bentley
23708 Get kind change detection working for iter_changes
23707 Use tree transform to emit upcoming change list
23706 Sort output of Transform.iter_changes by path
23705 cleanup
23704 Emit change listings before conflict warnings
23703 Stop modified flag bleeding into later changes
23702 Clarify what conflicts may not be present
23701 Apply change reporting to merge
23700 Add change reporting to pull
23699 Get tests passing
23698 Changes from review
23697 Get merge working initially
23696 Merge from bzr.dev
23695 Restore InterWeaveRepo
23694 Re-register InterWeaveRepo, fix test integration, add test for it
23693 Add deprecated forwarders for old formats from repository.py
23692 doc
23691 Just import repository formats into repository.py, rather than using
special delegate
23690 Restore old InterWeave tests
23689 Restore use of deprecating delegator for old formats in
bzrlib.repository.
23688 Simplistic plugin that allows checking canonical form of every chk
inventory.
23687 Check both the id_to_entry and the parent_id_basename_to_file_id map.
23686 Get trivial case passing
23685 Get single-parent comparison working
23684 Get three-parent comparisions under test
23683 Start supporting serialization
23682 Add mpdiff command for diffing multiple files to the commandline
23681 Add mpknit command
23680 Support dirstate in mpknit
23679 get add_version working
23678 Much progress on non-naive text reconstruction
23677 Text reconstruction seems to work
23676 Implement reconstruct_version, handle all hunks through that
23675 Make benchmarks for mp
23674 Tree locking's always a good idea
23673 Merge
23672 Temporarily force snapshots to 44
23671 Make mpregen output a psuedo-knit
23670 More control over snapshotting, disable caching for inventory
23669 Dynamically select snapshots based on all parents
23668 Implement from_patch
23667 More tweakage
23666 Convert to a plugin
23665 finish converting ft_ to snapshots
23664 Fix restoration bug
23663 handle snapshots all at once
23662 Add some snapshot-selection crack
23661 More messy hacking
23660 Move topological iteration into an iterator
23659 Fix version writing
23658 Update snapshot-picking to use sets of ancestors
23657 Support using disk for knit reconstruction
23656 Split into MultiVersionedFile and MultiMemoryVersionedFile
23655 Allow selecting MemoryVersionedFile from commandline
23654 Allow specifying --outfile and --memory
23653 Enable caching commandline param
23652 Implement save, load, snapshot-by-size
23651 Add build ranking
23650 merge changes
23649 Add docstring
23648 [merge] bzr.dev 2276
Transaktion abgebrochen!
Zurückrollen abgeschlossen
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (release26-maint, Sep 28 2010, 17:13:01) [GCC 4.4.3]
** Mercurial Distributed SCM (version 1.7)
** Erweiterungen geladen: convert
Traceback (most recent call last):
  File "/usr/bin/hg-2.6", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 16,
in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 36,
in dispatch
    return _runcatch(u, args)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 58,
in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 590,
in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 401,
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 641,
in _runcommand
    return checkargs()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 595,
in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 588,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 427, in
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/__init__.py", line
254, in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
433, in convert
    c.convert(sortmode)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
359, in convert
    self.copy(c)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/convcmd.py", line
328, in copy
    source, self.map)
  File "/usr/lib64/python2.6/site-packages/hgext/convert/hg.py", line 171,
in putcommit
    self.repo.commitctx(ctx)
  File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line
1004, in commitctx
    changed)
  File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line
827, in _filecommit
    self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(crev)))
TypeError: b2a_hex() argument 1 must be string or read-only buffer, not None

----------
messages: 14310
nosy: ArneBab
priority: bug
status: need-eg
title: convert: crash on converting main bzr repo, trying to convert into old repo

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2479>
____________________________________________________


More information about the Mercurial-devel mailing list