/srv/irclogs.ubuntu.com/2012/02/14/#bzr.txt

=== ubot5` is now known as ubot5
SoftwareExplorerI'm trying to use bzr to keep track of changes I make to /etc on my Ubuntu system. The problem is that I got a glob of changes that I would like to split in to a few different commits. The nice thing is that the changes that should be in different commits are in different files. Is there a way to do this?03:28
lifelessbzr commit path [path...]03:30
abentleySoftwareExplorer: You should also look into using etckeeper for this-- it was designed for maintaining /etc in bzr.03:31
SoftwareExplorerlifeless: Thanks!03:31
SoftwareExplorerabentley: Cool, another toy to try :)03:32
vilahi all07:33
quicksilvermgz, jelmer: this is what I did in the end:09:17
quicksilver(cd ../tree-with-toxic-file/; bzr diff -r1384..1385) | patch -p0; bzr commit --author "Original author <author@name>"  -m"$(cd ../tree-with-toxic-file; bzr log -r1385 | grep '^ ')"09:17
quicksilverrepeated multiple times in a shell loop.09:17
quicksilverfortunately there weren't any merges to worry about, that makes it much worse.09:17
mgzmorning09:39
=== RickCogley_ is now known as RickCogley
quicksilvermgz: aha, I just said something to you before you logged on :)10:05
wgzah, but I have it in the buffer here10:11
wgzglad that worked, but we really do need a proper way of doing that10:12
wgzenough people run into it that they shouldn't all need to do their own hacks.10:13
quicksilverwgz: yeah. also, for the record, my hack is wrong because it doesn't account for added files.10:25
quicksilverwgz: I should have added "bzr add $(bzr unknowns)" to each step10:25
vilaquicksilver: not to mention renames...10:26
quicksilverwgz: and most importantly, my method totally fails to record merges correctly. I've done that before and it was a lot more hard work. Our local wiki (where I work) has a long page on how you might fix this kind of stuff10:26
quicksilverwith various approachs which don't work.10:26
quicksilverbzr fast-export and bzr rebase are listed as two of the ones which apparently don't work :)10:26
quicksilvervila: yes indeed. renames like merges.10:27
quicksilverfortunately this was a fairly short piece of history and it was mostly just changes. I was just pleased to preserve the commit messages and atomicity.10:27
* vila nods and agrees with wgz about better supporting that kind of operations10:27
quicksilverok, reading my notes from last time10:28
quicksilverlast time I used 'bzr replay'10:28
quicksilverthat's pretty much the same as the diff/patch thing but better.10:28
quicksilverand for merges I used shelve.10:28
quicksilver(taht is, uncommit, shelve, manually copy shelf to dest tree, unshelve)10:28
vila+1 on moving shelves from one tree to another (with some care for the needed revisions)10:29
quicksilverbut shelve only worked for simple merges10:29
quicksilverit failed on a fiddly one with multiple conflicts and renames and stuff10:29
quicksilverand I never worked out *why* it failed10:29
quicksilverfortunately I was able to work around that by, essentially, manually redoing that merge from the revid involved, which wasn't a "toxic" revid so it was OK.10:30
vilaworth a bug report if you can reproduce but shelving a merge... won't track the merged parent I think (which may be an acceptable limitation)10:30
quicksilvervila: I wrote a pretty detailed post about it to the list last time10:31
quicksilverit was mostly warnocked. Too much to digest, I fear.10:31
vilayeah, I was about to mention this rang a bell10:31
quicksilveryou helped me last time, yes10:32
vilayeah, and bug reports are better to track middle/long terms issues, posting to the mailing list is still valuable  though, thanks for that10:32
quicksilverhttps://lists.ubuntu.com/archives/bazaar/2010q1/066738.html10:32
quicksilverthe problem was I didn't understand bzr well enough to be clear what a useful bug report was10:32
quicksilverI tried to explain in enough detail for other people to understand10:32
vilayup, the issue is also that you were using 2.0.3 and some of the things you refer to sound like bugs that were fixed in later version so it was a bit hard to split that into proper bugs10:35
quicksilverunderstood10:35
quicksilverI appreciate the difficulties and I've love to be more helpful but I always hit these problems when I'm on tight release schedules myself :(10:36
vilasome memory issues have been solved, there is now a add.maximum_file_size config option (defaulting to 20MB) which may have avoid the issue entirely10:36
quicksilverI'm now using 2.1.010:36
quicksilverwhat should I be using?10:36
wgz2.4.2 would be nice.10:36
wgzbut the core issues you highlight in that post are still relevent.10:37
vila2.4 at least, 2.5b6 has just been made available and is the last beta before 2.5 becomes the new stable10:37
quicksilverI have a conservative tendency not to upgrade core tools if they aren't broken.10:38
quicksilverand now I have a criss-cross merge and I don't know why :-(10:38
quicksilverhow can I track down where the criss-cross is and break this merge down more sensibly?10:41
wgzqlog makes pretties10:41
* quicksilver inverstiages installing qbzr10:43
=== RickCogley_ is now known as RickCogley
* quicksilver is in a maze of twisty branches all alike10:50
vilaquicksilver: that's where 'bzr qlog trunk branch1 branch2 branch3' really helps10:55
quicksilverif I have a criss-cross trying to merge A and B then each of A and B must have independently merged C, right?10:58
quicksilverand the solution is to go via C10:58
quicksilverif I can locate C.10:58
vilacriss-cross merges are generally just a warning, unless you encounter bad merge results, you can probably just ignore them10:59
vilaand if you encounter bad merge results, fixing them once is also generally enough11:00
vilaif you do encounter them frequently, you may want to investigate your workflow though11:00
* quicksilver nods11:01
quicksilverquite bad conflicts11:01
vilalegit or spurious ?11:02
quicksilverI thought I might be able to improve things by unpicking11:02
quicksilverlooks like the same change applied independently in A and B in some cases11:05
quicksilvervila: I was mostly intellectually curious as to how we'd got into this situation and if I could simplify the conflicts by unpicking. It's probably a rabbit-hole I should avoid.11:18
quicksilverbzr: ERROR: Unable to determine your name12:05
quicksilvereh? how could bzr suddenly forget my name?12:06
quicksilverwhere is this normally stored?12:06
quicksilverah, the bzr version upgrade must have lost it12:06
mgz...it should really find the same config file12:07
quicksilverupgraded from 2.1.0 to 2.4.212:08
mgzif you run `bzr version` and `bzr config` it should have the same location and contents before and after (probably a bit late to check now)12:08
quicksilverBazaar configuration: /Users/jules/.bazaar12:08
quicksilverthat directory is empty except for my ignore file12:09
jmlhey12:09
jmlI was talking with a git user the other day12:09
jmland the way they described interactive commit (incl. diff hunk splitting) sounded really nice12:09
jmlDoes bzr have a diff hunk splitting thingy?12:10
jmlAnd does it have an interactive commit? (I use shelve a lot)12:10
quicksilvershelve splits by hunks12:10
quicksilveryou know that if you use it :)12:10
jmlquicksilver: really?12:10
mgzhm. and do you have an existing file in %APPDATA%/bazaar/2.0/ instead?12:10
quicksilverI thought it did12:10
mgzyou can hit 'e' in shelve if you have an editor configured12:11
jmlquicksilver: as in, can you take an existing hunk and split that up with shelve?12:11
mgzit's like, the least discoverable thing ever.12:11
jmlmgz: interesting, will try that out.12:11
quicksilvermgz: there are a couple of places that %APPDATA% might resolve to on a Mac. I'm poking around.12:12
mgzI think it needs to actually be as in `bzr config editor=` rather than just EDITOR=12:12
mgzquicksilver: whoops, mistook that for win 7 for some reason12:12
mgzthe osx logic shouldn't have changed12:12
mgzit's bascially BZR_HOME or ~/.bazaar12:13
mgzso, if you had config in your home dir before bazaar should still see it12:13
quicksilverthis is peculiar12:13
quicksilverI set up bzr about 7 years ago, I don't remember how I told it who I was :)12:13
quicksilverprobably just by typing bzr whoami without worrying about it12:14
quicksilveralthough I can't remember if I made som eeffort to distinguish work repos from non-work repos12:14
mgzyeah, or maybe it just worked?12:14
mgzI'd be suprised if you had no config at all though12:14
mgznewer bzrs are a little stricter about how they get your identity12:14
quicksilverah you know what, I never did set it up I think12:15
quicksilverold commits show my user ID as jules@machine-name.localdomain12:15
quicksilvernot with a real email12:15
mgzah, yes, that's what the newer versions are trying to avoid12:16
quicksilvernever bothered me personally since it was obviously me12:16
quicksilverbut I can see people would prefer a real email address12:16
quicksilverwould be nice to set whoami for a whole shared repo rather than one branch at a time12:17
mgzyup.12:18
mgzyou can set a sensible global value though.12:18
mgzhaving a mix of different identities for different projects on the same machine is currently somewhat painful though12:19
quicksilverI've been compiling since vila convinced me to try qlog at 10:5512:23
quicksilverit's still working on Qt12:23
quicksilverI hate source distribution :P12:23
mgzeheh, surely there's an easier way to get qt there?12:24
mgzyou're using a platform where you're not expected to do things for yourself.12:24
quicksilvermgz: dunno. I usually find macports is the best way to get open source software12:25
quicksilverapparently 'brew' is the new kid on the block.12:25
quicksilverbut they both compile from source.12:25
mgzwhy not just run gentoo in a vm...12:25
quicksilvernot sure that solves the source problem :)12:26
mgzseems like a masochistic approach12:26
mgzbut I guess trying to do free software packaging on a mac means that's the kind of people they are12:26
antonhi am doing 'bzr commit' and my editor is launched. i am about to write a commit message and dont remember what i did so i open another terminal and type bzr status too see what i actually did12:27
antonhthen bzr complains about bzr: ERROR: Could not acquire lock "/path/to/file"12:27
quicksilveryeah.12:27
quicksilverthat's why the default commit messages reminds you what has changed at the bottom?12:28
mgzantonh: bug 9883612:28
mgz...bot?12:28
antonhquicksilver, yes only what files has changed, it gives no info about the diff12:29
mgzat any rate, that's a known issue with one bit of bzr, but it's not an easy change12:29
quicksilverantonh: yes. I now have the habit to always run diff first, and then commit.12:29
quicksilverC-x V = and then C-x V c12:29
quicksilverthen I can compose my commit message browsing the diff in the other window12:30
quicksilvermgz: I'll be your bot! https://bugs.launchpad.net/bzr/+bug/9883612:30
mgzthanks bot!12:31
antonhisn't it possible to perform a write lock on the file and let other processes have read access to the file?12:33
antonhisn't 'bzr status' a read-only operation?12:34
quicksilvernot portably using the simplistic OS locks bzr is currently using12:34
quicksilverlogically some way of differentiating read and write locks would go some way to solving the problem12:34
antonhokay, so there is only one kind of lock at the moment. and that lock covers up for both read and write12:35
mgzantonh: read the bug for the messy details, but basically the fancy stat cache can need updating whenever it looks at the tree12:36
mgzwhich is why it needs write access12:36
mgzso, entering the commit messsage shouldn't hold a lock, and st shouldn't really need to write lock, but that's how things work currently12:37
antonhyeah12:38
antonhif it was written in C i might have looked at it right away12:38
mgzit's really an issue with the design of dirstate, rather than something that's just a code problem, hence why it's stuck around as a problem12:39
quicksilverwell I think you could scrap the lcok on starting commit couldn't you?12:40
quicksilveror collect the message first, at least12:40
antonhi guess your solution is the easiest quicksilver12:41
antonhactually it isn't 'bzr status' i want to do, it's 'bzr diff' but i think you realised that :)12:42
mgzantonh: the easy thing for you to do is just `bzr alias ci="commit -p"` or similar12:44
mgzso you always have the diff12:44
antonhoh cool12:45
kiseNewbie question: In Bazaar, is there any difference between "bzr mv ..." and "bzr rm ...; bzr add ..."?12:47
jelmerkise: yes, that would add a completely new file12:49
jelmerkise: if you 'bzr rm', then 'bzr add' you can use 'bzr mv --auto' to make it detect renames12:49
kisejelmer: Thanks. Ok, then let me explain a problem I have.12:50
kiseI had a folder named "extra" with many subfolders and did the following:12:50
kise1) I rearranged rearranged them manually into "extra/cpp" and "extra/python".12:50
kise2)"bzr add"12:50
kiseNow Bazaar shows all the subfolders as "removed" and then "added".12:50
kiseI thought it would be better if they appeared as "moved" but don't know how to do it.12:50
kise"bzr mv --auto" does not detect anything.12:50
kiseAny suggestions?12:50
jelmerkise: hmm, are there more changes to the files than just their move?12:51
kiseNo12:51
jelmerI'm not sure why 'bzr mv --auto' doesn't work then12:51
mgz`bzr mv --after` will let you fix up stuff now12:51
kisejelmer: 'bzr mv --after' means I have to do it for every subfolder I moved manually?12:52
jelmerkise: yes12:52
mgzif there are hundreds that might be annoying, but if you didn't also rename the dirs it's amienable to scripting12:52
mgzbash one liner someone? :)12:53
kiseI see. Thanks for the suggestion. Will try my hand at Python :)12:53
kiseSorry, a related question. While trying to use the "--after" switch I found this:12:55
kisebzr mv xtra/unused-cpp xtra/cpp/unused-cpp --after12:55
kisebzr: ERROR: Could not move to unused-cpp: xtra/cpp/unused-cpp is not versioned.12:55
kiseDo I need to add first all directories with "add --no-recurse"?12:55
mgzwhat does switching --after to --auto do in that case?12:56
jelmerkise: yep12:56
kiseUhm, I see. Anyway tried switching --after to --auto and bzr complained:12:58
kise$ bzr mv xtra/unused-cpp xtra/cpp/unused-cpp --auto12:58
kisebzr: ERROR: Only one path may be specified to --auto.12:58
kiseSeems like I will have to do it through scripting.12:58
kiseThank you very much, jelmer and mgz ;)12:59
jelmerit's a bit odd that 'bzr mv --auto' doesn't work thoughj12:59
kiseIt has happened to me several times. T_T I don't know why either. I use Bazaar 2.4.13:00
kiseNever anyone had this experience?13:00
jelmerkise: 'bzr mv --auto' seems to work fine for me13:01
jelmerkise: I don't use it often though, usually I just use 'bzr mv' when I move files13:01
kiseI see. Thanks anyway! ;)13:02
jelmerkise: if you hit this again, please file a bug13:02
kiseOk13:02
quicksilvervila: qbzr finally installed :)14:19
vilaquicksilver: \o/14:19
quicksilveryou know I hate GUI tools14:22
quicksilverbut I can see some neat things here14:22
quicksilverwhat are the colours in qblame? "freshness" of the change?14:22
mgzhue is who, intensity is how recently14:23
* quicksilver nods14:24
quicksilverwhat would be better, of course, is an emacs mode with the same functionality :) but this is cool.14:24
quicksilverhmm no bzr qmerge --preview14:52
mgzsee bug 41523214:55
mgzor the bug linked from there for more.14:56
vilaquicksilver: AIUI emacs provides something (but we had feature requests to make it faster)15:02
vilaquicksilver: the default vc mode is where this is defined (IIRC)15:02
quicksilvervila: well I use dvc for quite a lot but it doesn't have sepcific support for merge --preview15:03
quicksilvervila: however it's simple enough to do M-! bzr merge --preview ../other-branch15:03
vilaerr, sorry, I thought you were talking about annotate15:03
quicksilvervila: and then M-x diff-mode in that buffer15:03
vilayup15:03
vilaI use that Heavily15:03
quicksilverbonus points for C-x C-q to put it in read-only mode15:04
quicksilverwhich makes the keybindings more useful.15:04
vilahmm15:04
vilabut that means C-c C-s (split-hunk) does not work anymore ?15:04
quicksilverdidn't know that one15:07
vilaquicksilver: very handy to revert part of a change16:01
quicksilvervila: yes I must admit I generally do that by hand16:09
quicksilvervila: and then re-check the diff to see I did it right.16:09
vilaYeah, I did that before I discover it, I never looked back ;) Of course it works for *applying* part of a change too (if you M-x cd to the right directory)16:10
quicksilverhttp://search.cpan.org/dist/VCI/ looks interesting17:11
quicksilverbut I can't see that it's data model knows what a 'merge' is.17:11
quicksilveralthough it mostly supports VCSes which understand merging.17:11
quicksilverdoes anyone know offhand if there is a way to turn a revid into a loggerhead URL?17:36
quicksilver/branch-name/changes/34.1.2 is a valid URL for a dotted revision number17:37
quicksilver/branch-name/changes/revid:blah doesn't work though17:38
=== maxb is now known as Guest79372
quicksilverah well it turns out we're using a version of loggerhead which has a bug on that kind of URL anyway18:00
quicksilverc'est la vie18:00
tronhammerhalo?18:24
tronhammerhey I had a general security question18:25
tronhammerI don't feel comfortable with out bzr stores my password in plaintext, so I modified the bzrlib/transport/http/_urllib2_wrappers.py :: get_user_password to grab the password from a file on the system18:26
tronhammerthe file I made is a c program that when executed, checks the md5 of the bzrlib/transport/http/_urllib2_wrappers.pyc file, and if it matches the one that was given at the creation of the file, it prints out the password18:27
tronhammerdoes anyone see anything glaringly wrong with this approach?18:27
tronhammeroh, that's supposed to say "comfortable with how*"18:30
mgztronhammer: I take it you're using https?18:34
tronhammeryeah18:34
tronhammeralso, count out c decompilers of coarse, those aren't a concern18:35
tronhammermore issued with lunch time attacks18:36
mgzthere are some neater password stores that integrate with some OS things18:36
=== verterok` is now known as verterok
mgzbut that depends on you using an OS with one of them18:36
=== deryck is now known as deryck[lunch]
tronhammerhm, that's a good point, could use keyring for lion18:36
tronhammerkeychain*18:37
mgztronhammer: http://www.szakmeister.net/blog/2010/mar/9/bzr-keychain/18:42
tronhammerawesome, great find!18:43
tronhammerthanks18:43
damd||d:\repos\emacs-trunk>bzr pull19:15
damd||Using saved parent location: bzr+ssh://damd@bzr.savannah.gnu.org/emacs/trunk/19:15
damd||bzr: ERROR: Unable to connect to SSH host bzr.savannah.gnu.org; [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions19:15
damd||how do i fix this? :|19:15
LarstiQdamd||: can you pastebin the corresponding traceback from .bzr.log? `bzr --version` will tell you where to find the log file19:19
LarstiQ!pastebin19:19
LarstiQhmm19:20
LarstiQ!paste19:20
LarstiQmeh19:20
damd||i'm attempting to upgrade bzr, but hold on if you have time, thanks!19:21
damd||here is the log: http://pastebin.com/raw.php?i=nYnKvQeM19:25
damd||brb19:30
=== deryck[lunch] is now known as deryck
LarstiQdamd: that error seems to come from somewhere underlying bzr (either the ssh provider or the os)19:31
LarstiQdamd: googling for the "An attempt ..." bit comes up with some hits19:32
damdyeah, i figured... i'm using pageant to serve the keys, i'm just guessing that bzr knows that i want plink to take care of SSH19:32
LarstiQdamd: yeah19:32
LarstiQdamd: do you have a firewall that could cause this maybe?19:33
damdno, i don't have a firewall, unless "microsoft security essentials" provides one19:34
LarstiQdamd: it does afaik (or builtin to windows itself)19:34
damdapparently i had the windows default firewall turned on, but turning it off didn't help19:34
damdturning off real-time protection in security essentials didn't help either19:35
LarstiQdamd: the other thing that comes up in google hits is that something else is already using the port the application tries to bind to19:36
LarstiQbut that doesn't make much sense in this case19:36
damdi'll try restarting the computer... :P19:37
LarstiQdamd: did that work?19:42
damdhaven't tried just yet, hold on19:42
damdi'm afraid it didn't :/19:43
LarstiQok19:43
damdit's really weird, because it worked the last time i tried it, which was a few months ago19:44
damdi really haven't touched bzr since19:44
LarstiQdamd: right, might not be bzr itself that changed though19:44
damdyou're right19:45
LarstiQdamd: you mentioned you tried to upgrade it now?19:45
damdyeah, i uninstalled bzr 2.3.1 (if i recall correctly) and installed the current 2.3.x stable19:45
damd2.3.4 i think it was19:45
damdi used the standalone installer19:45
LarstiQdamd: not that I think it would solve it, but any reason not to use 2.4? (Or a 2.5 beta if you want to try that)19:46
damdwhen i tried to start the 2.4 stable installer, nothing happened, when i tried to start it from total commander, total commander just hanged19:47
* LarstiQ blinks19:47
damdso did i :P19:48
LarstiQdamd: well, that's a reason :)19:49
damd:)19:49
LarstiQdamd: could you maybe try a different ssh provider?19:49
damdi'm not sure which one that would be, i've only ever used the putty suite19:50
LarstiQparamiko is bundled with the standalone bzr installer I believe19:51
* LarstiQ looks up how to tell bzr to use it19:51
damdmy first guess would be BZR_SSH19:51
LarstiQyeah19:52
LarstiQmaybe we should just try BZR_SSH=paramiko instead of me reading the code19:53
LarstiQright, 'paramiko' or 'none'19:53
damdi can't find paramiko on my system19:53
LarstiQbrb19:53
LarstiQdamd: it's a python implementation, would be in with the bzr executable afaik19:54
damdoh19:54
damdwell, same error19:54
damdd:\repos\emacs>set BZR_SSH19:54
damdBZR_SSH=paramiko19:54
LarstiQbah19:56
LarstiQdamd: can you ssh in to rule out any problems with putty?19:57
LarstiQor well19:57
LarstiQproblems indepedent of bzr19:58
LarstiQ1119:58
LarstiQwoops19:58
damdin putty i get "network error: permission denied"19:59
LarstiQdamd: can we get more verbosity from putty?20:00
damdi have no idea to be honest20:00
LarstiQdamd: everything I can dig up keeps pointing at firewalls :/20:04
damdyeah, thanks a lot for the effort though20:06
damdyou've done way more than i hoped for20:07
LarstiQdamd: np. I wish I could solve it20:07
damdluckily it's not that big of a deal20:08
LarstiQdamd: ok then :)20:08
=== mbarnett` is now known as mbarnett
LarstiQdamd: it occurs to me that perhaps it is a roundabout way of saying the equivalent of the openssh "Permission denied (publickey)."20:46
Kamping_KaiserHi all. can bzr import{dsc,tar} import only the debian/ directory from a package?21:38
mathrickhmm, is it normal that I see bzr 2.5b leaving locks all over the place when I Ctrl+C it?22:22
mathrickwin32 here22:22
lifelessnot expected no22:23
mathrickthen I'm seeing it do that pretty much every time22:23
lifelessfile a bug?22:25

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