Problem with repository

Scott Aubrey scottaubrey at capuk.org
Mon Apr 19 19:32:30 BST 2010


Hi John

Thanks for these. I found the .pack and .*ix files in obsolete_packs. copied them back to packs and indices respectively and did bzr check, bzr reconcile, all worked fine AFAIK.

I took a copy of the repository before starting everything I did, is there anything I can do to help figure out what was going on? obviously, I didn't move the pack and index files there, so bazaar must have done something wrong, no?

- Scott

On 19 Apr 2010, at 16:43, John Arbash Meinel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Scott Aubrey wrote:
>> HI Guys
>> 
>> I've just come across this problem and I'm crapping myself a little in
>> anticipation of this being unfixable, but just today I've started
>> getting a missing index file error on ANY commands I run on a remote
>> repository.
>> 
>> examples (these are running on the remote machine):
>> 
>>> bzr branch /repo/grace ~/test
> 
> So I can certainly give you some stuff you can run to prune the missing
> pack file out of the repo so that it doesn't try to access it. But I'd
> first really recommend trying to do some analysis to figure out how it
> could have gone missing.
> 
> Search around to see if you can find any files that look similar,
> something like:
> 
>  find /repo -name '019ea2*'
> 
> Also, it probably be informative to do something like:
> 
>  bzr dump-btree --raw .bzr/repository/pack-names
> 
> 
> You will want to compare the hashes in that file to the contents of
> .bzr/repository/packs and .bzr/repository/indices
> 
> There should be a *.pack for every hash in packs/, and a *.[ricts]ix (5
> indexes) in indices/
> 
> Also, you should be able to run 'md5sum -c packs/*' and the names of
> each pack file should match the computed hash value.
> 
> 
> In the end, if we can't get it sorted out, then you'll do something like
> this in a python script (or from the interpreter):
> 
> 
> from bzrlib import repository, btree_index, transport
> 
> t = transport.get_transport('/repo/.bzr/repository')
> pn_index = btree_index.BTreeGraphIndex(t, 'pack-names', None)
> nodes = pn_index.iter_all_entries()
> 
> new_index = btree_index.BTreeBuilder(0, 1)
> 
> for _, key, value in nodes:
>  if key == ('019ea24b5664a247498a7510ba0548c2',):
>    continue
>  new_index.add_node(key, value)
> 
> new_index_content = new_index.finish()
> t.put_file('pack-names', new_index_content)
> 
> John
> =:->
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkvMeggACgkQJdeBCYSNAAOreACePKA0XnPwcaAjXvLCEP2sFCOJ
> 0dwAn3LVRQLyq5Aqlub/RKJIxou3x45M
> =xLo0
> -----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20100419/31b32e76/attachment.htm 


More information about the bazaar mailing list