[13:32] Hi 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 directory [13:32] Google doesn't seem to find any references to this :( [13:32] Is the file there? [13:33] fullermd: nope [13:33] What all IS under repository/ ? [13:34] fullermd: repository doesn't even exist only branch/ branch-format branch-lock/ checkout/ README [13:34] You'll have to look in the .bzr dir for the repository. [13:34] fullermd: Also, this has been working before upgrading to 13.04 [13:35] bzr version shouldn't matter; none of that stuff has changed in ages. [13:35] fullermd: Yep, that's what I got in .bzr [13:35] Right, but not the .bzr for the repository; that's just the tree. What's 'bzr info' say? [13:36] beniwtv: Same error msg, I suspect something is broken, so maybe I should just check out everything again? [13:36] If 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] Try walking up the FS manually to find the repo. [13:38] fullermd: Yeah, I tried that, but no repository directory is there [13:38] fullermd: Looks like it got wiped out or something... [13:39] I wonder if we're talking past each other. [13:39] I'm not saying "find the repository" as in ".bzr/repository/", but as in "find the shared repository this branch is using" [13:39] Unless you're doing a --light checkout from somewhere remote, but... [13:40] fullermd: Ah! Sorry, my mistake. [13:40] So /some/path/xyz/.bzr/ may not have a repository/ in it, but maybe /some/path/.bzr/ or /some/.bzr/ does. [13:40] fullermd: You're right, it does [13:40] Or /.bzr/, assuming you're insane :) [13:41] fullermd: Ok, so it's got packs/, but no file pack-names [13:42] fullermd: No wait, it's got one renamed to .tmp [13:42] fullermd: pack-names.3699.*.tmp [13:43] OK, 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] e.g., it writes foo.tmp, then removes foo, then moves foo.tmp in place, to make sure things are atomicish. [13:44] Which means that file MAY only be partly written. Blech. [13:44] But, if the main file has gotten as far as being removed, maybe we can assume it's complete. [13:44] And in any case, it's all you got. [13:44] So all that's just a long-winded way of saying "Try moving it in place". [13:44] fullermd: Well, I cold try renaming it [13:44] fullermd: Yep [13:45] A poke at 'log' or the like afterward will probably serve as a quick smoke test. [13:45] If that works, it's probably worth doing a full 'check' just to be sure. [13:46] fullermd: Nope, another error, and it's got a lot more to commit (bzr status) that I changed, so... [13:46] Well, that file IS just a listing of files and stuff from the packs dir. So it should be possible to recreate manually. [13:47] It's not plaintext though, but some binarish internal format. So... [13:47] fullermd: Ok, so it's propably easier to just check it out again and replace the changed ifles manually... [13:49] A little grep'ery suggests that there IS a method that seems to generate them itself, which may be easy to call... [13:49] But it may require have a repo object to get to calling it, which is a nice stupid chicken-and-egg position. [13:51] fullermd: ok, no worries, I'll just check it out again... [13:51] fullermd: thanks anyway tough :) [15:59] The binary format can be inspected via '$ bzr dump-btree .bzr/repository/pack-names [16:00] Though I forget exactly what the series of numbers stored for each pack are [16:00] Unfortunately, that doesn't help with the lack of restore-btree :) [16:02] If you can somehow recover the data, you can write out a new one with bzrlib.btree_index.BTreeBuilder [16:03] It's 11 in the morning. The sun is up. You shouldn't be able to give me nightmares... [16:10] Well, 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 pack [16:10] Though I'm a little unclear why that info is stored separately [16:12] Which means in theory it ought to be trivial to rewrite a pack-names for any repository that is otherwise uncorrupted === thumper is now known as vorpalbunny