Inventories get added with different parents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Subversion Plugin |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
affects bzr
status triaged
importance high
When adding the same inventory twice, Bazaar crashes:
bzr: ERROR: bzrlib.
<bzrlib.
inconsistent details in add_recor
ds: ('269 230 0 295', ((),)) ('269 230 0 295', ([],))
Traceback (most recent call last):
File "/home/
exception_
return the_callable(*args, **kwargs)
File "/home/
run_bzr
ret = run(*run_argv)
File "/home/
run_argv_aliases
return self.run(
File "/home/
in run
to_
File "/home/
convert_repository
RepositoryC
File "/home/
__init__
revfinder, mapping, heads)
File "/home/
_fetch_
inter.
File "/home/
fetch
use_
File "/home/
_fetch_revisions
parent_revmeta)
File "/home/
_fetch_
report_
File "/home/
convert
return unbound(*args, **kwargs)
File "/home/
report_
reporter.
File "/home/
self._close()
File "/home/
_close
self.
File "/home/
_finish_commit
tuple([r for r in rev.parent_ids if r in
self.target.
File
"/home/
704, in add_inventory_
basis_
File "/home/
add_inventory_
return (self.add_
File "/home/
add_inventory
return self._add_
File
"/home/
675, in _add_inventory_
inv_lines, check_content=
File "/home/
_inventory_
check_
File "/home/
in add_lines
nostore_
File "/home/
in _insert_
flush()
File "/home/
in flush
self.
File "/home/
in add_records
": %s %s" % ((value, node_refs), keys[key]))
KnitCorrupt: Knit <bzrlib.
0x36de5d0> corrupt: inconsistent details in add_records: ('269 230 0
295', ((),)) ('269 230 0 295', ([],))
bzr 1.17dev on python 2.5.4 (linux2)
arguments: ['/home/
'--incremental', 'https:/
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
builddeb /home/jelmer/
bzrtools /home/jelmer/
cia /home/jelmer/
colocated /home/jelmer/
[0.4.16dev]
cvsps_import
/usr/lib/
dbus /home/jelmer/
email
/usr/lib/
etckeeper
/usr/lib/
fastimport
/usr/lib/
git /home/jelmer/
gtk /home/jelmer/
hg /home/jelmer/
jelmer /home/jelmer/
launchpad
/home/jelmer/
loggerhead /home/jelmer/
loom /home/jelmer/
netrc_
/home/jelmer/
pqm /home/jelmer/
qbzr /home/jelmer/
rebase /home/jelmer/
search /home/jelmer/
stats
/usr/lib/
svn /home/jelmer/
upload /home/jelmer/
webdav /home/jelmer/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
Some layers in bazaar seem to return parents as a list and others
return them as a tuple. Which of the two is correct here?
affects: | bzr → bzr-svn |
Changed in bzr-svn: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> KnitCorrupt: Knit <bzrlib. groupcompress. _GCGraphIndex object at
> 0x36de5d0> corrupt: inconsistent details in add_records: ('269 230 0
> 295', ((),)) ('269 230 0 295', ([],))
>
Well, the second time you are adding it with an empty parent *list*
while it has an empty parent *tuple*.
It looks like we use "record.parents" to populate that field.
I don't know where that value is getting set.
We could do a safety trap against it with something like: groupcompress. py' groupcompress. py 2009-06-11 20:34:56 +0000 groupcompress. py 2009-06-17 14:17:23 +0000
"in parentless index.")
refs = ()
changed = True
present_ nodes = self._get_ entries( keys)
=== modified file 'bzrlib/
- --- bzrlib/
+++ bzrlib/
@@ -1610,7 +1610,7 @@
- - keys[key] = (value, refs)
+ keys[key] = (value, tuple(refs))
# check for dups
if not random_id:
However, I'd really like to understand
1) Why do you need to add the inventory twice
2) Why the 'parents' entry is a list sometimes and a tuple other times.
(It is always a tuple when reading from bzr indexes, so I'm assuming it
is set somewhere else.)
John enigmail. mozdev. org
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAko 4+zkACgkQJdeBCY SNAAOCrwCgvXuB5 t51G5eC3iKDhP+ 4Bezp Mosh1YBcsHdOxHf FzboBcrNZb
9a0AoI+
=RgIw
-----END PGP SIGNATURE-----