/srv/irclogs.ubuntu.com/2013/06/23/#bzr.txt

beniwtvHi all... I've upgraded to Ubuntu 13.04, now bzr 2.6.0dev3, and on all commands (from a previous working repo) I get: bzr: ERROR: No such file: u'.bzr/repository/pack-names': [Errno 2] No such file or directory13:32
beniwtvGoogle doesn't seem to find any references to this :(13:32
fullermdIs the file there?13:32
beniwtvfullermd: nope13:33
fullermdWhat all IS under repository/ ?13:33
beniwtvfullermd: repository doesn't even exist only branch/ branch-format branch-lock/ checkout/ README13:34
fullermdYou'll have to look in the .bzr dir for the repository.13:34
beniwtvfullermd: Also, this has been working before upgrading to 13.0413:34
fullermdbzr version shouldn't matter; none of that stuff has changed in ages.13:35
beniwtvfullermd: Yep, that's what I got in .bzr13:35
fullermdRight, but not the .bzr for the repository; that's just the tree.  What's 'bzr info' say?13:35
beniwtvbeniwtv: Same error msg, I suspect something is broken, so maybe I should just check out everything again?13:36
fullermdIf you don't have any local stuff to lose, that's simpler.  Still would be nice to get some idea of what happened though...13:36
fullermdTry walking up the FS manually to find the repo.13:36
beniwtvfullermd: Yeah, I tried that, but no repository directory is there13:38
beniwtvfullermd: Looks like it got wiped out or something...13:38
fullermdI wonder if we're talking past each other.13:39
fullermdI'm not saying "find the repository" as in ".bzr/repository/", but as in "find the shared repository this branch is using"13:39
fullermdUnless you're doing a --light checkout from somewhere remote, but...13:39
beniwtvfullermd: Ah! Sorry, my mistake.13:40
fullermdSo /some/path/xyz/.bzr/ may not have a repository/ in it, but maybe /some/path/.bzr/ or /some/.bzr/ does.13:40
beniwtvfullermd: You're right, it does13:40
fullermdOr /.bzr/, assuming you're insane   :)13:40
beniwtvfullermd: Ok, so it's got packs/, but no file pack-names13:41
beniwtvfullermd: No wait, it's got one renamed to .tmp13:42
beniwtvfullermd: pack-names.3699.*.tmp13:42
fullermdOK, that implies (I think) that it was writing a new one and got interrupted partway through.  Badly timed system shutdown or crash or ^C or the like.13:43
fullermde.g., it writes foo.tmp, then removes foo, then moves foo.tmp in place, to make sure things are atomicish.13:43
fullermdWhich means that file MAY only be partly written.  Blech.13:44
fullermdBut, if the main file has gotten as far as being removed, maybe we can assume it's complete.13:44
fullermdAnd in any case, it's all you got.13:44
fullermdSo all that's just a long-winded way of saying "Try moving it in place".13:44
beniwtvfullermd: Well, I cold try renaming it13:44
beniwtvfullermd: Yep13:44
fullermdA poke at 'log' or the like afterward will probably serve as a quick smoke test.13:45
fullermdIf that works, it's probably worth doing a full 'check' just to be sure.13:45
beniwtvfullermd: Nope, another error, and it's got a lot more to commit (bzr status) that I changed, so...13:46
fullermdWell, that file IS just a listing of files and stuff from the packs dir.  So it should be possible to recreate manually.13:46
fullermdIt's not plaintext though, but some binarish internal format.  So...13:47
beniwtvfullermd: Ok, so it's propably easier to just check it out again and replace the changed ifles manually...13:47
fullermdA little grep'ery suggests that there IS a method that seems to generate them itself, which may be easy to call...13:49
fullermdBut it may require have a repo object to get to calling it, which is a nice stupid chicken-and-egg position.13:49
beniwtvfullermd: ok, no worries, I'll just check it out again...13:51
beniwtvfullermd: thanks anyway tough :)13:51
maxbThe binary format can be inspected via '$ bzr dump-btree .bzr/repository/pack-names15:59
maxbThough I forget exactly what the series of numbers stored for each pack are16:00
fullermdUnfortunately, that doesn't help with the lack of restore-btree   :)16:00
maxbIf you can somehow recover the data, you can write out a new one with bzrlib.btree_index.BTreeBuilder16:02
fullermdIt's 11 in the morning.  The sun is up.  You shouldn't be able to give me nightmares...16:03
maxbWell, it seems the extra data stored in the pack-names file is the size in bytes of each of the related index files for that pack16:10
maxbThough I'm a little unclear why that info is stored separately16:10
maxbWhich means in theory it ought to be trivial to rewrite a pack-names for any repository that is otherwise uncorrupted16:12
=== thumper is now known as vorpalbunny

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!