/srv/irclogs.ubuntu.com/2015/07/14/#launchpad-dev.txt

mwhudsondid that garbo job for backfilling product.vcs finish yet?02:46
blrmwhudson: it has yep02:56
mwhudsonawesome02:57
mwhudsonso as far as we know, we should be able to remove the special casing from the go tool?02:58
blrmwhudson: I would imagine so, yes :)02:58
mwhudsoncool03:01
* mwhudson tries to find a go project on lp with >1 series03:04
mwhudsonoh poop03:07
mwhudsongo get launchpad.net/project/series/sub/directory is documented as working03:07
blrmwhudson: sorry, don't follow...03:08
mwhudsonas is launchpad.net/~user/project/branch03:08
mwhudsonblr: basically you can feed a subdirectory of the branch to go get and it knows to get the whole branch and then only build the subdir03:09
mwhudsoni assume03:09
blrmwhudson: is github special cases somehow to handle that as well?03:15
blrs/cases/cased/03:15
mwhudsonyes, looks like it03:15
mwhudsonbah03:15
mwhudsoni guess i could cook up a re so the existing behaviour is preserved when there is trailing stuff03:17
mwhudsonmaybe03:24
mwhudsonblr: can you link me to a project that uses git?03:28
blrmwhudson: https://launchpad.net/~blr/+git/mushrooms-russia-history03:28
blroops03:29
blrno that's no good03:29
mwhudsonthat's like a junk branch?03:29
blrhttps://launchpad.net/germinate ?03:30
blryes that one's git03:30
blrmwhudson: right, not a project03:30
mwhudsonblr: i bet you haven't thought at all about what the go import path for a project hosted in git on lp should be :)03:33
mwhudsonblr: i just said this: https://github.com/golang/go/issues/11436#issuecomment-12112441003:35
blrmwhudson: have I missed something? go-import should render for git projects too03:35
mwhudsonblr: for git projects too, but what about git repos that are not the repo for a project?03:35
mwhudsoni guess that's a rarer thing than the bzr case, given the nature of git03:35
blrmwhudson: right, in this case you're only going to get the default repo for the project or series03:36
blrmwhudson: how often is that used in practice? the sub-directory feature03:51
mwhudsonblr: i have no idea03:51
mwhudsoni suspect not often03:52
rpadovaniblr, cjwatson thannk you very much, I start to take a look at it :-) I'm not good (yet) at writing tests, so maybe it takes a bit. Thanks for pointing me to the right direction07:31
cjwatsonSure.  Let us know if you need help.07:38
blrmwhudson: is there anything more we can do on the launchpad side? I see russ cox replied.07:51
rpadovanisorry to bother you, but I'm a bit lost writing the test. The general logic is ready and it does what I think it should do, but I have some problems forgint the href for the revision. Atm I've something like this: revision_link = '%s/revision/%s' % (target_identity, self.arbitrary_revisions[2]), where target_identity is bmp.merge_target.identity. It produces something similar to the final result: http://paste.ubuntu.com/11876524/ The09:00
rpadovaniproblem is I need to replace the starting of the link with http://bazaar.launchpad.net and with http://git.launchpad.net. I don't understand if there is a way to have the link from some variable or I need to create it form the merge_target looking if it starts with lp:// or with ~09:00
rpadovanihere the code I wrote so far: http://paste.ubuntu.com/11876534/09:00
cjwatsonNeither of those is correct for the link.  You'll want to construct something based on self.context.getCodebrowseUrl().09:07
cjwatsonSomething like self.context.getCodebrowseUrl("revision/%s" % quote_plus(revision)) should do the job for Bazaar.  For Git it'd be more like "%s/commit/?id=%s" % (self.context.getCodebrowseUrl(), quote_plus(revision))09:10
cjwatsonOh, this is from a merge proposal, so self.context.merge_target rather than self.context there09:11
cjwatsonAnd in fact in the Git case it'll want to be self.context.target_git_repository, as GitRef.getCodebrowseUrl isn't appropriate here09:12
rpadovaniokay, thanks. How can I check if the test is running agains git or bzr?09:14
cjwatsonWhat class is this test in?09:15
rpadovanior should I create two tests, one under class TestBranchMergeProposalMergedViewGit and the other under class TestBranchMergeProposalMergedViewBzr?09:15
rpadovaniTestBranchMergeProposalMergedViewMixin atm09:16
cjwatsonYou *can* create two tests, but I would suggest instead adding a method to each of TestBranchMergeProposalMergedView{Bzr,Git} that returns the expected link text for a revision.  See how test_initial_values is implemented for comparison.09:17
cjwatsonThen the test in TestBranchMergeProposalMergedViewMixin can be generic.09:17
rpadovaniokay, thanks for the ideas, I take a look09:20
rpadovanihave to study now, I'll continue tonight or tomorrow, thanks for suggestions :-)09:50
* cjwatson glares at the swamp of bug notifications12:17
=== rpadovani_ is now known as rpadovani
=== igitoor_ is now known as igitoor
blrmorning20:39
mwhudsonblr: i don't think so, i have woken up with a cold and my brain is full of cotton wool but i'll try to follow up today at some point21:19
blrmwhudson: ugh, sorry to hear that. no worries21:20
rpadovaniAfter I spent an afternoon studying about DFA and NFA and how to transform one in the other, it's time to write a test for my branch :D So, I was trying to forge the url where I should point the link to. cjwatson suggested me to the test under TestBranchMergeProposalMergedViewMixin, and then make two little helper functions under TestBranchMergeProposalMergedViewBzr and TestBranchMergeProposalMergedViewGit. Let's focus on the first21:31
rpadovanione atm: so I created two versions of this helper function, but they don't work. Any hint on which I'm missing? I'm sure it's something very stupid...21:31
rpadovanihttp://paste.ubuntu.com/11879809/21:31
blrrpadovani: bmp does not have a 'context' attribute, I think you just want bmp.merge_source21:37
blrrpadovani: rather than using pastebin, it might be better to make a merge proposal in the 'work in progress state'21:38
rpadovaniblr, well, I need to link to the target where the branch has been merged, so bmp.merge_target. But with bmp.merge_target I've only the name of the branch, not the address of the code (that is what I need)21:39
rpadovaniblr, ok, I'll do, then the commit log for the branch will be a mess, but if it's okay for you it is also for me :-)21:39
rpadovaniblr, okay, I pushed the test I wrote so far here: https://code.launchpad.net/~rpadovani/launchpad/link-revision-merged-mp/+merge/26465421:49
rpadovaniif you have some time to take a look thanks so much :-)21:50
rpadovanimeanwhile I take a look to the *real* code21:50
blrthanks rpadovani, someone should be able to have a look today21:51
rpadovanithanks to you guys for your time21:51
wgrantblr: Could you have a look at https://bugs.launchpad.net/launchpad/+bug/1474592? Should be a quick fix in two templates or two views, plus a test for each.23:20
mupBug #1474592: golang_import_spec needs to check that the branch is accessible <branches> <privacy> <regression> <Launchpad itself:Triaged> <https://launchpad.net/bugs/1474592>23:20
blrsure23:20
wgrantThe branch link on Product:+index and ProductSeries:+index is already guarded (possibly with a /required:launchpad.View, or possibly in the view itself)23:21
blrwgrant: worth a browser test as well?23:22
cjwatsonRight, a view test would go in browser-land.23:23
cjwatson(Unless it fits with something in stories and is too hard to put elsewhere, which sin I've committed a few times.)23:24
cjwatsonwgrant: Is there a way to add a person to a team in a test without triggering TestMailer.send to the added person?23:26
cjwatsonI have nefarious reasons.23:26
wgrantcjwatson: Um, you could possibly fixture out the ITeamMembership subscribers, or create a TeamMembership manually and not fire the event.23:27
wgrantTeamMembershipSet.new is illegal, but it works.23:28
cjwatsonMaybe a fixture is the right thing.23:33
cjwatsonOr maybe I should stop trying to test this in an existing doctest ...23:33
* beuno passes cjwatson a can of gasoline and a matchbook, winks and points at LP doctests23:34
cjwatsonbeuno: Wouldn't be the first I've committed arson against23:35
cjwatson(the first doctest, I should clarify!)23:35
cjwatson(oh hi nice mr policeman)23:35
blrtrying not to grow the number of doc-tests at least23:35
beunoI still have nightmares about 6 hour test suites, PQM and getting all levels of agree to pass at the same time23:36
cjwatsonIt's not been that bad for a while, fortunately23:37
cjwatsonThank goodness23:38
beunomy last commits were around the time the test suite got pararellised, enough to have ended up with a 300 USD AWS bill because the tool didn't shut down instances properly, but not where the cloud bit was centralised23:39
cjwatsonWhen I started ec2test was still a thing but there'd been enough mistakes made for there to be prominent warnings to check that shutdown had worked23:40
* beuno shivers23:43

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