pack error with --2a

Bug #393058 reported by Parth Malwankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

Doing "bzr pack" twice with --2a format causes pack to always fail.
I am using bzr-1.16 ppa on ubuntu 9.04. Not sure if it matters but duwich
is installed locally.

[bzrtest]% bzr init --2a foo
Created a standalone tree (format: 2a)
[bzrtest]% cd foo
[foo]% echo hello > hello
[foo]% bzr add hello
adding hello
[foo]% bzr ci -m "initial"
Committing to: /home/parthm/tmp/bzrtest/foo/
added hello
Committed revision 1.
[foo]% bzr pack
[foo]% bzr pack
bzr: ERROR: Pack '9c2ea49a1740c6762e1705f856ca256c' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x915160c>
[foo]% bzr log
    1 <email address hidden> 2009-06-28
      initial

[foo]% bzr pack
bzr: ERROR: Pack '9c2ea49a1740c6762e1705f856ca256c' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x8ae760c>

[foo]% bzr version
Bazaar (bzr) 1.16
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/parthm/.bazaar
  Bazaar log file: /home/parthm/.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

[foo]%

Below is the bzr.log:

Sun 2009-06-28 08:50:33 +0530
0.055 bzr arguments: [u'init', u'--2a', u'foo']
0.094 looking for plugins in /home/parthm/.bazaar/plugins
0.232 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.324 encoding stdout as sys.stdout encoding 'UTF-8'
0.340 creating repository in file:///home/parthm/tmp/bzrtest/foo/.bzr/.
0.346 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x9dd27ac> in file:///home/parthm/tmp/bzrtest/foo/.bzr/
0.367 trying to create missing lock '/home/parthm/tmp/bzrtest/foo/.bzr/checkout/dirstate'
0.367 opening working tree '/home/parthm/tmp/bzrtest/foo'
0.387 opening working tree '/home/parthm/tmp/bzrtest/foo'
0.422 return code 0

Sun 2009-06-28 08:50:45 +0530
0.028 bzr arguments: [u'add', u'hello']
0.046 looking for plugins in /home/parthm/.bazaar/plugins
0.137 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.192 encoding stdout as sys.stdout encoding 'UTF-8'
0.242 opening working tree '/home/parthm/tmp/bzrtest/foo'
0.253 return code 0

Sun 2009-06-28 08:50:50 +0530
0.038 bzr arguments: [u'ci', u'-m', u'initial']
0.057 looking for plugins in /home/parthm/.bazaar/plugins
0.148 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.204 encoding stdout as sys.stdout encoding 'UTF-8'
0.257 opening working tree '/home/parthm/tmp/bzrtest/foo'
0.276 preparing to commit
[ 6789] 2009-06-28 08:50:50.976 INFO: Committing to: /home/parthm/tmp/bzrtest/foo/
0.293 Selecting files for commit with filter []
[ 6789] 2009-06-28 08:50:50.981 INFO: added hello
[ 6789] 2009-06-28 08:50:51.069 INFO: Committed revision 1.
0.396 return code 0

Sun 2009-06-28 08:50:53 +0530
0.029 bzr arguments: [u'pack']
0.047 looking for plugins in /home/parthm/.bazaar/plugins
0.138 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.193 encoding stdout as sys.stdout encoding 'UTF-8'
0.243 Packing repository <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0xa39260c>, which has 1 pack files, containing 1 revisions into 1 packs.
0.244 repacking 1 revisions
0.247 repacking 1 inventories
0.249 repacking chk: 1 id_to_entry roots, 1 p_id_map roots, 2 total keys
0.252 repacking 2 text
0.255 repacking 0 signatures
0.267 return code 0

Sun 2009-06-28 08:50:56 +0530
0.053 bzr arguments: [u'pack']
0.092 looking for plugins in /home/parthm/.bazaar/plugins
0.221 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.276 encoding stdout as sys.stdout encoding 'UTF-8'
0.325 Packing repository <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x915160c>, which has 1 pack files, containing 1 revisions into 1 packs.
0.326 repacking 1 revisions
0.329 repacking 1 inventories
0.331 repacking chk: 1 id_to_entry roots, 1 p_id_map roots, 2 total keys
0.334 repacking 2 text
0.336 repacking 0 signatures
0.349 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4130, in run
    repository.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 2351, in pack
    self._pack_collection.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 1579, in pack
    self._execute_pack_operations(pack_operations, OptimisingPacker)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 583, in _execute_pack_operations
    packer.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 753, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 466, in _create_pack_from_packs
    self._pack_collection.allocate(self.new_pack)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 1721, in allocate
    'Pack %r already exists in %s' % (a_new_pack.name, self))
BzrError: Pack '9c2ea49a1740c6762e1705f856ca256c' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x915160c>

0.349 return code 3

Sun 2009-06-28 08:50:58 +0530
0.053 bzr arguments: [u'log']
0.091 looking for plugins in /home/parthm/.bazaar/plugins
0.198 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.255 encoding stdout as sys.stdout encoding 'UTF-8'
0.358 return code 0

Sun 2009-06-28 08:51:01 +0530
0.048 bzr arguments: [u'pack']
0.068 looking for plugins in /home/parthm/.bazaar/plugins
0.158 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.213 encoding stdout as sys.stdout encoding 'UTF-8'
0.262 Packing repository <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x8ae760c>, which has 1 pack files, containing 1 revisions into 1 packs.
0.263 repacking 1 revisions
0.266 repacking 1 inventories
0.268 repacking chk: 1 id_to_entry roots, 1 p_id_map roots, 2 total keys
0.271 repacking 2 text
0.273 repacking 0 signatures
0.286 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4130, in run
    repository.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 2351, in pack
    self._pack_collection.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 1579, in pack
    self._execute_pack_operations(pack_operations, OptimisingPacker)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 583, in _execute_pack_operations
    packer.pack()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 753, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 466, in _create_pack_from_packs
    self._pack_collection.allocate(self.new_pack)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 1721, in allocate
    'Pack %r already exists in %s' % (a_new_pack.name, self))
BzrError: Pack '9c2ea49a1740c6762e1705f856ca256c' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x8ae760c>

0.287 return code 3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.