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