[12:29] <CcxCZ> when bzr mv --auto screws up, how do I undo it's guesses?
[12:31] <mgz> CcxCZ: you can just bzr mv things back
[12:32] <CcxCZ> $ bzr mv --after doc/index.rst.old doc/spec.rst
[12:32] <mgz> or, if you can recreate the same tree state, revert and try again
[12:32] <CcxCZ> bzr: ERROR: Could not rename index.rst.old => spec.rst: doc/doc/index.rst.old is not versioned.
[12:32] <CcxCZ> bleh
[12:33] <mgz> the .old bits aren't versioned, if you want that copy, just mv it back over the copy you don't want
[12:38] <CcxCZ> the files are all right. only bzr metadata is messed up
[12:41] <CcxCZ> I do want to keep the files exactly as I have them. they have been moved around in a fashion bzr can't guess. I want it to forget about all moves and let me bzr mv --after the files to tell it how it really is
[12:42] <CcxCZ> ie. allow me to modify the id=>filename internal map
[12:43] <CcxCZ> have I made myself clear enough? do you understand my issue?
[12:44] <mgz> sure, but I don't see why you were mving a .old file then
[12:44] <mgz> you just move all the moved versioned files
[12:45] <mgz> `bzr st` tells you what's been moved where, you can `bzr mv --after` everything so no moved have occured (or to how you want it)
[12:46] <CcxCZ> what happened with files was: index.rst -> index.rst.old; spec.rst -> index.rst  what bzr mv --auto guessed was: doc/spec.rst => doc/index.rst.old
[12:47] <mgz> and what does `bzr st` report for those currently?
[12:47] <CcxCZ> note that it's ancient bzr version on this box, might be a bug. but I seem not to be able to move it back
[12:47] <CcxCZ> renamed:
[12:47] <CcxCZ>   doc/spec.rst => doc/index.rst.old
[12:48] <mgz> okay, well the easiest thing if that's not playing ball
[12:48] <mgz> is copy the changed files, `bzr revert`, copy them back, and do your `bzr mv --after` changes
[12:49] <CcxCZ> well I guess I can rsync --exclude=/.bzr it elsewhere, just thought there has to be a better way
[12:50] <mgz> the mv is the better way, if it's failing you need the less handy way
[12:52] <CcxCZ> backed up, reverted, restored, manually mv --after'd
[12:52] <CcxCZ> I guess I'll blame not being able to bzr mv stuff on old bzr version
[20:39] <Derailed> hey everyone -- I know next to nothing about bzr. but I'm tasked with fixing a shell script that's doing some bzr stuff and is misbehaving. I wonder if someone can help me debug it?
[20:40] <CcxCZ> we can try :)
[20:57] <Derailed> sorry -- had to run away for a minute. just a sec, lemme find a pastebin
[20:58] <Derailed> here's the snippet: http://pastebin.com/UHJVrJJH
[20:59] <Derailed> the logic is trying to be dumb simple: "I want a certain branch of my project in the directory 'launchpad', if it's not there, get it, if it is there, update it.
[20:59] <Derailed> the '$1' is a version number like 1.4, 1.5 etc
[21:00] <Derailed> the first part -- the 'checkout' doesn't actually seem to populate the 'working directory' (I only know git jargon sorry) and I have no idea why
[21:00] <Derailed> it's ubuntu 12.04, so bzr 2.5
[21:00] <Derailed> this is obviously very much a newbie question, but any help would be deeply appreciated
[21:01] <thumper> o/ Derailed
[21:01] <Derailed> hi thumper :-)
[21:01] <thumper> Derailed: I missed the start of the problem, whazzup?
[21:01] <Derailed> I will repost:
 sorry -- had to run away for a minute. just a sec, lemme find a pastebin
 here's the snippet: http://pastebin.com/UHJVrJJH
 the logic is trying to be dumb simple: "I want a certain branch of my project in the directory 'launchpad', if it's not there, get it, if it is there, update it.
 the '$1' is a version number like 1.4, 1.5 etc
[21:03] <Derailed> very sorry -- I have to run away for 10 minutes, I will be back!
[21:03] <thumper> kk
[21:04] <thumper> Derailed: I'd change the logic slightly...
[21:04] <thumper> Derailed: initially use "branch" instead of "checkout", as this will get you the current copy from LP
[21:04] <thumper> Derailed: second bit should be "bzr pull", not switch
[21:04] <thumper> this will just bring the latest from launchpad into your local repo
[21:23] <CcxCZ> Derailed: is this posix sh? if not [[ might be more appropriate than [ and also quote properly any parameter expansion (such as $1) unless you target only zsh with parameter wordsplitting turned off
[21:35] <Derailed> hiya, sorryh about running away -- I'm back now
[21:36] <Derailed> thumper, so 'branch' will create the directory and populate it with the branch I ask for -- will 'pull' switch branches for me? the script is run in a for-loop, it does 1.4 then 1.5 then 1.6 etc, switching branches every time
[21:37] <thumper> no, pull doesn't switch
[21:38] <thumper> what does bzr info -v show in your repo?
[21:40] <Derailed> thumper, http://pastebin.com/8StJRYkg
[21:41] <thumper> Derailed: ok, what you have there is a checkout of a remote branch
[21:41] <thumper> something that is very inefficient to deal with
[21:41] <Derailed> that's the "checkout of branch" thing?
[21:43] <thumper> yes
[21:43] <thumper> the benefit is that when you commit locally, you are also committing remotely
[21:44] <thumper> the slow part is that when you commit locally, you are committing remotely
[21:44] <Derailed> this is an automated script that pulls the translation files for the branch, and builds docs with them. it never commits.
[21:45] <thumper> ok
[21:45] <thumper> in which case that should be ok
[21:45] <thumper> switch will not pull in new changes
[21:45] <thumper> you need to switch, then 'bzr update'
[21:45] <Derailed> okay so the first one should be 'branch', and the second one should be 'switch' and then 'update'?
[21:46] <thumper> Derailed: hang on
[21:46] <thumper> you have multiple sources, but just one target
[21:46] <thumper> multiple lp branches, but just one local launchpad directory
[21:46] <thumper> is that what you want?
[21:46] <Derailed> yes
[21:48]  * thumper thinks
[21:49] <Derailed> thumper, the whole script for context: http://pastebin.com/1bx1abtt
[21:49] <Derailed> I've no doubt it was written by someone who expected git-like behaviour
[21:50] <Derailed> and never tested the first part of that if statement, because the repository was already there
[21:51] <thumper> I have a cunning plan
[21:51] <thumper> to make it simpler :)
[21:52] <thumper> although it messes things up a bit
[21:52] <Derailed> sure. this is all a distraction from what I was SUPPOSED to be doing -- which was just making sure the mahara manual built correctly with the new version of sphinx. I just noticed this part was broken
[21:52] <thumper> actually
[21:53] <thumper> all you need to do to make it work is add "&& bzr update" just after the bzr switch ... --force
[21:53] <thumper> prior to the cd ..
[21:53] <thumper> ...
[21:53] <thumper> actually, I think that perhaps it should work as is
[21:53] <thumper> what isn't it doing?
[21:54] <Derailed> the first version that is supposed to be built is 1.4, when the script runs for the first time (when launchpad isn't there) a bzr operation happens and launchpad/ is created, but it's empty
[21:54] <Derailed> and I don't know why
[21:55] <Derailed> root@precise64:/var/lib/sitedata/mahara-manual-sphinx# bash generate-mo-files.sh 1.4
[21:55] <Derailed> Starting import of translations...
[21:55] <Derailed> Checking out the launchpad .po files
[21:55] <Derailed> You have not informed bzr of your Launchpad ID, and you must do this to
[21:55] <Derailed> write to Launchpad or access private data.  See "bzr help launchpad-login".
[21:55] <Derailed> Branched 0 revisions.
[21:55] <Derailed> ls: cannot access launchpad/potfiles/: No such file or directory
[21:57] <thumper> echo out the actual bzr command
[21:57] <thumper> I think you'll find that it isn't substituting the $1
[21:58] <Derailed> Checking out the launchpad .po files
[21:58] <Derailed> + bzr checkout 'lp:~mahara-lang/mahara-manual/1.4_STABLE-export' launchpad
[21:58] <thumper> huh
[21:59]  * Derailed starts to wonder if there's even anything IN that branch
[21:59] <thumper> Derailed: the reason there are no revisions
[21:59] <thumper> is because the branch on LP is empty
[21:59] <thumper> it has no revisions to give you
[21:59] <Derailed> ha!
[21:59] <Derailed> ffs
[22:00] <Derailed> you know what that means?
[22:00] <thumper> yes, it means the branch was initialized
[22:00] <thumper> but never had any revisions pushed to it
[22:00] <Derailed> unless I'm wrong, then that means that the mahara 1.4 manual has been being translated with whatever was left over in that directory from the last time the script was run, every time
[22:00] <Derailed> whoopsies
[22:00] <thumper> also marked as abandoned
[22:00] <Derailed> that'
[22:01]  * Derailed is bemused
[22:01] <mgrandi> since people are here
[22:01] <mgrandi> anyone know where the bzr windows release guide is? like how to compile it?
[22:01] <mgrandi> maybe Jelmer knows?
[22:02] <Derailed> thumper, in that case. do you believe the script is still doing the right thing for branches 1.5+?
[22:02] <thumper> Derailed: yes
[22:02] <Derailed> okay thanks.
[22:03] <thumper> mgrandi: no, but jam may well, he is UTC+4 I believe
[22:04] <Derailed> I gotta run away now. doing too many things at once, but thanks a lot for helping clear up this little mystery. now all I have to do is work out where http://manual.mahara.org/de/1.4/ is getting its german from if it isn't from the 1.4 branch :-)
[22:04] <Derailed> but that can be a 'later' problem
[22:04] <mgrandi> bah, keep missing people cause im not in europe =P
[22:08] <fullermd_> I prefer to think of it as "people keep missing me"   :p
[22:08] <mgrandi> =P
[22:09] <mgrandi> maybe ill just stop being lazy and search my email for it, i remember it being talked about
[22:09] <mgrandi> doesn't help that bazaar seems to have like..2.5 websites