/srv/irclogs.ubuntu.com/2011/01/19/#bzr.txt

jelmerdOxxx: I'd recommend sticking to the releases00:02
dOxxxjelmer: ok. same for bzr-svn?00:04
dOxxxjelmer: actually looks like I need to take something more recent than the 1.0.4 release of bzr-svn for it to be compatible with bzr 2.300:06
vilajelmer: time to create a new release ? :-p00:07
jelmervila: yeah...00:08
dOxxxjelmer: bzr-rewrite too00:08
jelmerI need to put some more thought into that ghost issue though :-/00:08
dOxxxvila: I'm packaging bzr-upload v1.0.0, ok?00:09
viladOxxx: yup00:09
jelmerdOxxx: I guess trunk is the best thing to package indeed. This is for the beta, right?00:09
dOxxxjelmer: I thought this was 2.3.000:09
dOxxxof bzr00:10
dOxxxvila: right?00:10
jelmerAFAIK 2.3.0 is not out yet, is it?00:10
vilajelmer: yup, 2.3b5, but we intend to package as many releases as possible for 2.3.000:10
dOxxxwoops00:10
viladOxxx: *last* beta before 2.3.000:10
dOxxxvila: :)00:10
dOxxxoh well I would have found out when the build tried to download the 2.3 tarball and failed :)00:11
viladOxxx: indeed :)00:11
dOxxxI need to poke abentley about a few of his plugins too00:11
dOxxxseems a number of them have 2.3 compatibility changes on trunk but no release00:11
dOxxxalso bzr-xmloutput which seems to be a free-for-all author-wise00:12
vilamail would be good for that I think as he's not around anymore00:12
dOxxxvila: k00:12
maxbjelmer: oh, question, what's the current plan for bzr-svn version numbers? because lp:bzr/1.0's NEWS now says it's 1.1 :-)00:13
maxb* lp:bzr-svn/1.000:13
maxbWhilst lp:bzr-svn/1.1 is a stale branch00:14
dOxxxjelmer, vila: bzr-fastimport release would be nice too00:17
* vila nods00:18
dOxxxvila: launchpadlib 1.9.4 ok? just released an hour ago...00:20
viladOxxx: sure thing00:20
viladOxxx: but... weren't there some missing dependencies ?00:20
dOxxxvila: such as?00:21
viladOxxx: I vaguely remember a bug about it but not if it was fixed00:21
dOxxxchecking00:21
dOxxxbug 68731500:22
ubot5Launchpad bug 687315 in Bazaar Mac Installers "some tests from the launchpad plugin requires lazr.uri" [High,Confirmed] https://launchpad.net/bugs/68731500:22
dOxxxsubject is misleading though00:22
dOxxxstill, yeah, that's a problem00:23
viladOxxx: yeah, I remember now, I tried creating a dedicated package (or whatever the name is there) and get lost00:24
dOxxxvila: a package in the installer definition which includes launchpadlib and all its dependencies?00:24
viladOxxx: yes, so we can provide it independently from pipeline00:26
dOxxxvila: so pipeline will operate without it? ok... I'll see what I can do.00:26
viladOxxx: no ! But IIRC launchpadlib is only installed with bzr-pipeline today00:29
dOxxxoh!00:29
viladOxxx: so if you don't install bzr-pipeline, you don't install launchpadlib either which is what I ended up doing to avoid the test issue00:30
vilas/test/test failure/00:30
viladOxxx: the 'clean' way to do it is to package launchpadlib *and* its dependencies which is not trivial so you may not want to try to fix that *now* :)00:30
dOxxxvila: I see.00:31
spivdOxxx: I think you may have mixed up "Aaron" and "Andrew" in your mail client :)00:31
dOxxxvila: still, as it stands, the installer is not installing bzr-pipeline into a working state unless the user already has the deps for launchpadlib already installed00:31
dOxxxspiv: oh darn I thought I got it the right way round00:32
spivdOxxx: well the To: line said me but the body said Aaron :)00:32
dOxxxspiv: ugh copy & paste FTL00:32
dOxxxdamn... I called nmb Aaraon too. ><00:32
dOxxxAaron*00:32
dOxxx*sigh*00:33
dOxxxHopefully I haven't offended you too much :)00:33
spivNot at all :)00:33
* vila bbiab00:36
=== Ursinha is now known as Ursinha-afk
maxbI *really* need to get myself a hardy VM01:13
PengI really need to upgrade my Hardy VMs...01:15
maxbhah01:17
maxb:-)01:17
maxbooh01:17
maxbA volunteer to test ~bzr PPA packages on hardy? :-)01:17
PengEep!01:18
Pengmaxb: The answer is probably no, but what are you looking for?01:19
PengGods, I last pulled bzr.dev 2010-05-14. >.>01:20
maxbDo you use loggerhead? If so, there's a 1.18 package in bzr/proposed to supercede the ancient 1.1001:31
maxbit built, I'm quite curious whether it works at all01:31
maxblater there will be the bzr upgrade from python-central->python-support to test01:32
PengHaha...I last pulled lp:loggerhead around 2010-05-14 too. :D01:34
dOxxxvila: hola01:43
vilahmm, weird things happening here, dOxxx , did you get explanation about why the tests were failing ?01:44
dOxxxvila: which tests?01:44
vilathe ones mentioned in bug #68731501:45
ubot5Launchpad bug 687315 in Bazaar Mac Installers "some tests from the launchpad plugin requires lazr.uri" [High,Confirmed] https://launchpad.net/bugs/68731501:45
dOxxxvila: nope, I haven't looked at that yet.01:46
dOxxxvila: are you still getting failures with all the pre-reqs installed?01:46
viladOxxx: can't remember, I restored a working env at the time01:48
viladOxxx: just checked, launchpadlib is not installed anymore on my laptop01:50
viladOxxx: well, on the OSX part of it01:50
dOxxxvila: I have bzr 2.3b5 osx 10.6 installer ready for upload01:51
viladOxxx: cool, did you push the changes ?01:52
dOxxxvila: not yet. I just want to quickly test that thq GUI stuff works01:52
dOxxxthe*01:52
viladOxxx: ok, can't help you there, my 10.6 is at home *and* off :)01:52
dOxxxvila: hmm... gui stuff works but there's at least one weirdness... the dropdown/editbox for the branch URL and target folder in the branch command is very narrow.01:55
dOxxxbut I suppose that's why this is a beta01:56
viladOxxx: isn't there already a bug for that ?01:56
dOxxxvila:  it does seem familiar01:57
dOxxxBug #64943001:58
ubot5Launchpad bug 649430 in Bazaar Explorer "text fields in qbranch are very narrow" [Undecided,Incomplete] https://launchpad.net/bugs/64943001:58
dOxxxalas, I didn't see alexander's question until now01:58
dOxxxI had my mail filters misconfigured and they were bouncing a lot of launchpad bug emails :P01:59
vilaweird thing is, I don't remember bialix asking for a screenshot either... or maybe I wasn't involved in building the installers at that point :-/02:04
dOxxxvila: anyway, I'll upload a screenshot for him now02:06
vilaok02:06
dOxxxvila: pushed. I'm signing and uploading my installer now.02:11
vilaok, pulling here02:12
dOxxxvila: re mergetools... the command_line getter/setter is needed by thq qbzr mp, so I can't really add it there instead.02:15
dOxxxthe*02:16
vilathat's a nasty dependency you're introducing there, why should qbzr modified a mergetool object ? Why not setting the config option value instead ?02:17
dOxxxfor the same reason qbzr doesn't modify .bzr and uses Branch instead02:18
vila?02:19
dOxxxit's used as a representation of a MergeTool02:19
vilasetting a config option is a public API02:19
vilais the option value set from there then ? I didn't see this in your mp02:20
dOxxxthe config option is set when qconfig passes the modified MergeTool object to Config.set_merge_tool02:20
vilaeeerk02:20
dOxxxugh wait02:21
dOxxxmy brain is not working02:21
dOxxxthis damn mp has changed so many times I'm losing track02:21
dOxxxok02:22
dOxxxconfig option is set directly by qbzr, basd on the contents of the modified MergeTools object.02:22
dOxxxqconfig gets MergeTool objects from config using get_merge_tools, uses them as an internal storage for it's UI, modifies them as user changes commandline, etc., and then uses the modified contents to call Config.set_user_option02:23
vilakeep in mind that users will still be able to set it directly in the config file, that's why I insist on not multiplying the ways to manipulate what is anyway a string02:24
dOxxxexcept it's two strings. :)02:25
dOxxxbut I get the point.02:25
vilatwo ?02:25
dOxxxname + commandline.02:26
vilastored as one02:26
vilaoh, you mean the option name ?02:26
dOxxxI mean as in 'kdiff3 = /usr/bin/kdiff3 etc'02:26
dOxxxtwo strings02:26
dOxxxuser-provided name and commandline02:26
vilayeah, the option name and its value02:27
dOxxxah yes02:27
dOxxxvila: so now I'm even wondering if we need a MergeTool class at all02:28
dOxxxperhaps the mergetools module could just contain functions for is_available and invoke, based on a string commandline given to the function02:29
vilawell, I said that pretty early :) But is_available, at least, needs a home and the default values too02:30
dOxxxyeah well I blame my overly-Javafied brain :)02:31
vila:)02:31
dOxxxso... if MergeTool no longer exists, then config.get_merge_tools should return a dict of name -> commandline02:34
dOxxxand the qconfig stuff can deal with that instead of a list of MergeTool objects02:34
dOxxxdoes python have sorted dicts?02:35
dOxxxhmm meh probably not the best way to do it02:35
dOxxxvila: okay I'll hack on this some more and see if I can simplify things.02:38
dOxxxvila: osx 10.6 installer is uploaded too02:38
viladOxxx: don't go too far in the other direction :) I'm fine with your mp with the few tweaks I asked for02:39
viladOxxx: I'm sorry it was so messy regarding the new config stuff that is still not there :-/02:40
viladOxxx: starting build here after a successful f_e -p -u02:41
viladOxxx: so if I read it right, I won't need to recompile qt after all ?02:41
dOxxxvila: you mean pyqt?02:43
dOxxxvila: I install Qt itself from a pkg downloaded from the nokia site.02:44
dOxxxvila: only pyqt is compiled during the installer build02:44
viladOxxx: yeah, I meant pyqt02:44
dOxxxvila: okay. you will have to compile that. there is a newer version.02:45
viladOxxx: err, required ?02:46
dOxxxvila: well, required in that riverbank computing don't keep anything but the must recently release tarball on their website02:46
dOxxxvila: so I'm kinda forced to update to their latest version each time I want to build the installer02:47
dOxxxvila: unless I maintain my own archive of their releases02:47
dOxxxwoops02:50
vilagrr03:01
viladOxxx: vm froze :(03:02
viladOxxx: so I got a pyqt 4.8.2 downloaded but not rebuilt it seems :-/03:05
vilaor not correctly as the build ends up with a link error in sip03:05
viladOxxx: ring any bell ?03:06
dOxxxvila: odd...03:06
vilaurgh, second build gave a different error :(03:07
dOxxxI had a problem with one of the tarballs I downloaded having a CRC error03:07
dOxxxso I had to zap all of them and redownload03:07
dOxxxsince I wasn't sure which one03:07
dOxxxbut after that it went through fine03:07
vilahmm, so you rebuilt from a clean plate :-/03:09
dOxxxvila:  pretty much03:11
dOxxx./build.py clean && ./build.py03:11
vilayeah :( third build raised the same error as the first :)03:12
vilabe back in a .... biggy ? :D03:12
dOxxxwhat is it?03:12
vilaforget it, I ran clean and restarted the build, I let you know if it fails03:13
vilait was about yyparse missing, smelly (yyparse is usually called from generated parsers)03:14
dOxxxo.O03:15
vilayeah, probably not worth debugging03:23
* maxb hugs KVM and vmbuilder03:28
vilamaxb: not funny >-/04:01
vila:)04:01
vilaI wish I could use kvm...04:02
dOxxxnight all04:04
viladOxxx: g'night, build just finished successfully04:05
dOxxxyay!04:05
vila:)04:06
maxbvila: awww.... cpu too old?04:07
vilamaxb: nah, gf's laptop not running ubuntu, so I need a vm to run it ! :D04:07
maxboh04:08
maxbI have a shiny new Core i7 Quad - need to find it some work to to :-)04:08
maxbI wonder how many concurrent guests it could manage04:08
vilamaxb: I use Ubuntu on my desktops and I'm hoping to migrate to kvm asap04:08
vilamaxb: that's what babune is using :)04:09
vilamaxb: hope you got an SSD too04:09
maxbnah, plain old spinning magnets04:10
vilamaxb: ooooh at >= 7200 rpm at least ?04:13
maxboh yes, 7200. I looked out for that carefully04:27
maxbWas very careful not to take the "free upgrade" to a bigger 5400 one04:27
fullermd7200?  Wow, how Dark Ages...04:28
senderHello, I did a bzr branch remote local --use-existing-dir and ended up with a .bzr dir08:45
senderNow I do an bzr checkout and get an Error 1708:45
senderError 17 = file exist08:45
senderanyone an idea08:45
sender?08:45
mgzsender: file a bug with the exact steps you did to get the error and the full traceback09:32
mgzyou can get those from your .bzr.log which `bzr version` will tell you where to find.09:33
sendermgz: thanks for the help, it seems that the branch operation never terminated succesfully as I didnt see '<> revisions ..' so it makes sense that a checkout wouldnt work. I've found a workaround. Thanks!09:35
awilkins#java09:36
peitschie_hiya pardners :)10:34
Nazcafanhello11:00
NazcafanI have to solve a conflict where a dev has modified a file and the other one has deleted it. I want to keep it deleted, how do I tell bzr to solve the conflict by removing the file?11:00
cjwatsonrm -f filename; bzr resolve filename11:07
pfarrellHi, I have a question. From years of using svn my brain automatically types version control commands as follows: "bzr -r106 revert" instead of "bzr revert -r106". bzr then complains that it doesn't know what the -r106 command is. Is there any way this can be fixed/changed/improved?11:34
pfarrellI type just about every bzr command wrongly the first time, for exactly this reason .. I find putting the options at the end very unnatural11:34
LeoNerdbzr doesn't mind the argument ordering...11:35
LeoNerdWhich version of bzr are you using? until recently, revert didn't take a -r argument at all11:35
LeoNerdbzr revert --help    and see if it lists -r11:35
pfarrell[pef@caoimhe-sid:~/src/libadjoint]$ bzr revert --help | grep -- -r11:35
pfarrell  -r ARG, --revision=ARG11:35
pfarrellit works when I 'bzr revert -r106'11:35
pfarrellI'm using bzr 2.3b211:36
LeoNerdOooh.. I see.11:36
pfarrellis this fixed in a newer version? should I upgrade?11:36
LeoNerdYes; you have to put the subcommand first, before its arguments...11:36
LeoNerdbzr -rwhatever command   won't work. :)11:36
pfarrellyeah11:36
pfarrellmaybe it's just me --11:36
pfarrellbut I find that's the biggest usability problem with bzr11:37
pfarrellbut maybe I'm just brain-damaged from years of svn11:37
LeoNerd-r106 bzr revert    also wouldn't work ;)11:37
pfarrellyes, but svn -r106 log works, for example11:37
pfarrell:-)11:37
LeoNerdThe trouble is that you can't parse the options until you know which subcommand it is.11:37
LeoNerdSo bzr has to know it's getting a "revert" command, before it can udnersatnd what -r106 means11:37
pfarrelltrue.11:38
pfarrellthe main bzr command could gather all of the -options it encounters before the command, and then pass them onto it11:38
pfarrellsvn subcommands take different arguments too11:38
pfarrelland I assume that is what it is doing under the hood11:38
LeoNerdIt couldn't do that easily, because how would it know which ones were split or not?11:38
LeoNerdbzr -abc foo11:38
LeoNerdIS that -a -b -c  ? Or is one of them taking a value?  -a -b=c  -a=bc ?11:38
pfarrellit doesn't need to know11:39
pfarrellstore "-abc" in a list of arguments, because "-abc" isn't a recognised command11:40
pfarrellnext argument:11:40
pfarrell"foo" is a recognised command, so push "-abc" onto its argument list, along with the rest of the sys.argv11:40
LeoNerdMmm. Perhaps it could do that. Currently it does not.11:40
pfarrell.. or something like that11:40
pfarrellI mean, it's not that hard to code --11:40
pfarrellit's just if the bzr development team actually approve of the idea11:40
LeoNerdBut then how might you handle   bzr -m revert commit file.c11:41
pfarrellhmm11:41
pfarrelltrue11:41
LeoNerdIt's less surprising to everyone, if we know the subcommand must be first. Everyone expects to find it there.11:41
pfarrellI wonder how svn does it11:41
LeoNerdSystems that are easy to predict are easy to use.11:41
pfarrellwell, thanks for the discussion11:42
maxbactually the way svn does it is to have a single set of options for all subcommands11:54
maxbthis is why certain options have hideously generic help - because there's only one helpstring shared for all subcommands11:55
maxbif's also why svn has so few single letter options - those are allocated globally too11:57
maxbpfarrell: ^^^11:57
pfarrellmaxb: right, thanks11:57
pfarrellI guess I'll just get used to it11:58
cjwatsonit was kind of a design decision in svn to enforce maximum possible option consistency across commands; it strikes me as difficult to do with bzr's extensibility11:58
cjwatson(but what do I know)11:58
=== oubiwann_ is now known as oubiwann
Nazcafanthank you cz13:15
Nazcafanthank you cjwatson13:15
zygahi13:29
zygaI have a branch on lp, whenever I try to push there with bzr+ssh I get readonly transport, bzr lp-login seems to return the right value, can I debug this somehow?13:30
zygahttp://paste.ubuntu.com/555772/13:30
zygathis is the last transaction in .bzr.log13:30
zygabzr plugins claims I have launchpad 2.2.113:31
zygathis is maverick on arm port13:31
=== oubiwann is now known as oubiwann_
zygaanyone?14:05
sobersabrehi.14:07
sobersabreI wonder how can I "merge" 2 repositories x and y into repo z, when both x and y will reside inside z.14:08
sobersabreboth x, y may have interleaved commits in the sense of timeline.14:08
sobersabrei.e. rev2 on x may happen before rev 3 on y, and rev 4 on y may happen before rev 4 on x.14:08
zygasobersabre: what do you mean by "reside inside z"?14:09
sobersabrelet's assume I have a folder /bzr/repos/dir14:09
sobersabreand I have in side it 2 dirs dir1 and dir2 each is a master branch inside dir.14:09
sobersabreI want to make /bzr/repos/all - a repository with dirs dir1, dir2, and it should contain the history of both dir1 and dir2 from /bzr/repos/dir/dir1 and /bzr/repos/dir/dir214:10
zygasobersabre: ah14:10
sobersabrezyga: do you understand me ?14:10
zygayou want to bzr join them14:10
sobersabreso what is the right way to do this ?14:11
zygasobersabre: I think you're right14:11
zygasobersabre: do any of the branches have common history?14:11
zygaif so you can just bzr merge them14:11
zygaand bzr mv them to place you want - you will retain whole history14:11
sobersabrezyga: what do you call "common history" ?14:11
sobersabrethey are unrelated, like project1 and project214:11
zygasobersabre: by common history I mean is A a branch of B, if no you will have to pass something to merge to make it work14:12
zygabut it will retain all history, I did something like this before14:12
sobersabreboth are MASTER branches, not bound to anything, and are not derivatives of neither of the other.14:12
sobersabrezyga: what do I have to pass merge ?14:12
zygasobersabre: afair -r 114:14
zygasobersabre: bzr merge will complain that branches are unrelated and needs some 'common part', I don't remember but that helped me14:15
cjwatsonthere's also a merge-into plugin14:17
cjwatsonif it were me I'd try both 'bzr merge-into' and 'bzr join', and see which one works more as you expect for ongoing merging over a period of time (assuming you care about ongoing merging)14:18
dejjhello everyone14:24
dejjI wondered if you know of anybody having developed a php-skript that allows uploads and commits to a bazaar branch?14:26
zygadejj: why would you use php? bzr has a python library with that api14:27
dejjI need to plug it into a repository viewer (Trac maybe), so my users don't need to install bzr.14:29
dejjWhat's that library called?14:29
zygadejj: trac? trac supports bzr out of the box AFAIR14:29
zygadejj: what do you want your users to be able to do?14:30
dejjcan you do uploads via the browser?14:30
zygadejj: uploads of what? commits?14:30
dejjyes14:30
zygadejj: trac is not designed to do that14:30
dejjthen I need to make it do that14:31
zygadejj: well then you are lucky, bzrlib and trac are both written in python, no php required14:31
zygadejj: is this for source control of a software or something else? I don't understand why developers would not just use bzr directly14:32
dejjmy users aren't developers ;-)14:32
dejjwe're currently using Microsoft Sharepoint's web interface to organize files14:32
zygadejj: are you planning to store large binary files?14:33
dejjunfortunately you can't move any files there and "checkout" means "lock" and it's a total mess14:33
zygadejj: there is a piece of software that gives you transparent versioning on top of webdav14:33
zygait's much better than web browser "forms" for doing uploads b14:33
zygabut I'm afraid bzr is not someting that you want to use for sharepoint replacement14:34
dejjwhy not?14:34
dejjsorry for that broad question14:35
zygadejj: it's not designed to do that, depending on the amount of data you want to store you might not find something that will scale with your needs14:35
zygabzr was designd to version source code, not random files of arbitrary size14:35
zygaif you want to use that btw, it's easier to just use the shell integration14:36
zygaso people can commit and update from right-click menu14:36
dejjthat would be step 2 in my plan. I can't yet get them to install anything on their computers14:37
zygait would certainly be easier if you want to let them share files, zero development time for you14:37
zygamay I ask what is the size of the dataset they will work with?14:38
dejjit's not enterprise-sized (yet). about 500mb should be the limit14:38
zygadejj: 500 of _everything_ _ever_ or just one file that you want to store?14:39
sobersabrecjwatson: if you were talking to me, I want to migrate from having N master branches to 1 master branch, and checking it out or branching it properly.14:39
dejjeverything ever14:39
zygayou may also find that http uploads are not the best way of uploading files due to the way http was designed14:39
sobersabrethis would ease some deployment stuff.14:39
zygadejj: in that case it will proably work fine14:39
dejjthe problem I'm working around here is actually my users being dead-afraid of anything new in IT.14:40
cjwatsonsobersabre: well, the tools I mentioned are the options I know about, anyway (though not a bzr developer)14:40
dejjthey know web-uploads, so I have to get them there14:40
zygadejj: trafficking  new software via browser is not really something that different from just installing it for them14:40
zygadejj: if you do this in the open (the upload-via-web) you might get some help from us14:41
pooliehi all14:42
dejjzyga: I already wrote a buggy script. I does "bzr status", then moves the file, does "bzr add" and "bzr checkin" and that's it. It still makes many assumptions to the environment14:42
dejjzyga: so I thought someone must've that figured out before14:42
zygadejj: in php?14:43
dejjzyga: unfortunately I don't speak python14:43
zygadejj: I would encourage you to use bzrlib directly and write this in python with one of the web frameworks14:43
zygadejj: otherwise it will fall apart quickly14:44
zygadejj: you need to handle several error situations14:44
zygadejj: and stuff like locks, etc14:44
dejjzyga: indeed. and you're saying that bzrlib makes this easier than going with php?14:46
dejj(bzrlib + cost of learning python) that is14:46
zygadejj: well bzrlib _is_ bzr14:46
dejj0.o14:46
zygaphp is most likely the bad approach14:46
zygaand using bzrlib you can just implement this properly, you can look at things like loggerhead to see how to build a web app that integrates with bzr repositories14:47
zygaso you will have lots of code to get you started14:47
dejjthat sounds so nice14:47
zygadejj: apart from a new language and learing about bzrlib enough to commit new files you will have lots of the code already done14:48
dejjthe dark side (php) is still very tempting, as my users are currently deleting and re-inserting files in sharepoint. and when they're done they will complain to me that their changes are not consistent with each other14:51
dejjyou said > there is a piece of software that gives you transparent versioning on top of webdav14:51
=== Ursinha-afk is now known as Ursinha
dejjzyga: which is that piece of software?14:54
=== oubiwann_ is now known as oubiwann
zygadejj: re, sorry? which software is that?15:17
dejjzyga: I don't know what you were referring to when you said: "there is a piece of software that gives you transparent versioning on top of webdav".15:23
dejjdid you mean bzrlib?15:23
zygaah no15:24
zygayou can see variour projects like trac that intefrace with bzr repos to get you stated15:24
zygaI mentioned loggerhead15:24
zygait's the thing that shows you bzr branches on launchpad15:24
zygaI personally hacked on redmine (written in ruby) to do something similar15:25
zygaand I could not use bzrlib so I scripted bzr invocations15:25
dejjloggerhead really looks nice. it's just that I have a trac set up to work with bzr that I thought of hacking into that15:25
zygatrac is good too15:26
zygatrac has bzr integration, it might be in the core or in a separate plugin15:26
dejjzyga: thanks for your help, I'll definitley look into how to use bzrlib to replace my php skript15:28
mbtzyga, you've worked on Redmine for bzr support?16:21
maxbsobersabre: join accomplished? Disregard bzr merge-into unless your branches are stuck in bzr 1.x formats16:27
=== beuno is now known as beuno-lunch
cjwatsonmaxb: ah, I didn't know that, sorry for the misdirection16:59
zygambt: re17:07
zygambt: I need to go out for 20 minutes17:07
zygambt: but in short, I took what upstream redmine ships and adapted it to work much better with bzr at the time17:08
zygambt: if you want to know more, stockpile questions here, I'll answer when I return17:08
=== frakturfreak_ is now known as frakturfreak
mbtzyga, absolutely, thanks17:09
mbtzyga, I'm trying to put together an SCM module for Redmine to use bzr shared repositories, but I'm running into a few problems.  To start, I have a few comments on http://www.redmine.org/issues/2799 (starting at comment number 20: http://www.redmine.org/issues/2799#note-20)17:11
mbtzyga, What I have come to is that in order to make things work at all, I think redmine needs additional changes (unless those "changes" can be isolated in the model class, I'm not sure). bzr only needs one thing added to it to make it work efficiently (but it will work without it)17:17
zygambt: I need to look after my kids, let me review that ticket, what changes did you find necessary?17:42
zygambt: I think that typical shared repo can be mapped to git or svn model with more-than-one branch easily17:42
zygambt: if you want I would gladly work on a patch to redmine to get best-of-class bzr support17:44
mbtzyga, It seems that git allows you to pass revision identifiers directly to the repository, thereby enabling Redmine to pass a branch ID or a revision ID and git understands it and can return the requested data.17:45
mbtzyga, Subversion of course uses its own thing, where the repo is treated as an opaque container; that is, Redmine does not attempt to figure out what's a branch and what's a revision, and just treats the whole thing as a list of revisions.17:46
mbtzyga, For bzr, the git model won't work since of course certain operations cannot be performed on repositories.  The Subversion model would work, but then one could not support branches as independent browsables and also this would break Redmine's expectation that a single revision number will always map to a single changeset.17:47
mbtWhat I'm trying to do is get both support for branches in a repo (using the branches dropdown in the Redmine UI for SCM systems that support it) and be able to work in the context of a branch when browsing revisions.17:48
mbtzyga, So, what it would seem to me is that in order to make it work in the "ideal" situation, Redmine needs to have a concept of browsing in the context of a branch, without making the assumption that a branch can be treated as a revision.17:49
mbtzyga, But if that happens, then it'd seem that the goal of implementing proper support for Bazaar would require working on Redmine's core, followed by updating all of the other SCM modules to work with the updated core, and then writing a Bazaar module that can support it as well.17:51
mbtWhich I don't mind doing, or collaborating on, but I want to be absolutely sure that it's required, because that's pretty invasive work.17:51
zygare18:00
zygambt: you don't need to use revisions18:01
mbtzyga, what do you mean?18:01
zygambt: or more accurately revnos, you should just use revids18:01
zygambt: bzr and git are identical in what they store and express18:01
mbtzyga, Still, same problem, you have to refer to them within the context of a branch18:01
mbt"bzr log" doesn't work on a repo; "git log" works on a repo18:02
zygambt: the only thing that might be confusing about bzr is that most of the time people operate on revnos - numbers - sometimes in dotted decimal notation18:02
zygambt: ah, right18:02
zygambt: but you can 1) use bzr revids to map to actual changesets18:02
zygambt: and use bzr branches or something similar to discover branches in a given shared repo18:03
mbtzyga, Redmine expects to be able to query the repository directly and doesn't pass along which branch the user is working in18:03
mbtAt least as I understand it.18:03
mbtzyga, I noticed that there is two URL properties that Redmine can use, but the CVS modules are the only ones that use them both (root_url and url)18:03
mbtBut it looks also like they're both expected to be static, so it's not like they could be used to work with branches, I don't think.18:04
zygambt: I don't remember that detail, I did this about a year ago (first attempt) and 6 months ago (second attempt)18:05
zygambt: but you can map the thing that redmine operates on to anything oyu want18:05
zygambt: so you can easily pass branch + revid18:05
zygambt: it's not relevant to rednime, only your scm adapter works with that18:05
zygambt: the way I set this up was:18:06
mbtzyga, The question is "how?".  e.g., when loading a git branch "master", redmine passes "master" as the revision ID.18:06
zygambt: point the repo url to the bzr branch _OR_ bzr shared repo18:06
mbtThen when you browse to a changeset, Redmine passes just the changeset ID.18:06
mbtbrb18:06
zygambt: hmm, interesting, I did not look at git implementation to be honest, perhaps it just stores that as a cookie somewhere18:06
zygambt: the key point to look at is the git scm adapter18:06
zygambt: I'm confident it can be mapped 1-to-1 to bzr operations18:07
zygambt: things like "log for repo" can be emulated as "log for each branch in repo" on the adapter18:07
zygambt: it really depends on what kind of semantics you want to have18:07
zygambt: I'm not a daily git user so I don't know what each command does from the top of my head18:08
mbtback.18:09
zygambt: I have a fork of redmine somewhere that fixed several annoyances I found18:10
mbtzyga, From reading through the git adapter, everything is just a revision ID.  tag names, branch names, and revision IDs are all passed using the exact same mechanism, the revision.18:10
zygambt: and we can easily hack the missing bits (repo support et all)18:10
mbtThe svn adapters seems to work the same way, but then again the svn adapter isn't branch aware because of the way svn users operate18:10
zygambt: in git the changeset is just the sha1 of the commit, I suspect that's all git needs, but branches are different, you can have any number of branches pointing at the exact same commit, does redmine care about that?18:11
zygambt: let me find my code first - just a moment18:11
mbtzyga, nope, it just pulls the revid.  because git doesn't care about it, redmine doesn't have to.18:11
zygapulls? do you mean when rednime scans the repository for new stuff?18:12
=== beuno-lunch is now known as beuno
mbtzyga, right, redmine just does a "git log" at the repo level18:12
* zyga woke up the redmine server in his attic18:12
zygambt: interesting, what is the order of operations in that case? IMHO a "log" on all branches is meaningless18:13
zygagithub does not show a log for every branch, you select the branch first18:13
zygambt: do you want to work with git or bzr now?18:13
mbtzyga, redmine just caches the changesets18:13
zygambt: right I know18:13
mbtzyga, git will happily show you the changesets for a repo it seems18:14
mbtor maybe that's just git defaulting to showing the changesets for only the "active" branch18:14
zygambt: bzr will do the same internally18:14
zygambt: we could even write a smarter adapter for bzr that talks directly to bzrlib18:15
mbt<mbt@aloe> ~/Projects/redmine $ bzr log18:15
mbtbzr: ERROR: Not a branch: "/home/mbt/Projects/redmine/.bzr/branch/": location is a repository.18:15
zygambt: and talks to redmine over a pipe or something like that, I remember that importing bigger history was very slow18:15
zygambt: not like that, at the API level it's the repository you talk to18:15
mbtzyga, I started an adapter along those lines to find all branches18:15
zygambt: is your code online?18:15
zygambt: I will happily hack with you18:15
mbtnot yet (the .py adapter to pull what's what out of a repo is, it's in Redmine Issue #2799)18:16
mbtAlso I can push what I've been toying with but it's just Redmine trunk with a nonfunctional bzr adapter18:16
mbtlol18:16
zyga:-)18:16
mbtzyga, do you have ipv6?18:17
zygambt: nope18:17
zyga;-) why?18:17
mbtbecause if you did I have it on an IPv6 host and could bzr serve it18:17
mbtbut no worries18:17
mbtI'll push it to a host with a public IPv4 address18:17
mbthow do launchpad junk branches work? I should be able to do it that way right?18:18
zygambt: if it's bzr you can18:18
zygaexactly18:18
zygait's bzr push lp:~yourlaunchpadid/+junk/anythingyouliek18:18
mbtk 1 sec18:18
zygaI found my adapter18:19
zygait's really nothing special, just cosmetic changes over the trunk at the time18:19
zygathe better adapter (unfortunately) stayed at samsung :/18:19
mbthttps://code.launchpad.net/~mtrausch/+junk/redmine-bazaar-sr18:20
mbtgive LP a few minutes to catch up with it tho lol18:20
zygagetting it now18:21
zygano, the branch is ready, only UI is lagging18:21
mbtIt is ugly, nonfunctional code though18:21
zygais there a bzr mirror of the upstream redmine tree anywhere?18:22
mbtmostly just experimenting.  I stopped with this to investigate how both svn and git work18:22
zygaI'd like to be able to rebase against that finalley18:22
mbtzyga, no, I have a copy that I svn-imported though18:22
mbti can push that as +junk/redmine-trunk if you want18:22
zygambt: svn? AFAIR redmine used something more recent? mercurial?18:22
mbtzyga, no, they officially use svn with a git mirror somewhere18:23
pooliejelmer, what were the things i said i'd do? just clean up that code, or was there something else?18:23
zygambt: d'oh18:23
mbthttp://redmine.rubyforge.org/svn/trunk is the svn repo18:23
mbtwell subtract /trunk from the end of that18:23
zygambt: well the git mirror is nice then, it's better than svn :)18:23
mbtlol18:23
mbtI avoid git like the plague if I can. I can't wrap my mind around many of the things it does.18:23
mbtTook me 45 minutes yesterday to figure out how to actually clone with it, since clone with no args but a repo doesn't actually clone18:24
zygambt: I dont' use git daily but yeah, first encounter is hard18:24
zygambt: but bzr-git is working well enough that you can just bzr get any git repo18:25
mbtTo figure out how redmine worked with git, I got a copy of cakephp from github and used that to stufy18:25
mbt*study18:25
mbtThat's how I learned that everything is treated as a revision to redmine18:25
mbtIt seems that the two key things are (a) revisions are expected to be repo-wide and (b) branches are expected to be revision pointers18:26
zygagot it, diffing my parts now18:26
mbtI could be, and sincerely hope I am, wrong.18:26
mbtOn both parts.18:26
zygagive me a moment18:26
mbtkk.18:26
zygafirst thing I noticed: i removed the concept of revno as integer (it's not)18:27
mbtright, it can be a 3-decimal number too18:28
zyga?18:28
zyga3 decimal?18:28
mbtx.y.z18:28
zyga1.2.3.4.5.6.7.8 it can go as log as you need18:28
mbt(branched-from, branch-sequence-number, revision)18:28
zygait's not bound AFAIR (bzr guys can correct me here)18:29
zygahmm?18:29
mbtzyga, In older versions of bzr, you're correct18:29
zygaare you sure?18:29
mbtzyga, 1 saec18:29
mbt*sec18:29
zygahow do you assign b-seq-number18:29
mbtzyga, since bzr 1.2 it changed:  http://doc.bazaar.canonical.com/bzr.dev/en/user-guide/zen.html#understanding-revision-numbers18:29
zygaon each merge?18:29
zygahmm :)18:30
* zyga learned something new today18:30
zygambt: looking at your branch18:31
zygaone thing that redmine messes up is commiter vs author18:31
zygagit has the same issue (or did last time I checked)18:31
mbtzyga, Also, I noticed that the current bzr handler has problems with filenames with spaces18:32
mbtit does not use "bzr ls --null" and the non --null output uses spaces for field separation18:32
mbtIf only redmine were done in python... lol18:33
zygahmm18:33
zygaheh, yeah ;-)18:33
zygawell my changes are not perfect, let me see how that works18:34
mbtIt is this concept that I think is the most difficult to represent in Redmine: http://doc.bazaar.canonical.com/bzr.dev/en/user-guide/zen.html#each-branch-has-its-own-view-of-history18:35
zygambt: that's _somewhat_ the same as any other vcs? (I did not read the url yet, just looking at the title)18:37
zygambt: is it about branch is a sequence of revisions?18:37
spivmbt: well alternatively you could say that each revision has its own view of history18:37
mbtWell, in svn revno 5 is the same across all branches.18:38
spivmbt: a branch at a technical level is essentially just a record of the current tip revision-id, plus some minor details (like the 'nick' and other settings you can store in branch.conf)18:38
mbtIn bzr, revno 5 can be different in every single branch (though often it is not).18:38
spivmbt: well, forget revnos then, and just deal with revids18:39
zygambt: in bzr revision id is also the same (AFAIR)18:39
mbtYes, but then there comes the question of mapping it.  Redmine only allows one piece of data to be stored for a changeset in a repository, as I understand it.18:39
zygambt: exactly, revid is ~~ same as in git18:40
zygambt: and it should be revid18:40
=== vila changed the topic of #bzr to: Bazaar version control | try https://answers.launchpad.net/bzr for more help | http://irclogs.ubuntu.com/ | Patch pilot: poolie | 2.3b5 is officially out! (rm vila)
mbtIOW, using revision IDs would mean presenting them in the UI, AFAICT.18:40
zygambt: we can think how to _render_ the revid later18:40
zygambt: but that's okay, revids _ARE_ a part of bzr today18:40
mbtWell, first things first.18:41
mbtRedmine queries the repository for revisions, not each branch.  Since that cannot be done in bzr directly, either the adapter has to call bzr for every branch and add to the DB if the changeset is not present, or a Python module would do effectively the same thing but simplify the Redmine adapter code.  Is that right?18:42
zygambt: the adapter can map revids to branches somehow too18:43
zygambt: I'm pushing my branch to lp:~zkrynicki/+junk/redmine-bzr18:44
mbtSeems the bzrlib.repository.Repository class has a method all_revision_ids(self) that would be useful, but it's deprecated.18:44
zygambt: I'll need a moment to setup my working space for redmine on this system, for various reasons I'm using plain text console and no X18:44
Ramosawhy not #bazaar18:44
mbtRamosa, are you suggesting a change of venue for this discussion?18:45
Ramosai was idling in there for some hours before i figured it out :-p18:45
zygaRamosa: bzr is shorter, that's as good as it gets18:45
Ramosauhm.. i type faster if i can actually pronounce it :)18:46
mbtI should file a bug on bzrlib.repository.Repository.find_branches18:46
zygait's beeziar18:46
zygafor me at least ;-]18:46
Ramosabazinga18:47
zygambt: what's the problem with that API?18:47
mbtFor the svn-import'd redmine module, find_branches(False) takes like 4 seconds to run.  But it should be able to return near-instantly.18:47
mbtzyga, they seem to have a policy of not storing derivable data18:47
zygambt: hmm, interesting, what does bzr store in that case? I never used bzr-svn repositories before18:48
mbtzyga, It's the same for all shared-repos18:48
mbtzyga, They probe the filesystem to find branches18:48
zygambt: I thougth that all you need to get revisions is to scan for subtrees with .bzr and figure out the type of bzrdir18:48
mbtzyga, Instead of storing a list of known branches in the repo's .bzr dir18:48
zygambt: right18:48
zygambt: ah I see what you mean18:48
mbtWell, you have to scan for subtrees and then see if they are part of the repo (e.g., using the repo for storage)18:49
Ramosai can't decide how to use bazaar as a single developer, 2 pc's (windows) .. if to develop locally, and then somehow merge when both computers are on, or invest in a server (not online, has to be hosted at me)18:49
zygambt: it's probably more complex in that case18:49
mbttis possible to have a  branch within a branch that does not18:49
zygambt: git uses identical model18:49
zygambt: but just looks at one directory18:49
Ramosai presume bzr+ssh doesnt work on windows18:49
zygambt: it's still a branch18:49
mbte.g., bzr *could* explicitly store a branch list (because shared-repo branches are created by bzr or bzrlib itself)18:49
zygambt: then you need to decide if you look for _any_ branches or just branches in a shared repo18:50
spivSee the bzr-colo plugin, for example.18:50
mbtbut it chooses not do, because that information can be derived from what's on the filesystem18:50
spiv(which colocates multiple branches in one directory, similar to how git is used)18:50
zygaspiv: what do you mean18:50
zygaspiv: right, I use it daily18:50
mbtspiv, goal is to add support for bzr without requiring any plugins18:51
zygambt: it's not a plugin that adds new magic foo, it's just new UI18:51
mbtrather without requiring any bzr plugins18:51
zygambt: the plugin uses all the existing stuff from bzr18:51
spivColocated branches of some form will become part of the core.  Most of the code and APIs have already landed.18:51
spivThe core basically just lacks the UI at the moment.18:51
mbtthough if it can be done with nothing other than bzrlib, shipping a helper .py module with redmine is probably not out of the question18:52
zygambt: that's exactly the case18:52
mbtbut then what happens when you push multiple branches.18:52
zygambt: but you must define what redmine will show in that case as bzr has no 'standard' colocated format yet18:53
spivObviously that doesn't help you much if you want to stick to features already released, but in case you are comfortable with dealing with features that are coming in the near future you can rely on colo stuff.18:53
zygambt: you push multiple branches, that's all18:53
mbtspiv, I (personally) am not concerned with pre-2.0 compatibility18:53
zygambt: you push to a colo-ified place, it just works18:53
mbtzyga, without the colo plugin installed on the server side?18:54
zygambt: not really18:54
zygambt: but I'm not sure really18:54
zygambt: I don't know how bzr works on the smart server case18:54
zygambt: remember that colo does not add _any_ new features18:54
zygambt: it's just UI18:54
mbtI know this much: I push and pull to bzr+ssh all the time in our environment18:54
zygambt: the only tricky part is the initial repository (colo repository) layout18:55
mbtBeing that this should work for stock setups18:58
mbtdamn enter button.  Being that this should work for stock setups, a colo repo would be good if completely transparent, but probably not otherwise18:58
zygambt: IMHO there is no need to rely on colo today18:59
zygambt: apart from ensuring that redmine will pick up the colo-ified repo and work as expected18:59
mbtzyga, agreed18:59
* zyga remebers the pain of setting up redmine on ubuntu the first time19:00
zygaeh ruby community :/19:00
mbtzyga, Getting redmine running for me was actually not bad19:01
zygambt: well you can apt-get install it easily19:01
zygambt: unless you want to run trunk that is19:01
mbtRunning trunk is what I am doing19:01
mbtright out of the repo19:01
zygaI did not manage to get this working without using gem directly19:01
mbtwell, branch19:01
mbtlol19:01
mbtI just aptitude installed ruby and then gem installed rails and I think that was it19:01
zygahmm, I was using lucid and before that .... what was it? :-) anyway I had to update a lot of gems19:02
mbtMy desktop is always running the latest stable or latest+1 testing releases19:03
mbtlol19:03
mbtBut I'm just running in-tree with ./script/server19:04
zygaI'll be right back19:04
mbtk19:04
mbtI know that in the adapter, Redmine wants revisions to work at the repo level.  Seems that bzrlib.repository.Repository.all_revision_ids() works, deprecation aside19:10
mbtSo, a .py helper could easily pull all changesets.  Though I'm sure that also includes ones that don't exist in any branches any longer.19:10
mbt-mobilewhen you select a branch in the redmine UI, it populates the revision field with the branch name, and submits.19:14
mbtzyga, welcome back lol19:20
zygambt: right ;)19:20
zygambt: it seems current trunk does not work with maverik deps, I need one more moment to setup my instance19:20
zygambt: I pushed a branch based on your work19:20
mbtSo it's possible to query all revisions in a repo and theroetically use that information to populate Redmine's database19:20
zygambt: sure19:21
mbtBut what's not possible (either at all, or efficiently) is to reconcile the repo's stored revisions with the database and Redmine wants the ability to check to see if a repo has new revisions or not19:21
zygahmm19:21
zygaright that part sucked19:21
zygaredmine used revnos to see if there's somethinhg new19:22
zygawell19:22
zygayou can do this19:22
zygafor each repo19:22
zygasorry, start over19:22
mbtgit's adapter handles it by checking (based on date) the repo revisions19:22
zygafor each brach, for each revision, import changeset19:22
mbtBut I see nothing in bzrlib to do the same thing at the repository level.19:23
zygawe can store the revid of the tree assuming that the tree does not changes (think --overwrite)19:23
mbtIf Redmine treated branches as if they were first-class subordinates of a repository, that would work.19:23
zygaperhaps it's better to patch redmine more then19:23
zygaI don't know bzr internals that good, is it possible to efficiently terate revisions that happened after a specific revision?19:24
mbtBut it appears that Redmine thinks of revisions as first-class subordinates of repositories, and a branch as a pointer to a changeset19:24
zygaif so then we can do that easily19:24
zygambt: probably because it's git/svn centric today19:24
mbtzyga, Within the context of a branch that appears to be the case.19:24
mbtWithin the context of a repository it appears to be possible but only after loading all changesets and figuring out the relationships between them.19:24
mbtwhich, for a repo the size of my typical projects might not take that long, but e.g., for a repo with MySQL would probably take literally forever19:25
zygambt: are you sure, you just do the same for each branch19:25
zygambt: remember, you just _add_ changesets lazily19:26
zygambt: you iterate over them in bzr branch19:26
mbtRight, but I don't think Redmine uses the data in the VCS itself for display19:27
zygambt: for revision in branch.revisions_since(last_imported_revision_for_this_branch): if revision_not_in_redmine: import_revision(revision)19:27
zygambt: what do you mean19:27
mbtI think Redmine will use the output of the VCS tool to determine if (a) its changeset database is up to date and (b) possibly to render a tree for a specific revision19:28
mbtas well as for cat, diff, and annotate operations19:28
mbtBut to display changesets I think it leans upon its own DB19:28
zygayou are correct19:29
zygaI found one issue though19:29
zygafor listing files it relies on bzr ls19:29
mbtYes.19:29
zygaand that does not provide file sizes19:29
mbtNo, it does not.19:29
zygawithout custom python module you cannot get this information19:29
mbtThe more and more I think about this, the more I think that proper support will (no matter what) include a helper .py19:30
zygayeah, I feel the same19:30
zyga_OR_19:30
mbtDumb question19:30
mbtCan one embed Python into Ruby?19:30
mbte.g., if one is using bzr, then it's a given that both Python and bzrlib are installed19:31
zygaa new bzr subcommand that exposes some crappy xml or other data structure as a standard bzr feature19:31
zygambt: not that I think19:31
zygambt: I think an rpc/pipe method is the best way of doing that without something that can break easily19:31
=== Ursinha is now known as Ursinha-afk
mbtIs it possible to, say, use the bazaar adapter class to load Python and "thunk" between Redmine and bzrlib?19:31
zygambt: think about the plethora of python/ruby implementations19:31
mbtRuby is all new to me, so I don't know.19:31
zygambt: I'd explicitly pipe that to the helper19:32
mbtBefore five or six days ago, I'd never looked at a single line of Ruby code.19:32
zygaseparate process19:32
mbtSo, maybe create something like bzr, but that can be IO.popen'ed and provide a chatty interactive session-like wrapper around bzrlib?19:32
zygahmm it's also tricky19:33
zygayou must remember that redmine itself may run on number of servers19:33
zygain various thread/process config19:34
mbtRight.19:34
mbtWhich also means that it might access a bzr repo over-the-net19:34
zygaI'd say that to be safe and efficient the python part should run19:34
mbtIt still requires bzr on the same host that redmine is on, which means that it's a given that python and bzrlib are available.19:34
zyga(just like that, like a daemon, or via apache+python, and expose simple xml/json-rpc19:34
zygambt: not really, you could even package the program as an exe file for windows, it's just something you can later call from ruby19:35
zygathis way you avoid spawing random number of processes19:35
zygaand can also scale the bzr part as you normally do with any other web app19:36
mbt-mobileit spawns bzr / git / svn anyway19:36
zygaand in the future this might be a part of something like bzr plugin that you can just bzr redmine-serve19:36
zygambt: currently, it does need to (it's actually very slow exactly because of that)19:36
zygambt: you can just call xml-rpc instead, no loading of python and processing tiny bits of data in one go19:37
mbt-mobileone page view of an up to date git repo calls (via shellout) git ~ 10 times19:37
zygambt: git is native, it loads faster, python will gain more speed if you keep it running19:37
zygambt: and just do 10 xml-rpc calls19:38
* zyga runs away for another moment19:38
mbt-mobilei thought git was in perl with some c19:38
mbt-mobilekk19:39
mbtWell, for now, I think that any way it can be done is good.  This is, IMHO, one downfall of bzrlib being written in Python; it's not terribly easy to use it from other languages.  If it were just a single .so using the C ABI...19:47
mbtSo, if a helper module is going to be required in any event, I suppose the thing to do is figure out exactly what its interface needs to be so that it supports all of the things that Redmine wants.19:50
mbtAnd in a way that redmine wants.19:50
mbtFrom my read-through, each adapter in Redmine can/should have the methods:  info, entry, entries, branches, default_branch, properties, revisions, diff, cat.19:52
mbtModels are expected to have: branches, tags, properties, cat, diff, relative_path, latest_changeset, latest_changesets, and possibly others.19:54
=== Ursinha-afk is now known as Ursinha
mbtbzrlib.branch.Branch.revision_history() provides "[the] sequence of revision ids on this branch", so that can be used to see the ordering of the commits.19:58
mbtConversion of revision-ids to revision-numbers appears to be a somewhat expensive operation as well (using Branch.revision_id_to_revno for all of the revisions in a repo) so doing that frequently would not be a good idea20:02
zygambt: re20:25
mbtzyga, hrm?20:27
jelmerpoolie: sorry, didn't see your message on IRC earlier20:28
jelmerpoolie: I don't think there was anything else than what you already commented in the MP.20:28
zygambt: how do you know that revno<->revid conversion is expensive?20:36
zygambt: we could cache the revid but I'm not sure it's stable20:37
mbtBecause I am playing with the library20:37
mbtGetting all revids is very fast20:37
mbtconverting a single revid to a revno is apparently fast, but doing so for nearly 4,000 revisions took long enough that I Ctrl+C'd it20:37
mbtIt ran at 100% CPU for at least 1 minute20:38
mbtWhat I am trying to do now is see if I can write a handful of functions to go in a helper module that will do what Redmine expects, but before I can do that I have to get a little more familiar with bzrlib20:39
mbt-mobilei expected to use bzr but as you noted it does not output all of the info needed to work with branches w/o working trees20:40
zygambt: I see20:41
zygambt: perhaps some bzr hackers could tell us what's the best way to approach the problem20:41
zygambt: did you check if bzr log is faste than what you called?20:41
mbt-mobilenot yet.20:41
zygambt: bzr log does convert revisions20:42
mbt-mobileit does but it also blocks on terminal io20:42
zygambt: or perhaps, bzr log cheats and walks a well-known tree  of revids somehow, that would be nice20:42
spivbzr log -n0 has to calculate the revno for every rev.20:42
zygambt: sorry about being away all the time, kids.sleep() raises exceptions ;-)20:43
mbt-mobileLOL i know the feeling20:43
zygaspiv: what is the complexity of such operation?20:43
mbt-mobilemine is down for  a nap20:43
zygaspiv: and is there any way to cheat20:43
spivzyga: not linear, but I can do "bzr log -n0 > /dev/null" of bzr in less than 5.5s (33787 revs, mostly in non-mainline revs from many merges, some quite large)20:45
mbt-mobilehrm20:45
spivAnd log is of course doing a bunch more work than just calculating dotted revnos.20:45
mbt-mobilewill be back @ comp in just a sec20:45
zygaspiv: is the number stable, once calculated?20:46
zygacan we just cache it20:46
spivNo, a revid's revno in a branch can change depending on future merges.20:46
mbt-mobileno, uncommit and overwrites can reorder20:46
spivmbt-mobile: well, you can disallow those cases by setting append_revisions_only on a branch...20:47
zygaspiv: right but if overwrite or uncommit happens we can purge the cache20:47
mbt-mobilespiv how does a merge afect revnos? crisscrossing or something?20:47
zygaspiv: that's not something that happens daily20:47
spivYou may be interested in the bzr-history-db or bzr-historycache plugins.20:48
zygahmm20:48
zyga(smarter)20:48
zygaif it caches that on bzr side it makes our interface simple and our db uncomplicated20:48
Ramosabeing a single developer, would you have branches?20:48
spivzyga: for the duration of a read_lock bzr caches lots of stuff20:48
mbt-mobilecan bzr be called w/ an arbitrary plugin dir?20:48
zygaRamosa: nobody talks about single developres20:48
spivzyga: that makes this sort of thing pretty quick typically20:49
zygaspiv: I see20:49
zygaspiv: frankly I think that having a helper service with some rpc api will fix performance20:49
spivmbt-mobile: yes, see BZR_PLUGIN_PATH and BZR_PLUGINS_AT env vars in the doc20:49
mbt-mobileramosa: i use branches on solo projects all the time20:49
zygaspiv: running bzr for each and every revision all the time is slow20:49
spivDoing things one revision at a time is slow.20:50
zygaspiv: well redmine scm integration for bzr is in need of love, that's the way it works currently20:50
mbt-mobilezyga, helper svc would be a nice improvement later i think20:51
mbt-mobileredmine needs tighter vcs integration, too.20:51
zygambt-mobile: what do you mean by tighter?20:52
mbtCalling any binary 10 times or more (or any binary once that takes a long time, like an initial page view of a git repo) adds time to each request, obviously.20:52
mbtzyga, I mean interfaces other than IO.popen for all of them.20:53
zygambt: right but solving that for all things in ruby is hard20:53
zygambt: I don't know of any native binding for scms and rub20:53
zygambt: I'll try to setup django xml-rpc app that gives you the same primitives as redmine requires20:54
zygambt: I'll see how that works20:54
mbtzyga, I know that for Python, I'd write Cython libraries as extension modules to call (at least for C-language SCMs) into the SCM library directly, for compiled ones that have an .so or can be ldopen()'d.20:54
zygambt: well ruby and python == fail20:55
zygambt: git has no c api20:55
zygambt: bzr and hg use python20:55
zygambt: svn has api so that might work but svn is the old guy that only old people talk to ;P20:55
zygambt: darcs and others are too exotic20:55
mbtzyga, can't C code also call Python code?20:56
zygambt: or have dedicated "export" stuff20:56
zygambt: it's not that simple20:56
zygambt: python and ruby use different gc20:56
zygambt: I'm pretty sure that attempting to bridge them would be very hard20:56
zygambt: signals, threading, gc - all of that is hard to bridge, especially since both use different methods for that20:57
mbtzyga, I remember reading about a (I think) Python to Ruby bridge, but that's the wrong direction anyway.20:57
zygambt: jython and jruby are closer20:57
mbtIDK if Redmine will run under Jruby, but bzrlib doesn't work under Jython.20:57
GaryvdMzyga, mbt: I'm not sure what data you trying to get from bzr,  but maybe there is a way to get what you want with one subprocess call (or at least less than ten)?20:59
GaryvdMor use a deamon of sorts...20:59
mbtGaryvdM, Redmine could, for that matter, cache the output of a single command for the duration of a single request.  A lot of these hits are the same command 8 times in a row or something insane like that.21:00
* GaryvdM open log to get context.21:00
mbtGaryvdM, it'd only have to be called once if the result were cached, but that is an optimization to be made in Redmine itself, not its VCS interface, I'd think.21:00
zygambt: oh, that's not good21:01
mbt(e.g., Redmine could subclass IO.popen and when it notices that the same command is going to be called again, assume the call is idempotent and return the value from the last one, instead of creating a subprocess)21:01
mbtOr maybe whitelist certain idempotent commands.21:02
mbtBut again, not my focus today.21:02
zygalifeless: jython anyone?21:02
zyga;-)21:02
zygaI'm sure bzr will work with jython21:02
zygaGaryvdM: that's our plan now21:02
zygaGaryvdM: wrap bzr-looking-at-one-repo-with-branches with some daemon/webservice and expose the stuff we need as rpc calls21:02
zygaspiv: is it safe to keep one bzrlib.branch.Branch instance for very long21:02
zygambt: right but to be safe I'd go with rpc first, you can then optimize what redmine does but redmine is a moving target21:02
zygambt: and you also cannot cache that easily without invalidation notification, something that is best done in bzr side21:02
zygambt: you'll get stale cache with that approach IMHO21:02
* zyga makes up excuses not to write too much ruby21:03
mbtzyga, lol21:03
mbtA secondary goal is to make this something that I can "sell" to a Redmine committer.21:03
mbtI do *not* want to maintain a local fork if at all possible.21:03
zygambt: I think it can fly, espetially that bzr is not really well supported now21:04
mbtzyga, You mentioned Django earlier?21:04
zygambt: right, that's my recent job focus so I'm happy to build xml-rpc service that talks bzr21:04
zygambt: and hopefully it's going to be easy to work with xml-rpc in ruby21:04
mbtzyga, Would there, I presume, be a way to knock it down to one .py file that has no dependencies other than bzrlib's dependencies as a refinement?21:04
zygaspiv: what is the protocol that bzr serve talks? is it anything well-known over the wire or just custom?21:05
zygambt: yes, the django parts would just xmlrpc that away21:05
zygambt: the core bits would certainly need pure bzr to work21:05
zygaspiv: I'm asking to understand if it's easier to extend bzr serve and talk to that directly21:06
glyphSo, I just got bitten by https://bugs.launchpad.net/bzr/+bug/673884 again in the middle of pushing a gigantic branch21:06
mbtzyga, plugins can extend bzr serve (e.g., loggerhead can be used as bzr serve --http)21:06
zygambt: oh, cool, I need to look at that21:07
glyphthe help options for rebase don't really explain what -r does21:07
zygambt: okay, so the rpc bits can be dediced upon later, once we have the guts working without shelling out to bzr21:07
mbtzyga, I'm fine with a first "draft" shelling out to *something*, just such that it can work.21:08
glyphI tried to rebase onto the last dpushed revision but I'm getting a conflict on all the added files (since the point of divergence is before they were added, bzr seems to think they have different file IDs)21:12
glyphis there some way to ask it to do a dumb merge and just treat all the patches as patches?21:12
glyphall the --merge-type options just give me tracebacks.21:13
spivzyga: custom21:14
zygaspiv: thanks21:15
spivglyph: I am summoning jelmer21:16
spivzyga: there are some elementary docs in the tree in doc/developers/network-protocol.txt, and bzrlib/remote.py and bzrlib/smart/client.py are probably some of the more interesting bits of the client implementation.21:17
zygaspiv: if it's non standard it's not much use for us in this case, the goal is to minimize the ruby part as much as possible and implementing the same protocol would probably take some time, I think that off-the-shelf rpc will work better for this21:18
glyphspiv: the output of '--weave', for example - http://dpaste.com/333668/21:19
mbtWoot.21:19
spivzyga: you may also be interested in the bzr-service plugin21:19
zygaspiv: that's something new21:19
zygalet me look it up21:19
spivzyga: and maybe stuff like bzr-xmloutput etc.  Tools like eclipse have some overlapping requirements with you I suspect21:20
zygaspiv: yeah that's true21:20
zygaspiv: I heard about xmloutput21:20
glyphspiv: I think that my future solution for using bzr offline is going to be making a gigantic patch and then manually applying it, since dpush is apparently too unreliable to use in practice :-\21:20
spivzyga: bzr devs are a bit distracted this week (we're at a sprint) so I'd ask on the mailing list as well as here on IRC21:21
glyphat least with the SVN servers I've tried it with, it will always crap out around the 50-revision mark (earlier if I'm using https)21:21
zygaspiv: dallas?21:21
spivYeah21:21
zygaspiv: I just left :-)21:21
spivCongrats ;)21:21
zygahehe, US-medival-burger-castle will forever hount my mind21:22
GaryvdMHi vila - I guess you are awake cause you are in Dallas?21:35
vilaGaryvdM: !!!!!!!! yeeeehaaaaaa21:35
vilayeah, I'm in Dallas :)21:35
vilaGaryvdM: middle of the night for you thought, right ?21:36
vilathough21:36
GaryvdMvila: nearly21:36
GaryvdMvila: for the mac installer scripts - is there anything to look for new releases of plugins?21:37
mbtJoy, a spontaneous reboot on my phone.21:37
vilaGaryvdM: errr, you mean to get inspiration for the windows installers ?21:37
GaryvdMvila yes21:37
* vila checks21:38
GaryvdMI manually do > for plugin in plugins: bzr tags -d lp:plugin21:38
zygambt: what phone is that21:38
vilasponteaneous reboot are so fun, we should have more of them, preferably in unexpected places21:39
mbt-mobilezyga, nightly build of CM7 :)21:39
zygaCM?21:39
mbt-mobileunexpected but not surprising. not even beta yet lol21:39
mbt-mobilecyanogenmod.21:39
zygaah21:39
zygajdroid21:40
vilaGaryvdM: bzr-upload has a 1.0.0 release, hmmm, I'm not sure I properly tagged it though21:40
zygambt-mobile: out of curiosity, what is your interest in redmine, most folsk who use bzr also use lp.net21:40
mbt-mobilezyga: client21:41
vilaGaryvdM: launchpadlib has a 1.9.4 release21:41
mbt-mobilezyga, to make my life easier bc they wont use lp21:41
mbt-mobilezyga, so really for me. been using text files for too long to manage this sort of stuff.21:42
zygambt: manage what?21:42
zygambt: projects?21:43
vilaGaryvdM: the rest is less clear, you may look at revno 113 (the last one) in the 2.3 mac-installer branch21:43
vilaGaryvdM: hmm, I should be able to provide an lp url for that, just a sec21:43
mbt-mobilezyga, yep. Putting it all in one place is a good thing.21:43
GaryvdM vila: we not yet including lauchpadlib in the windows installer. What plugin uses it?21:44
vilaGaryvdM: http://bazaar.launchpad.net/~bzr-mac/bzr-mac-installers/2.3/revision/11321:44
vilaGaryvdM: bzr-pipeline21:44
mbtzyga, I'm a freelancer, and I manage a lot of proprietary things (sadly).21:44
GaryvdMah - yes21:45
vilaGaryvdM: but be careful that launchpadlib has a lot of depedencies and we don't (yet) carry them all21:45
zygambt: I see, thanks for telling me21:45
vilaGaryvdM: we (mac packagers)21:45
GaryvdMvila: yes - I'll leave that for now...21:45
Ramosai cant decide what workspace model to use.. the documentation doesn't give me enough knowledge to take a sane decision21:46
viladoxxx got it Right I think by freezing on revnos for plugins that don't have proper releases or series yet (like qbzr does)21:46
mbtzyga, But since presently I manage things in different systems, I started hunting for something (and writing something as well).21:46
spivglyph: jelmer is now sitting next to me21:46
vilaGaryvdM: dunno if you have the same detailed way to describe which plugin versions you embed on the windows side21:47
mbtzyga, I wound up finding Redmine, which is perfect except for this one thing which was already an issue in the RM tracker.21:47
zygambt: if you want I can work with you to make this happen21:47
zygambt: lp.net is perferct for hosting code but I find it lacking for project management21:48
GaryvdMvila: There is - I'll get the url in a sec.21:48
vilaGaryvdM: cool21:48
mbtzyga, Absolutely.  One other thing I liked about finding Redmine was that it was a lot easier to get going than a local instance of Launchpad.21:48
jelmerhi glyph21:48
jelmerglyph: spiv mentioned you wre having issues with dpush?21:48
glyphjelmer: a known issue :)21:51
glyphjelmer: https://bugs.launchpad.net/bzr/+bug/67388421:51
mbtzyga, am reading through the log code now21:51
glyphjelmer: I was wondering if I could work around it21:51
glyphit looks like if the branch adds files, I'm pretty hosed21:51
GaryvdMvila: http://bazaar.launchpad.net/~bzr/bzr-windows-installers/trunk/view/head:/bazaar_releases.py21:52
GaryvdMsimilar idea to the mac config.py file - different in details21:53
mbtI have all the information that Redmine needs, I think, save for last-revision21:53
mbtfor a list of entries, anyway21:53
jelmerglyph: ah, hmm21:53
mbtcan't figure out how to get the last revision for a file or directory from the list of files in a revisiontree.21:54
vilaGaryvdM: excellent !21:55
zygahmmm21:56
zygambt: last revision for a directory?21:56
zygambt: the "svn/cvs" like thing that you get when commiting to a tree21:56
GaryvdMvila: That was written by Ian21:56
vilaGaryvdM: ideally we should be able to share a common file between the installers for a given series, just a thought, I don't want patches *now* ! :D21:56
GaryvdMvila: yes21:56
mbtzyga, Yes, last revision for a dir, like http://bazaar.launchpad.net/~mtrausch/+junk/redmine-bazaar-sr/files shows21:57
zygambt: right, let me see21:58
glyphjelmer: any suggestions?22:01
mbtzyga, bzrlib.branch.Branch.get_revision_id_to_revno_map works for what I was trying earlier, and is a lot faster.22:01
jelmerglyph: I'm looking at the bug22:04
zygambt: I used bzrlib.branch.Branch.basis_tree() to get RevisionTree instance, it has methods that seem to be able to get dir-or-file -> revision22:04
zygambt: it also has get_file_size()22:05
mbtyes, also if you use .list_files, you get name, type, size, and a Inventory object22:06
mbtI still don't see anything in Tree or RevisionTree to get the last revision for an object22:07
zygambt: got it22:09
zygathe inventory item has this actually22:09
mbtI found Tree._file_revision(revtree, file_id) but that's "private"22:10
zygambt: .revision22:10
zygathat's what you want22:10
zygambt: you can simply walk the list generated by list_files()22:10
peitschie(mornin everybody)22:10
mbtzyga, Yep, am using "for file in revtree.list_files()"22:11
zygambt: so file is not really true, it returns a tuple of four items, the last one is inventory and it has .revision22:11
mbtzyga: http://pastebin.com/78Q6Ne5A22:12
mbtStill takes ½ second to run (on my system) when > /dev/null22:14
zygambt: line 18 is expensive, just walk the list, it's a generator22:14
mbtah22:14
zygambt: takes how many seconds?22:14
mbt1/222:14
mbt0.522:14
mbtremoving the comprehension saves 0.02 seconds22:15
zygambt: how about the same without using idmap at all?22:15
zygambt: that's zippy ;-)22:15
zygambt: that's _all_ redmine needs to import chagesets into its own db22:15
mbtremoving idmap cuts 0.05 seconds22:15
mbtthis is just listing the whole contents of a single revision22:16
zygambt: hmm refresh my memory, does redmine store files of each changeset too?22:17
mbtdon't think so, let me look22:17
zygambt: AFAIR this is interactive operation that you'd trigger when looking at the repository section22:17
zygambt: so this 0.5 second delay would be something you get when clicking on the page22:18
mbtright22:18
mbti think that's right, but one sec22:18
mbt(at least it's not the ~4 second delay that branch discovery takes, but that too is every page load22:18
mbt)22:18
mbtredmine stores repository_id (foreign key), revision, committer, committed on, comments, commit date, scmid (foreign key I think), user_id (??)22:20
mbtin its changesets table22:20
mbtalong with an autoincrementing / serial identifier for the changeset that Redmine uses22:20
mbtOr rather that I assume it uses.22:20
mbtalso it has a "changes" table that has id, changeset_id, action, path, from_path, from_revision, revision, branch22:21
zygahmmm22:23
zygachangeset_id refers to changeset table?22:23
zygafrom_path and path are used for moves?22:23
zygarevision is just to see what the previous revision was22:23
zygabranch is a string or a foregign key to something22:24
zygasorry for not checking this myself but I'm looking at other parts22:24
mbt-mobilebranch is probably a string and empty for vcses that dont expose branches22:24
mbt-mobilethose tables are populated via fetch_changesets i think22:25
mbt-mobileoh!22:26
mbt-mobilemaybe that column can be select distinct for a repo to get a branch list. thatd be much faster than calling bazaar at page load time.22:27
mbt-mobilerather bzrlib22:27
mbt-mobilethen when script/runner is called to update changesets at post-commit time, the work is all done then22:28
zygambt: yeah that would work22:29
zygasmart22:29
mbt-mobilethen when browsing in redmine the only thing that has to be done is get the revid > revno map22:29
mbt-mobilefor the branch22:29
zygaso if we want to cache that too we can keep it local22:29
zygahmm22:30
zygano wait, what about actual files22:30
zygawe don't store that ;-)22:30
zygapath/size22:30
mbtwell22:30
mbtthe only thing that has to be done at runtime is when entries() is called in the bazaar scm adapter class, it runs something like I pastebin'd.22:31
mbtbut more efficient even then that, because entries only needs for the current dir22:31
mbtit'll get called again and again as the ajax interface updates, if i understand how it works correctly22:32
mbtyes, entries gets the directory listing22:34
mbtso in git's case for the master branch it calls shellout with "git --git-dir /path ls-tree -l 'master:'"22:35
mbtif a revision ID is passed as the identifier, though we still have the problem of which branch.  We can confirm the revision ID presence in the repo, but we then have to search the branches to do anything with that revision ID22:38
spivjml: https://code.launchpad.net/~spiv/bzr/concurrent-pack-race-701940-2.2/+merge/46847 is on its way to PQM22:38
mbtOr maybe not.22:39
mbtNevermind, all that comes from the repo22:40
glyphspiv: Awesome.22:40
zygambt: I'll try to apply some of that, I'll write a small helper that can talk bzrlib and ruby22:41
mbta standalone branch can be opened with bzrlib.repository.Repository.open()22:41
mbtbut a branch in a shared-repo cannot22:41
zygahmm, why not, what happens?22:42
mbtbzrlib.errors.NoRepositoryPresent is thrown22:42
mbtbut that's ok22:42
zygawhat do you open exactly?22:42
mbtbecause when you open a branch its repo is opened for you and accessible via <branchinstance>.repository22:42
mbtSo, the python code that gets the entries can always open the URL given by redmine as a repository22:43
mbtbecause the URL that the user points at in the SCM configuration will always contain a repo, but does not necessarily have to contain a branch22:44
zygahmm22:44
zygaright22:44
zygaso we allways open  the repostitory and work from that22:44
jelmerjam: http://bazaar.launchpad.net/~jelmer/bzr/versionedfilestore-noweave22:44
jelmergrr22:44
jelmerjam: deb http://ppa.launchpad.net/gwibber-bugs/unstable/ubuntu natty main22:44
jelmeryou'd probably want maverick22:44
mbtzyga, right, open the repo, get the revision tree and walk it22:44
mbtis that right? we never have to open the branch except as part of the post-commit?22:45
zygaI'm not absolutely sure, I think we should find the branches inside the repo to see branch history in any way22:46
zygambt, how do you find branches by walking revision tree alone?22:47
mbtLet's see.  I branch from url://path/to/trunk, I commit a few times, I push back to url://path/to/trunk. The post-commit hook gets called on the client, but could be nothing there, and then on the server (I think). the hook tells RM that there are new revisions available.22:47
mbtRM opens the branch, gets the new revision IDs and gets their changeset from the shared-repo22:47
zygambt: post commit hook to populate redmine db?22:48
mbtSo all RM needs the branch for is to get the commits in chronological order22:48
zygambt: that requires your branch to live on the same system which might not work, how would this work in on-demand scanner scenario22:48
zygambt: you have to scan the repo, possibly remotely22:49
zygambt: you cannot avoid walking each branch22:49
mbtwhat requires it to live on the same system?22:50
mbtand also need the branch for revid->revno mapping22:50
mbtgrr22:50
zygambt: the post commit hook? how would you set it to work remotely22:50
mbtthat won't work if the branch is not known22:51
zygambt: let's slow down22:51
mbtzyga, you'd call wget or curl or some other process to alert the server to run script/runner22:51
zygambt: let's try to get current stuff better first22:51
mbtzyga, a detail that currently doesn't matter22:51
mbtzyga, we still have the problem of not knowing what branch to scan22:51
zygambt: uh, that's ugly, I'd prefer something that would also work when the code is hosted on something dumb or something like lp.net where you cannot get triggers22:51
mbtzyga, you can opt to do it at runtime too22:52
zygambt: what about this idea: we scan _all_ branches and populate the branch with the repo-relative path to the branch22:52
mbtzyga, and redmine *will* update changesets at runtime if it finds a newer revision when browsing than the one it knows about22:52
mbt*than the latest one it knows about22:52
mbthuh?22:53
zygado you mean the on-demant load thing that redmine does22:53
zygathe thing that pokes the repo whenenever you look at the repository part22:54
zygalet's slow down22:54
zygacan we turn the problem arouund22:54
mbtzyga, yes, it will fetch changesets as a result of a Web browsing request if they're out of date.  that can take a long time, so RM provides a script hook to update them without having to web-browse to the repository.22:54
zygawhat can we do correctly/fast/easily22:54
zygaand how to make redmine like it22:54
zygambt: right, you can explicitly disable that22:54
mbtzyga, We're still trying to figure that out.  We haven't really left the first step, which is when entries(path, id) is called with a revision id or number, we haven't a way to tell which branch is the context!22:55
mbtergo id->revno mapping cannot be done, because it could be different for every branch22:55
mbtwe could scan to see which branches contain the revid, and if only 1 branch does we can pick that branch22:56
zygambt: I would prefer to look at step zero - work with bzrlib and redmine efficiently22:56
mbtbut if more than one branch contains the revid, we have to guess22:56
zygambt: then solve step 0.5, adapt existing code22:56
zygambt: then step 1, fix  repo support22:56
mbtso just have something that guesses at first?22:57
mbtcuz it looks like to do better than that, we have to dig a lot deeper into redmine22:57
zygano, currently we don't have this problem22:57
zygaand once we have something better than what's currently inside we can ask people around22:57
zygaand the bzr sprint will finish so everyone will be back here22:57
jelmerglyph: So, the short version is that rebase sucks and we should fix it.22:58
mbtI don't follow22:58
zygambt: current redmine does _not_ support repositories22:58
mbtcorrect22:58
zygambt: we can just improve the implementation to be faster22:58
zygambt: and _then_ start to solve  the problem22:58
jelmerglyph: I have some ideas22:58
mbtzyga, the current implementation is fast enough given that it calls bzr for very small things (aside from initial loading of the changesets database)22:59
mbtthough I think we're talking about two slightly different things23:00
zygaright but we both agree that to improve it we need to talk with bzrlib23:00
glyphjelmer: please have ideas faster :)23:00
zygaso rewriting the current code is a prerequisite23:00
mbtI was working from the perspective of keeping the current bazaar-standalone-branch model & adapter23:00
glyphjelmer: looks like for this branch I'm going to be using 'bzr export' and some other nastiness to get something I can commit to svn.23:00
mbtand writing a new model & adapter that handles the repositories23:00
zygahmm23:01
mbtbecause there are enough things different about the two that I'm not sure we can (easily) support both use cases in a single class23:01
zygaI did not consider this23:01
zygaI think it could be handled by single code23:01
zygabut that's not really relevant, it can be done both ways23:01
mbtzyga, I made the assumption that if one class can do both then it'd be easy enough to drop the new one over-top the old one23:02
mbtbrb real fast, coffee23:02
zygak23:02
mbtback23:04
mbtI have http://mike.trausch.us/wiki/RM-SCM-module which I wrote (just copy-pasted it into my public wiki from my private one) while trying to figure out what's what.  It probably isn't 100% accurate yet23:06
zygalet me see23:07
zygadarn running redmine on arm is slow ;]23:07
jelmerglyph: spiv and I are brainstorming :-)23:07
mbtzyga, ARM, eh?  Only ARM thing I have in the house are the cell phones lol23:08
zyga:-)23:08
zygambt: I'm sure that will change in few years23:09
mbtzyga, probably not, don't plan on replacing any computers for the next 4 or so years, all of 'em are pretty new23:09
zygambt: well you will get a new one one day23:10
mbtThat and I like AMD :)23:10
mbt-mobileanyway, i suppose thats why i am looking at this from the bottom up; wasnt thinking about moding the current module, but replacing it completely.23:12
mbt-mobileits starting to look like we should use the svn model though instead of the git one.23:14
mbt-mobilethe svn model is broken (admittedly by necessity on svn's part), but the git model wont apparently work without improvements to redmine core and patches to all other scm modules23:15
zygambt: I don't have an opinion on that, I'd need to read the svn module first23:16
zygambt: I'll start working on the python adapter23:16
mbt-mobileat least with the svn model the branch is known as it is part of the path23:16
zygaand see what we can do later23:16
mbt-mobilethe svn module is the one used on remine.org23:16
mbt-mobileno pull down menu for the branches and no branches function in the adapter23:17
zygaheh23:17
zygait's part of the git/svn philosophy23:18
zygain place ;-]23:18
mbtwith the svn model, both repos and trees could be supported because the URL repo would be e.g., /home/mbt/Projects/redmine and the path passed to the SCM adapter would be relative from that23:18
mbtthen you just try to open as a branch the URL + dirname(path) and go up in the directory tree until opening a branch works23:20
zygambt: you can use bzrlib.branch.Branch.open_containing to do just that23:20
mbtoh, well, then.23:22
mbtdoes that work with a branch w/o working trees?23:22
mbt1 sec and I'll find out I guess23:24
zygambt: mmm, nope23:25
zygambt: but please check, I don't remember what failed for me, I did something similar lately23:25
mbtzyga, yes it does!23:26
mbtI do believe that might be the key.23:26
mbtAt least to a first implementation.23:26
mbtWonder if it works over the net23:26
mbt1 sec23:26
mkanatpoolie: Hey! My machine died on Sunday/Monday and I've been playing catch-up since then, but the loggerhead work is at the top of my list now.23:29
mbtIt does not; running "br = Branch.open_containing('lp:~mtrausch/+junk/redmine-bazaar-sr/app')" yields: bzrlib.errors.PermissionDenied: Permission denied: "Cannot create 'app'. Only Bazaar branches are allowed."23:30
mbtWhich looks like it attempted to create the branch?23:31
zygambt: hmm, that's now how lp works23:31
zygambt: yes23:31
mbtAh, not part of the call23:31
zygambt: AFAIR lp has some magic scheme23:31
zygambt: and you cannot create a repo on the far side23:31
mbt1 sec will try on a network-local bzr+ssh branch23:32
zygambt: you can test this with bzr+ssh and some local server23:32
mbtIt does work with bzr+ssh23:32
zygambt: lp has special meaning to pathnames23:32
mbtso with lp: an exception must be caught and one directory level should be removed to try again23:32
mbtuntil it works23:33
mbtbut for everything else it looks like it can figure it out... maybe. will try sftp23:33
mbtYep that works too23:33
zygambt: I don't think you need to do that for lp, there is no way to use lp with shared repos23:33
spivmbt: it's a bit of a bug that lp returns a PermissionDenied rather than a NoSuchFile in that case23:34
mbtno but if you specify it as a branch23:34
mbtredmine can be setup to allow all URL schemes that bzr knows about, including a remote branch on lp23:34
mbtthough I suppose that can also be excluded23:34
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
mbtSo, if the SVN model is used that means that the ambiguities all disappear23:35
mbtUnless I am missing something, that would make it possible to support Bazaar shared repositories without having to extend the Redmine "framework" in any way.23:36
mbtWhile at the same time supporting branches.  Because all that is needed is Branch.open_containing and the returned tuple has the Branch object and from that the Repository object can be reached23:37
mbt*supporting standalone branches23:38
mbtwhoa23:38
mbtfound a bug in bzr i think23:38
mbthttp://pastebin.com/7WQdfz3t23:39
spivmbt: that looks familiar, I think it may have been fixed since 2.2.123:41
mbtk23:41
mbtwill check real quick23:43
GaryvdMvila: on babune, the windows test are running with "-x TestBreakin". Is that permanent?23:49
mbtspiv, same crash using bzr from lp:bzr23:52
spivmbt: ok, thanks for checking.  File a bug (or me too an existing report if you find it's reported already...)23:53
mbtspiv, reported as bug 70518923:56
ubot5Launchpad bug 705189 in Bazaar "crash when "bzr ls" against a file in a branch w/o working tree" [Undecided,New] https://launchpad.net/bugs/70518923:56
zygambt: apparently we'll need very recent bzr to work at all ;-)23:57
mbtzyga, it's not an issue when using open_containing23:57
mbtzyga, thankfully23:57
mbtthe script that I pastebin'd earlier works on that same branch so we're good23:58

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