Service script to check the files in the repository
Alexander Belchenko
bialix at ukr.net
Mon Jun 25 10:14:13 UTC 2012
I need some service script to check the files in the repositories. I
want to avoid using `bzr check` because it's too heavy for me. I have a
lot of repositories on my trac server, and every week I make backup of
it. I use the following check: collect `bzr list-branches` data and
compare it with previous week data. If there is some branches missing
then check if they were deleted by members of our team and not by disk
crash or something.
I'd like to have some additional quick check just to be sure all files
in the repository are present. I.e. for every repository I want to check
that all names listed in pack-names are present in packs/ and indices/.
For packs/ I could check md5 as well, I think. For indices I guess I can
only check that files aren't zero-length, or maybe I need open it with
btree-dump just to see it has content that bzr can understand.
I don't need full `bzr check`, I need only the simple check as I
described above. In all these years I use this setup I only sometimes
had disk failures which results in converting long filenames of
indices/packs into 8.3 form, and sometimes losing some branch/
directories. The latter is easy enough to recover using backup. I wish
to extend my checks to cover the former case too.
Sometimes John posts snippets of code to work with repository
structures. I'm not sure where I've seen it last time. Can you help me
with the following part:
* open pack-names
* get the names of packs and indices
* simple check of indices content
Please?
More information about the bazaar
mailing list