/srv/irclogs.ubuntu.com/2017/06/28/#bzr.txt

jvelasquezhi. 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
jvelasquezis there an easy way to restore my /etc?19:54
jvelasquezor any way?19:54
jvelasquezI suppose it's on my server and I just need to check it out.  :|20:04
jvelasquezdamn. there's nothing on the server.20:19
jvelasquezI wonder what this command did:   bzr switch --force bzr+ssh://j@jv.lan/srv/bzr-etc/trunk20:20
mgzjvelasquez: pastebin `bzr info -v /etc`?20:26
mgzyou should still have the repo under there, but you've pretty seriously borked the branch20:26
jvelasquezsays:  bzr: ERROR: Unrecognised value for BZR_SSH environment variable: ssh20:30
jvelasquezI think the data is gone.  /etc/.bzr doesn't have much of anything.20:31
jvelasquezI guess it's gone.  I'll start rebuilding from new.  :|20:32
fullermdI wouldn't expect it to really blast away the repo...20:35
fullermdThough I couldn't even guess what switch --force would do on an initially standalone branch.20:36
fullermdThere might be micro black holes involved.20:36
jvelasquezwell, what was I supposed to do?20:37
jvelasquezI hope, at least I can learn the right commands.20:37
fullermdMmm, probably depends on a lot of details, but my first impulse would be something like push ; bind.20:37
fullermdHow'd you populate the j@jv.lan/srv/bzr-etc/trunk branch before the command?20:38
jvelasquezopened a shell on that machine directly, and did,  bzr init-repo bzr-etc; cd bzr-etc; bzr init trunk20: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
fullermdI would _presume_ that there's still a bunch of stuff in /etc/.bzr/repository though.20:39
fullermd(I mean, it'll probably be small, since /etc is all little tiny text files)20:40
fullermdSo your WT would be screwed up, and so would the branch.  But theoretically, the repo is fine.20:40
fullermdSo...20:41
* fullermd contemplates.20:41
jvelasquezyes. lot's of stuff in /etc/.bzr/repository20:41
fullermdWell, 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:41
fullermdThen...   hm.  OK, copy/untar the whole .bzr in /tmp/etc (or whatever scratch space)20:42
fullermdManually blow away the checkout/ and branch/ dirs inside .bzr.20:42
fullermdHm.  Probably can't just use 'init' blindly, but...20:43
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
fullermdThen 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:44
fullermdAnd 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:45
jvelasquezetckeeper was also setup, for permissions20:46
fullermdThat'd make that part easier.20:46
mgzfullermd: thanks for doing the brain-work20:49
fullermdWell, it was either that or do my _actual_ work, and that's boring and annoying   ;)20:50
jvelasquezyes. thank you.  I've been too busy following your steps, than to thank sooner.20:55
fullermdWell, don't thank me 'till it works   :)20:56
jvelasquezbefore `bzr reconfigure --use-shared`, /etc is 12MB. after is 9MB.   it asks me for my passwd to the other host, twice.21:05
fullermdMmm.  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
fullermdMaybe it did a repack or something.21:07
jvelasquezahh!  "blowing away the branch/checkout dirs"!21:07
jvelasquezI'll repeat.21:08
jvelasquezyour right. it doesn't ask any more.  but it also dumped it's repository.21:09
jvelasquezmaybe I can return the repository without it noticing.21:10
fullermdHm.21:17
fullermdI thought reconfig would alter the repo.  I mean, it tries doing stuff with the branch too, but I thought on a bare repo...21:18
fullermdWow, it completely blows it away.21:19
jvelasquezI think I got it!21:19
jvelasquezyep!21:19
fullermdGoodie, I was looking for an excuse to file some bugs to harass mgz...21:19
jvelasquezbasically exactly what you said.21:19
fullermd'k, I think the 'bit' is just a file.21:20
fullermdSo touch .bzr/repository/shared-storage in place of the reconfigure step.21:20
mgzfullermd: :P21:20
jvelasquezI think I'm actually starting to learn some of this.21:21
jvelasquezfullermd,  thanks so much.  maybe after friday, I can send you $5021:21
jvelasquezleast i could do. :|21:22
fullermdOh, that's unnecessary.21:22
fullermd'course, after mgz notices me reassigning all my bzr bugs over to brz, I may need the getaway money...21:23
jvelasquezand so is the effort to help.21:23
fullermdEh, I consume support, I provide support...  it all evens out in the end.21:26
fullermdAs long as nobody tallies my consumption too carefully, anyway.21:26
* mgz chews on fulldermd21:27
mgz-d21:27
mgztoo much of a mouthfull21:27
fullermd4 out of 5 dentists advise against recreational fullermd chewing.21:27
mgzonly because they haven't tried it yet...21:30
jvelasquezok.  so now for a "push" and a "bind"21:30
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
fullermdEffectively moving you from "local branch owns everything" to "remote branch owns everything, and i have a local checkout"21:36
fullermd(modulo my usual checkouts-vs-bound grumblings, anyway)21:37
jvelasquezhas anyone ever seen a bunch of your files, all renamed with the postfix str ".~1~"23:16
fullermdThat'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:22
jvelasquez`bzr info` lists Related branches,  but the push branch is wrong.  I'd like to update it.23:26
fullermdpush --remember23:27
jvelasquez:)23:28
jvelasquezto think i trashed the whole working copy and repo, just cause of that old push branch.23:28
jvelasquezSo,  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:41
jvelasquezI 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:42
fullermdI suspect you're probably mixing up what's where with working trees, etc.23:43
fullermdParticularly, 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:44
jvelasquezWT = working tree?23:45
* fullermd nods.23:45
jvelasquezok.  so do I have it right?23:46
jvelasquezI want to version my files, and centralize their location.   they say "unversioned",  and this is ok!23:49
fullermdIt depends on exactly what "they" are in this context.23:49
fullermdIf "they" are the files in the location where you're doing stuff (i.e., somesystem:/etc), no.23:50
fullermdIf "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:51
jvelasquezI 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 Live23:52
fullermdThe 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
jvelasquezahh.  so using term "trunk" is inappropriate here23:53
fullermdIt'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
jvelasquezbut 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:55
fullermdSorta 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:56
jvelasquezok.  but the versioning was originally done on my machine, and then I just pushed the whole repo to a fileserver for later.23:57
fullermdThe terminology can trip things up a bit; technically you pushed the branch.23:58
fullermdYou 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.23:59

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