[19:54] hi. I made /etc a repo, added everyting in /etc to it, commited, and then wanted to "relocate" (terminology from svn) the repo to a real server, so I did a 'switch --force', but now I have nothing in /etc. [19:54] is there an easy way to restore my /etc? [19:54] or any way? [20:04] I suppose it's on my server and I just need to check it out. :| [20:19] damn. there's nothing on the server. [20:20] I wonder what this command did: bzr switch --force bzr+ssh://j@jv.lan/srv/bzr-etc/trunk [20:26] jvelasquez: pastebin `bzr info -v /etc`? [20:26] you should still have the repo under there, but you've pretty seriously borked the branch [20:30] says: bzr: ERROR: Unrecognised value for BZR_SSH environment variable: ssh [20:31] I think the data is gone. /etc/.bzr doesn't have much of anything. [20:32] I guess it's gone. I'll start rebuilding from new. :| [20:35] I wouldn't expect it to really blast away the repo... [20:36] Though I couldn't even guess what switch --force would do on an initially standalone branch. [20:36] There might be micro black holes involved. [20:37] well, what was I supposed to do? [20:37] I hope, at least I can learn the right commands. [20:37] Mmm, probably depends on a lot of details, but my first impulse would be something like push ; bind. [20:38] How'd you populate the j@jv.lan/srv/bzr-etc/trunk branch before the command? [20:39] opened a shell on that machine directly, and did, bzr init-repo bzr-etc; cd bzr-etc; bzr init trunk [20:39] 'k. So you created an empty branch, then tried to switch your existing /etc over to it. So, winding up with an empty tree makes sense. [20:39] I would _presume_ that there's still a bunch of stuff in /etc/.bzr/repository though. [20:40] (I mean, it'll probably be small, since /etc is all little tiny text files) [20:40] So your WT would be screwed up, and so would the branch. But theoretically, the repo is fine. [20:41] So... [20:41] * fullermd contemplates. [20:41] yes. lot's of stuff in /etc/.bzr/repository [20:41] Well, first off, tar up /etc/.bzr just as a backup, so when I suggest something stupid you only get annoyed instead of hunting me down. [20:42] Then... hm. OK, copy/untar the whole .bzr in /tmp/etc (or whatever scratch space) [20:42] Manually blow away the checkout/ and branch/ dirs inside .bzr. [20:43] Hm. Probably can't just use 'init' blindly, but... [20:44] 'bzr reconfigure --use-shared' should make the repo think of itself as shared, then you can 'bzr init xyz' to create a /tmp/etc/xyz empty branch. [20:44] Then from in there, you can use 'bzr heads --dead' (from bzrtools, I think) to fish out the old head revision id from the repo, and then use 'bzr pull --force -rXYZ .' to pull it out. [20:45] And check it over. If that works, you can just do a pull from that into your switch-ified /etc to blat the info up into the new repo and restore the WT. [20:45] (won't restore permissions though, so you'll have to do that manually, or master.passwd or shadow or whatever will be world readable, etc) [20:46] etckeeper was also setup, for permissions [20:46] That'd make that part easier. [20:49] fullermd: thanks for doing the brain-work [20:50] Well, it was either that or do my _actual_ work, and that's boring and annoying ;) [20:55] yes. thank you. I've been too busy following your steps, than to thank sooner. [20:56] Well, don't thank me 'till it works :) [21:05] before `bzr reconfigure --use-shared`, /etc is 12MB. after is 9MB. it asks me for my passwd to the other host, twice. [21:07] Mmm. I was saying to do that off in a temp copy, after blowing away the branch/checkout dirs; it shouldn't be trying to contact anything else then, just flipping the bit in the repo. [21:07] Maybe it did a repack or something. [21:07] ahh! "blowing away the branch/checkout dirs"! [21:08] I'll repeat. [21:09] your right. it doesn't ask any more. but it also dumped it's repository. [21:10] maybe I can return the repository without it noticing. [21:17] Hm. [21:18] I thought reconfig would alter the repo. I mean, it tries doing stuff with the branch too, but I thought on a bare repo... [21:19] Wow, it completely blows it away. [21:19] I think I got it! [21:19] yep! [21:19] Goodie, I was looking for an excuse to file some bugs to harass mgz... [21:19] basically exactly what you said. [21:20] 'k, I think the 'bit' is just a file. [21:20] So touch .bzr/repository/shared-storage in place of the reconfigure step. [21:20] fullermd: :P [21:21] I think I'm actually starting to learn some of this. [21:21] fullermd, thanks so much. maybe after friday, I can send you $50 [21:22] least i could do. :| [21:22] Oh, that's unnecessary. [21:23] 'course, after mgz notices me reassigning all my bzr bugs over to brz, I may need the getaway money... [21:23] and so is the effort to help. [21:26] Eh, I consume support, I provide support... it all evens out in the end. [21:26] As long as nobody tallies my consumption too carefully, anyway. [21:27] * mgz chews on fulldermd [21:27] -d [21:27] too much of a mouthfull [21:27] 4 out of 5 dentists advise against recreational fullermd chewing. [21:30] only because they haven't tried it yet... [21:30] ok. so now for a "push" and a "bind" [21:36] 'push' will take what you've got in that local branch and make a copy of it in the remote location, and then 'bind' ties your local branch to that remote so commits automatically go upstream. [21:36] Effectively moving you from "local branch owns everything" to "remote branch owns everything, and i have a local checkout" [21:37] (modulo my usual checkouts-vs-bound grumblings, anyway) [23:16] has anyone ever seen a bunch of your files, all renamed with the postfix str ".~1~" [23:22] That's where things get renamed when bzr needs to move them out of the way. e.g., 'revert'd changes, pre-existing unknown files when you merge/pull in new files with conflicting names, etc. [23:26] `bzr info` lists Related branches, but the push branch is wrong. I'd like to update it. [23:27] push --remember [23:28] :) [23:28] to think i trashed the whole working copy and repo, just cause of that old push branch. [23:41] So, I did a push to a remove location, inside of a repo, inside a shared repo, but yet when I open a shell local to the repo, it says the content I added is "Unversioned" [23:42] I guess it's versioned here, locally, and it's been pushed to a remote location, and that remote location is inside a repo, but the files were not actually added to the repo. [23:43] I suspect you're probably mixing up what's where with working trees, etc. [23:44] Particularly, pushing to a remote repo won't touch anything in its WT. And as a central repo location, there's no reason for it to _have_ a WT in the first place. [23:45] WT = working tree? [23:45] * fullermd nods. [23:46] ok. so do I have it right? [23:49] I want to version my files, and centralize their location. they say "unversioned", and this is ok! [23:49] It depends on exactly what "they" are in this context. [23:50] If "they" are the files in the location where you're doing stuff (i.e., somesystem:/etc), no. [23:51] If "they" are files sitting aroud in the filesystem where your central repo is (i.e., jv.lan:/src/bzr/etc/trunk), who knows; that has no necessary relation at all to what's in the _bzr repo_. [23:51] (which is why I say, generally don't even have WT's in central repo places; looking at them will only ever confuse things) [23:52] I guess they are not being edited. They're being centralized, so that I can check them out from other hosts, where they will be Hot or Live [23:53] The simplest way to be sure of what's actually in that centralized branch is probably just to make a scratch checkout in /tmp or somewhere, and make sure you get what you expect. [23:53] ahh. so using term "trunk" is inappropriate here [23:55] It's a social term, not a technical one; it's a matter of how you use and arrange your pieces. The pieces themselves just sorta float around independently. [23:55] but I believe that's what I want. cause I'm collecting a few repos which are "current effort" aka trunk, but later I will collect other similar sets of repos, which are different branches from it. [23:56] Sorta like "central repository" (which probably more strictly means "central branch" in this case); there's nothing technical intra-bzr you do to make it Central, what makes it Central is just how you use it. [23:57] ok. but the versioning was originally done on my machine, and then I just pushed the whole repo to a fileserver for later. [23:58] The terminology can trip things up a bit; technically you pushed the branch. [23:59] You pretty much never interact with a _repository_, only with a branch. The distinction in speech often doesn't matter, but sometimes it can cause confusion when discussing details.