[19:54] <jvelasquez> 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] <jvelasquez> is there an easy way to restore my /etc?
[19:54] <jvelasquez> or any way?
[20:04] <jvelasquez> I suppose it's on my server and I just need to check it out.  :|
[20:19] <jvelasquez> damn. there's nothing on the server.
[20:20] <jvelasquez> I wonder what this command did:   bzr switch --force bzr+ssh://j@jv.lan/srv/bzr-etc/trunk
[20:26] <mgz> jvelasquez: pastebin `bzr info -v /etc`?
[20:26] <mgz> you should still have the repo under there, but you've pretty seriously borked the branch
[20:30] <jvelasquez> says:  bzr: ERROR: Unrecognised value for BZR_SSH environment variable: ssh
[20:31] <jvelasquez> I think the data is gone.  /etc/.bzr doesn't have much of anything.
[20:32] <jvelasquez> I guess it's gone.  I'll start rebuilding from new.  :|
[20:35] <fullermd> I wouldn't expect it to really blast away the repo...
[20:36] <fullermd> Though I couldn't even guess what switch --force would do on an initially standalone branch.
[20:36] <fullermd> There might be micro black holes involved.
[20:37] <jvelasquez> well, what was I supposed to do?
[20:37] <jvelasquez> I hope, at least I can learn the right commands.
[20:37] <fullermd> Mmm, probably depends on a lot of details, but my first impulse would be something like push ; bind.
[20:38] <fullermd> How'd you populate the j@jv.lan/srv/bzr-etc/trunk branch before the command?
[20:39] <jvelasquez> opened a shell on that machine directly, and did,  bzr init-repo bzr-etc; cd bzr-etc; bzr init trunk
[20:39] <fullermd> '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] <fullermd> I would _presume_ that there's still a bunch of stuff in /etc/.bzr/repository though.
[20:40] <fullermd> (I mean, it'll probably be small, since /etc is all little tiny text files)
[20:40] <fullermd> So your WT would be screwed up, and so would the branch.  But theoretically, the repo is fine.
[20:41] <fullermd> So...
[20:41]  * fullermd contemplates.
[20:41] <jvelasquez> yes. lot's of stuff in /etc/.bzr/repository
[20:41] <fullermd> 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] <fullermd> Then...   hm.  OK, copy/untar the whole .bzr in /tmp/etc (or whatever scratch space)
[20:42] <fullermd> Manually blow away the checkout/ and branch/ dirs inside .bzr.
[20:43] <fullermd> Hm.  Probably can't just use 'init' blindly, but...
[20:44] <fullermd> '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] <fullermd> 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] <fullermd> 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] <fullermd> (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] <jvelasquez> etckeeper was also setup, for permissions
[20:46] <fullermd> That'd make that part easier.
[20:49] <mgz> fullermd: thanks for doing the brain-work
[20:50] <fullermd> Well, it was either that or do my _actual_ work, and that's boring and annoying   ;)
[20:55] <jvelasquez> yes. thank you.  I've been too busy following your steps, than to thank sooner.
[20:56] <fullermd> Well, don't thank me 'till it works   :)
[21:05] <jvelasquez> before `bzr reconfigure --use-shared`, /etc is 12MB. after is 9MB.   it asks me for my passwd to the other host, twice.
[21:07] <fullermd> 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] <fullermd> Maybe it did a repack or something.
[21:07] <jvelasquez> ahh!  "blowing away the branch/checkout dirs"!
[21:08] <jvelasquez> I'll repeat.
[21:09] <jvelasquez> your right. it doesn't ask any more.  but it also dumped it's repository.
[21:10] <jvelasquez> maybe I can return the repository without it noticing.
[21:17] <fullermd> Hm.
[21:18] <fullermd> 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] <fullermd> Wow, it completely blows it away.
[21:19] <jvelasquez> I think I got it!
[21:19] <jvelasquez> yep!
[21:19] <fullermd> Goodie, I was looking for an excuse to file some bugs to harass mgz...
[21:19] <jvelasquez> basically exactly what you said.
[21:20] <fullermd> 'k, I think the 'bit' is just a file.
[21:20] <fullermd> So touch .bzr/repository/shared-storage in place of the reconfigure step.
[21:20] <mgz> fullermd: :P
[21:21] <jvelasquez> I think I'm actually starting to learn some of this.
[21:21] <jvelasquez> fullermd,  thanks so much.  maybe after friday, I can send you $50
[21:22] <jvelasquez> least i could do. :|
[21:22] <fullermd> Oh, that's unnecessary.
[21:23] <fullermd> 'course, after mgz notices me reassigning all my bzr bugs over to brz, I may need the getaway money...
[21:23] <jvelasquez> and so is the effort to help.
[21:26] <fullermd> Eh, I consume support, I provide support...  it all evens out in the end.
[21:26] <fullermd> As long as nobody tallies my consumption too carefully, anyway.
[21:27]  * mgz chews on fulldermd
[21:27] <mgz> -d
[21:27] <mgz> too much of a mouthfull
[21:27] <fullermd> 4 out of 5 dentists advise against recreational fullermd chewing.
[21:30] <mgz> only because they haven't tried it yet...
[21:30] <jvelasquez> ok.  so now for a "push" and a "bind"
[21:36] <fullermd> '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] <fullermd> Effectively moving you from "local branch owns everything" to "remote branch owns everything, and i have a local checkout"
[21:37] <fullermd> (modulo my usual checkouts-vs-bound grumblings, anyway)
[23:16] <jvelasquez> has anyone ever seen a bunch of your files, all renamed with the postfix str ".~1~"
[23:22] <fullermd> 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] <jvelasquez> `bzr info` lists Related branches,  but the push branch is wrong.  I'd like to update it.
[23:27] <fullermd> push --remember
[23:28] <jvelasquez> :)
[23:28] <jvelasquez> to think i trashed the whole working copy and repo, just cause of that old push branch.
[23:41] <jvelasquez> 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] <jvelasquez> 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] <fullermd> I suspect you're probably mixing up what's where with working trees, etc.
[23:44] <fullermd> 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] <jvelasquez> WT = working tree?
[23:45]  * fullermd nods.
[23:46] <jvelasquez> ok.  so do I have it right?
[23:49] <jvelasquez> I want to version my files, and centralize their location.   they say "unversioned",  and this is ok!
[23:49] <fullermd> It depends on exactly what "they" are in this context.
[23:50] <fullermd> If "they" are the files in the location where you're doing stuff (i.e., somesystem:/etc), no.
[23:51] <fullermd> 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] <fullermd> (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] <jvelasquez> 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] <fullermd> 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] <jvelasquez> ahh.  so using term "trunk" is inappropriate here
[23:55] <fullermd> 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] <jvelasquez> 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] <fullermd> 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] <jvelasquez> 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] <fullermd> The terminology can trip things up a bit; technically you pushed the branch.
[23:59] <fullermd> 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.