/srv/irclogs.ubuntu.com/2015/06/03/#launchpad-dev.txt

cjwatsonblr: Hm, you made h be next comment and l be previous comment?  sort of feels backwards to me, perhaps because of Western left-to-right reading conventions07:17
cjwatson(yes, I should have looked at it during review ...)07:17
blrcjwatson: if it feel weird, easy enough to change before people become too accustomed to it, although the 'forward' keys tend to be to the left of their backwards counterparts (realise there are vimisms there too)08:13
blrcjwatson: wgrant: should `required=False` be sufficient to prevent clientside validation on a TextLine? It seems to be expecting a value, and I'm not certain why... would like the 'Optional' behaviour the copy_fields like branch_location have08:18
wgrantblr: Our forms do no client validation by default.08:23
wgrantWell, no client validation at all.08:23
blr"Required input is missing."?08:23
wgrantThat's server-side.08:23
wgrantrequired=False would normally fix that.08:24
blrthat's what I thought... hrm08:24
wgrantWhich field is it?08:24
wgrantThere's no vocab involved?08:24
blrwgrant: just a barebones TextLine08:25
blrwith a title, required and description08:25
blrmight need to look at what the launchpad_form/widget_row is doing more closely08:26
wgrantHuh, that's quite surprising.08:26
wgrantblr: If you can't work it out this evening, throw a diff/branch at me or Colin and we can have a look.08:27
blrwgrant: thanks08:27
cjwatsonblr: Yeah, it may also be a vimism for me in that 'l' is very definitely a forward action in a file08:29
blrcjwatson: hmm yes, perhaps it wouldn't hurt to swap them08:32
wgranth is certainly nicer to type, but there is precedent for the other way.08:33
blrwell given I like weird emacs chords, I'm probably the worst person to decide.08:36
StevenKblr: Ah, so forward will be M-x Super-F12 Ctrl-Alt-f then?08:38
blrStevenK: that sounds perfectly reasonable.08:38
blrwgrant: cjwatson: did you see lifeless's new constraints feature for pip, pretty cool: https://github.com/pypa/pip/pull/2857/files08:52
cjwatsoncute09:06
redixinhi all. any idea how to set up new git repository on launchpad?15:57
cjwatsonredixin: https://help.launchpad.net/Code/Git15:58
redixincjwatson: yes, but there is no info about setting up new repo. I can see only "import from git" option on launchpad project's page15:58
redixinbut it does import from git to bzr15:59
cjwatsonredixin: You just push to it15:59
redixincjwatson: hm. I'll try. thanks15:59
cjwatsonredixin: So for example if you want to push a default repository for an existing project named foo, "git remote add origin lp:foo && git push --all origin" or whatever16:00
cjwatsonotherwise use one of the other URL forms16:00
redixincjwatson: it works. thanks16:03
cjwatsonCool16:04
rpadovaniHey guys, I love to see how much effort are you pulling in lp development in last months - thank you :-)21:52
cjwatsonyou're welcome :)21:52
blrrpadovani: lots more to come!21:53
rpadovani\o/21:53
blrcjwatson: still about?21:59
cjwatsonblr: just21:59
blrtrying to understand the target argument for IGitRepositorySet.setDefaultRepository22:00
blrpresumably in the git context, not an IBranchTarget22:00
cjwatsonblr: That's the target (IProduct or IDistributionSourcePackage; IPerson targets don't have defaults) that you're setting the default for22:01
cjwatsonIBranchTarget is a confusing thing that I would like to refactor away soon22:01
cjwatsonI didn't replicate it in the Git model22:01
cjwatsonTo the extent that it exists, it's mostly in GitNamespace22:01
blrright okay22:02
cjwatsonBut anyway, here target means the actual target of the repository22:02
cjwatsonFor usage you could look at the GitRepositorySet tests or lp.code.xmlrpc.git22:03
cjwatsonOr the interface docs :)22:03
blrright, I think I was slightly thrown by IBranchTarget, I'll ignore it.22:04
cjwatsonYeah, I don't blame you22:04
cjwatsonIt took me quite a while to understand what it was doing22:05
cjwatsonAnd you get awesome stuff like22:06
cjwatsonlib/lp/code/stories/webservice/xx-branchmergeproposal.txt:    >>> source = factory.makeBranchTargetBranch(target.target)22:06
cjwatson*crosses eyes*22:06
blrcjwatson: wow, I'm strangely reminded of old java codebases there heh22:10
cjwatsonIndeed!  BranchTargetFactoryTargetBranchFactoryFactory22:10
cjwatsonBean22:10
blrhah right, was going to say, forgot the Bean22:10
blrwgrant: cjwatson: what's the best way to determine if product.development_focus is a git repo?22:39
blrjust check the type, or is there a helper somewhere?22:40
wgrantblr: development_focus is a series.22:40
wgrantIt can't be a bzr branch or a git repo.22:40
wgrant(a series can have a bzr branch, though)22:40
blrerr development_focus.branch22:41
wgrantThe project's main bzr branch is product.development_focus.branch, and the project's main git repo is getUtility(IGitRepositorySet).getDefaultRepository(product)22:41
wgrantbranch is always a branch.22:41
wgrant(later on we'll probably allow a series to specify a branch name within the project's default git repo, but not at the moment)22:41
blrokay, thanks22:42
wgrantIt's an unfortunate difference in the real-world model which complicates everything :)22:42
blrwgrant: is there an equivalent of getUtility(IBranchLookup).getByUrl(branch_url) for a product?23:05
blrwhere branch_url is in the lp:foo form?23:05
wgrantblr: For a product?23:05
wgrantYou're in the context of a product. Why do you need to look one up?23:06
blrwgrant: required to find the defaultrepository for 'another' product23:07
wgrantblr: Oh, why are you doing that?23:07
wgrant(you probably want getUtility(IProductSet).getByName('foo'), but I'm interested to know what you're doing.)23:08
blrwgrant: hmm in the context of allowing a user to provide the url of another product to set their product's default git repository23:09
blrperhaps my thinking around this is muddled.23:09
wgrantblr: That's impossible.23:09
wgrantIt doesn't make sense, as is impossible in the model.23:09
wgrantDo you have a use case for that?23:09
blrin the mirror/fork case?23:10
wgrantWe don't support forking by creating another project. There are some situations where that is valid, but it requires an extensive rework of our project model to properly make sense.23:11
blrok, I suppose that clarifies that :)23:12
wgrantWe only support mirroring from external sites today, to discourage people from trying a GitHub-style model on the LP model where it doesn't fit.23:12
wgrant(also to avoid security issues)23:12
blrI wonder if that is a possible source of confusion for new users, given familiarity with github's model.23:14
wgrantIt is, but there are much worse ones.23:14
wgrantWe can mitigate it in a couple of obvious ways:23:15
wgrant - Make it very clear how to push up your own branches to an existing project.23:15
wgrant - Make the project creation form less insane, so people actually read the warnings on it.23:15
blrright23:15
wgrantRather than "oh god there are 20 fields what am I doing let's just fill them in"23:15
blryep, there's far too much to think about up-front.23:16
blrdo you think we could safely set a default for licensing, but provide feedback to review it afterwards?23:16
wgrantYes, now that the commercial project model isn't nonsense, it's quite feasible.23:18
wgrantWe just ask private or public, and then bug them to select a license later.23:20
wgrant(in fact, the "bug them to select a license later" workflow already exists, though it sucks, when you select "I don't know yet")23:20
blrtrue23:20
blrwgrant: I have a git 'foo', however getUtility(IGitRepositorySet).getByPath(self.user, '~kit/+git/foo') return None23:35
blrgit ^repo23:36
wgrantblr: What's the git repo's target? That's a personal, not project, repo named 'foo'.23:38
blrwgrant: a product23:39
wgrantblr: getByPath('~kit/foo') is probably what you want.23:39
wgrantOr just getByPath('foo') if it's the project's default.23:39
blroddly all None23:40
wgrant~kit/foo/+git/foo?23:40
wgrantHow did you create it?23:40
blrthe factory23:41
wgrantah, it'll have a weird name.23:41
wgrantWhat was the exact command you used to create it?23:41
wgrantIt's probably ~kit/foo/+git/some-reasonably-random-string23:42
blrjust makeGitRepository() no args23:42
wgrantOh23:42
wgrantThen it's not going to be foo, or owned by you, is it?23:42
blrwgrant: it is, just using foo for illustrative purpose23:42
blrah ownership ugh23:42
blrthanks, no doubt that's it :P23:43
wgrantHeh23:43
wgrantblr: Remember that repo.git_identity can get you the shortest path that will work for getByPath23:51
blroh that's handy23:53
wgrantNot if you don't remember to store the repo in a local variable first, though :P23:55

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