=== bigjools-afk is now known as bigjools
maxbGot it01:49
maxbThe reason all those UDD imports are failing with LockContention is because branch.bzrdir.open_workingtree() gives you a tree whose tree.branch isn't the same branch as the original01:50
maxbWhich isn't unreasonable given the indirection via bzrdir01:50
LarstiQmaxb: do you need the actual tree in that location? If so, can't you start with it?06:36
lifelessmaxb: thats actually deliberate06:43
lifelessmaxb: keeps the core simple, lets folk do clever things if they need to.06:44
mgzmorning all!07:17
LarstiQhei mgz07:20
maxbLarstiQ: The code flow is such that we already have the branch open when it becomes relevant to want the tree too - at least, without restructuring it a bit07:22
maxblifeless: Yes, "... isn't unreasonable ..." = me being happy with bzr core's behaviour07:25
LarstiQmaxb: and branch.basis_tree() is not sufficient?07:28
lifelessmaxb: cool cool07:29
mgz...I missed the context while on bus, this is about relocking issues with new branch objecT?07:31
maxbNeeds to be a WorkingTree07:31
LarstiQmgz: yeah, 01:50:14 < maxb> The reason all those UDD imports are failing with LockContention is because branch.bzrdir.open_workingtree() gives you a tree whose tree.branch isn't the same branch as the original07:31
maxbYes, a LockContention happens because udd has accidentally aliased the branch object07:31
LarstiQjam: if you have some spare cycles, mind having a look at bug 541626 and whether lp:~larstiq/bzr/bug541626 heads in the right direction?07:34
ubot5Launchpad bug 541626 in Bazaar "'BTreeBuilder' object has no attribute '_find_ancestors'" [High,Confirmed] https://launchpad.net/bugs/54162607:34
mgzcan you preserve the token from the original lock operation and pass it in when locking the new branch?07:35
mgznot ideal, really don't want multiple branch objects for the same location07:35
maxbpreserving the token isn't an option - too many layers of code in the way07:36
maxbIt's a bit annoying that there isn't a way to open one kind of object from its siblings07:37
maxbI suppose I'll just rearrange the code in UDD so it can open the WT first and get the Branch from the WT object07:38
mgzthat's what I've done in the past, does feel like there should be a better method07:39
mgzsometimes you always want the branch but may or may not want the tree07:39
vilahi all07:39
LarstiQmoin vila07:39
lifelessmaxb: tree's can't do their thing w.o the branch though07:40
lifelessmaxb: which is why opening the tree implies opening the branch07:40
lifelessit might be interesting to try having a tree with no operations that need a branch, and branch w none that need a repo07:41
lifelessI wonder what that would look like07:41
lifelesse.g. what would 'do a commit' look like.07:41
maxblifeless: The issue is, I have a Branch already open, and I really want to just open a WorkingTree using my already open Branch07:43
maxbInstead, I'm going to have to close my Branch, and open a WorkingTree, which will re-open the branch07:43
lifelessyou could keep your branch, and open a working tree07:43
lifelessthe issue AIUI is that you have the branch write locked.07:44
lifelesswhich is rather separate.07:44
mgzmultiple objects are still an issue for other reasons. is branch.repository shared at least?07:45
mgzif not, you also have two sets of caches.07:45
lifelessthere is a facility to pass in existing transports to various opens()07:46
lifelessyou could extend that for live objects too; though it would depend on url equivalence07:46
maxbI am keeping my branch and opening a working tree - this results in the branch (and repository) being re-opened07:47
mgzright, just checked, the repo isn't shared either, that's bad.07:48
mgzand I don't like the idea of adding an extra param that can get forgotten as the new right way07:49
maxbReally what I need is for the WorkingTree API to acknowledge that the associated Branch may already be open, and let it be passed in07:49
maxbIt turns out my WT has already been opened once, then discarded, too :-)07:50
maxbSo, I think my answer here is to stop using BzrDir.create_branch_convenience, and do the creation myself so that I can get hold of the return value of create_workingtree07:50
jamLarstiQ: looks fine to me. You'll probably want to look at the tests in test_btree.py that currently only go against index implementations, (or maybe it is per_index?)07:58
jamto see if you can get a builder object passing the same _find_ancestors tests.07:58
LarstiQjam: aye08:00
maxbHm. Actually, if you're doing work on lots of branches in a shared repository, it must be really easy to accidentally reopen the repository every time you open a new branch08:02
mgzmaxb: it is.08:02
maxbriight, so the udd importer is probably opening repositories N * number-of-existing-ubuntu-series times :-/08:05
* maxb kicks off a test import with the modified code08:06
maxbgah, thinko, called create_workingtree on the branch not the bzrdir08:08
maxbIt is a bit inconsistent that we have a branch.bzrdir.create_workingtree(from_branch=branch) but no equivalent for open_workingtree08:11
mgzmaxb: point me at the mp when you're ready08:24
mgzmaxb: reviewed. I can deploy to jubany later, or you can do that.08:46
mgzmaxb: from my questions, only real addition that I'd like would be a docstring on create_branch that says what the aim is exactly08:57
mgzit's kinda just a thin wrapper with some preconfigured bits, maybe the functions that use it need more08:58
maxbWell, it's only used in two places, and those have little in common09:04
maxbIt might even be appropriate to rename it to an underscore-prefixed name, it's so much an implementation detail09:05
mgzright, what I'm not clear on is if create_updates_branch needs the tree09:05
mgzright, underscore or rename would be good.09:05
=== idnaria is now known as idnar
=== kgoetz is now known as Kamping_Kaiser
PaoloRotoloHi all!10:15
jelmerhi PaoloRotolo10:17
PaoloRotoloI have a problem with Bazaar. I get this error: "paolo@voyager:~/Sviluppo$ bzr branch lp:ubuntu/precise/gnome-control-center10:19
PaoloRotolobzr: ERROR: Revision {package-import@ubuntu.com-20120316192311-zi5yuz8wrcq6tbhg} not present in "Graph(StackedParentsProvider(bzrlib.repository._LazyListJoin(([CachingParentsProvider(None)], []))))"...10:19
jelmerPaoloRotolo: see bug 88861510:25
ubot5Launchpad bug 888615 in Bazaar "UDD branch freshness checker breaks on incomplete history" [High,Confirmed] https://launchpad.net/bugs/88861510:25
PaoloRotolojelmer, thanks!10:27
=== bob2_ is now known as bob2
=== yofel_ is now known as yofel
jmlI just ran 'bzr rmbranch foo' in my colo and now it doesn't work13:53
jmlwas in 'trunk', ran 'bzr rm working-public-ip', and now I can't switch branches13:54
jelmerjml: what version of bzr?13:54
mgz9? 0.13:54
jmlBazaar (bzr) 2.5.013:55
* mgz guesses, need to back port the rmbranch fix still13:55
jelmerjml: that doesn't have the rmbranch fix13:55
jelmerso if you specify a branch name, it will try to open the branch containing that path13:55
jelmers/branch/control directory/13:55
jelmerthat control directory would be 'trunk'13:55
jelmerand then it removes the active branch13:55
jmljelmer: yuck.14:01
jmljelmer: how do I dig myself out of this?14:01
jelmerjml: you can create the branch again by running "bzr heads --dead-only" to find the relevant revision14:03
jelmerand then using "bzr pull -rrevid:REVID --overwrite ." to create the branch again14:04
jmljelmer: ok. I'll try that.14:05
jmlbzr: ERROR: Not a branch: "/home/jml/src/lp-dev-utils/.bzr/branch/": location is a repository.14:06
jelmerjml: try a "bzr init ." first14:06
jmljelmer: interesting. now when I try that I get: $ bzr switch trunk14:08
jmlbzr: ERROR: Cannot switch a branch, only a checkout.14:08
jelmerjml: you want "bzr switch -b trunk"14:09
jmlbzr: ERROR: Cannot lock LockDir(file:///home/jml/src/lp-dev-utils/.bzr/branches/trunk/lock): File exists: u'/home/jml/src/lp-dev-utils/.bzr/branches/trunk/lock': [Errno 17] File exists: '/home/jml/src/lp-dev-utils/.bzr/branches/trunk/lock'14:09
jmlbreak the loc?14:09
jelmerjml: ah, it already exists14:10
jelmersorry, I didn't realize your current branch was just a reference14:10
jelmerjml: try "bzr rmbranch; bzr co --lightweight file:,branch=trunk ."14:10
jmljelmer:  that succeeds without error, but then: bzr switch trunk14:11
jmlbzr: ERROR: Not a branch: "/home/jml/src/lp-dev-utils/.bzr/branch/": location is a repository.14:11
jelmerjml: what does "bzr branches" say?14:12
jelmerjml: generally speaking though, I would recommend using something 2.6-ish with colocated branches14:12
jmljelmer: it lists four branches, including trunk, but none are selected.14:12
jmljelmer: I'm guessing 2.6 is not in 12.04?14:12
=== jcsackett_ is now known as jcsackett
jelmerjml: no, unfortunately not14:13
jelmerjml: you can try "bzr switch --force"14:13
jmljelmer: ok.14:13
jmljelmer: I think I'll just refetch, and then use heads to pull the branches from the old one into a new colo14:14
jmljelmer: thanks though.14:15
jelmerjml: I don't think colocated branches are ready for production use, tbh. They're not polished enough.14:15
jmljelmer: well, I started using them because I prefer the layout, and because I wanted to help polish them as an alpha user14:16
jmldoesn't look like that's going to happen though.14:16
* jml goes temporarily Eeyore14:20
=== deryck is now known as deryck[lunch]
ldurosi'd like to have a diff of all files between two commits17:43
lduroshow can I do this? :-)17:43
jelmerlduros: bzr diff -r4..517:44
ldurosbzr diff -rXXX..XX17:44
ldurosah ok17:44
jelmerto get the diff between revision 4 and 517:44
jelmerlduros: :)17:44
ldurosi thought the dots had to be replaced17:44
lduroswith something17:44
fullermdThey're actually upside-down apostrophes.  With amputated tails.17:44
jelmerfullermd: that sounds like punctuation-abuse to me17:46
ldurosbut does it commits in between17:47
fullermdYou call it punctuation abuse, I call it thursday.17:47
ldurosdoes it compare all the commits in between17:47
ldurosI meant17:47
fullermdThere's no "in between" really.  There are just two states.17:47
lduroshow can you tell what revision number you are on currently17:48
ldurossorry... just learning bzr17:48
jelmerlduros: 'bzr revno'17:49
ldurosthat shows the latest one though17:49
ldurosif you are using revert -r xxx17:49
ldurosit wouldn't show xxx17:49
ldurosbut the latest17:49
=== deryck[lunch] is now known as deryck
jelmerlduros: revert doesn't change the revion number17:51
lduroshmm ok17:51
jelmerlduros: it justs sets the contents of the working tree to match that of the specified revision17:51
ldurosbut it puts the file to a given revision number no?17:51
jelmerlduros: to the contents of the file in that revision17:51
ldurosno big deal then :-P17:51
ldurosat least revision numbers are easier to remember than git sha1 hashes17:54
=== lifeless_ is now known as lifeless
ldurosI've been using bazaar for two weeks, and I really love it22:44
ldurosthanks for making bazaar!22:44
ldurosif anybody here is involved with it22:45
ldurosgoing back in revisions is much simpler than git22:46
lifelesslduros: excellent22:50
lduroslifeless: I had to find a subtle bug, which I introduced I didn't know where, hundred commits ago22:50
ldurosI went back, revert commit 10 by 1022:50
ldurosuntil I narrowed down to the revision that had an issue22:51
ldurosthis in git was a headache for me22:51
lduroswith the hashes22:51
ldurosmaybe there's a better way to do it in git22:51
ldurosthan I would22:51
lifelessI believe many folk would use git bisect22:52
lifelessthere is a bisect tool for bzr as well22:53
lifelessit just automates (and optimises) the process of narrowing down a change22:53
lduroslifeless: hmm22:54
ldurosbut you need to automate the test no?22:54
lduroswhich is not that easy to do in my case22:54
ldurossince it requires starting firefox, navigating to a certain page and performing a certain task :-P22:55
ldurosin any case, the fact is that with bzr I didn't need to learn about something like bisect22:56
ldurosi could do it using the revision numbers22:57
ldurosmakes more sense to humans :-P22:57
lifelessyou can22:57
lifelessbut you can also just use it to go one step22:57
lifelesscheck yourself22:57
lifelessthen say 'problem still exists' vs 'problem is gone'22:58
lifelessand it decides to go further back or forwards22:58
ldurosso you're convincing me to use git :-P22:58
lifelessnot at all22:59
ldurosjust kidding22:59
lifelessI'm saying that there is a tool, that both systems have, that can help with the problem you had22:59
ldurosi know, got it :-)22:59
lifelessI think its great - its a design goal - that with bzr you didn't need the tool ;)22:59
dOxxxlduros: in git you can also use HEAD~10 to refer to the 10th revision before the tip of the current branch23:11
ldurosdOxxx: maybe, but then HEAD~10 changes if the tip of the current branch changes23:12
ldurosyou can't turn off your computer, or even write the revision number on a piece of paper23:12
lduroswas just saying I love revision numbers23:12
ldurosbecause I like to use my brain23:13
ldurosmaybe people despise that because it's not really being a power user23:13
ldurosbut it's being a power user with your brain, ... sort of23:13
dOxxxyou don't need to use the whole git hash. you can usually just use the first 6-8 digits and it should be unique enough23:26
ldurosyeh but even that many it makes no sense23:26
dOxxxbut yeah it's not easy as -r500 -r490 etc23:26
ldurosthere's no succession23:26
dOxxxbtw, as a solution to the tip changing problem, you can use a hash with the ~10 syntax as well, so like abc123~10 would be the 10th commit before the revision whose hash starts with abc12323:28
lduroswith bzr?23:28
ldurosyeh, realized afterwards23:29
ldurosi don't like it as much23:29
ldurosso is that bzr bisect: http://doc.bazaar.canonical.com/plugins/en/bisect-plugin.html23:33
ldurosjust wrote a little post :-P incorporated some of what you lifeless and dOxxx said. Hope that's ok with you. I bet many people will despise me for what i'm saying in there, anyway... http://lduros.net/posts/why-i-think-bazaar-better-git/23:44
dOxxx"A simple bzr -r 610..611 allowed me" -> "A simple bzr diff -r 610..611 allowed me" ;)23:46
dOxxxbut good post :)23:47
dOxxxexplaining *why* you prefer one to the other may help somebody else decide which they should try first because the same thing would bug them23:47

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