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

blrwgrant: thanks, some good things to consider there.00:01
wgrantblr: Have you looked at mojo again?00:02
blryep looking at mojo/deployment today.00:03
blrwill come back to the commit-api branch later, would like to continue with this today I think.00:03
wgrantblr: Would be good to get commit-api landed today, since Colin's up to there now.00:04
blrwgrant: sure, that's fine, I'll come back to deployment on monday.00:06
wgrantblr: We all know how good deployment/packaging/etc. are at eating an inordinate amount of time :/00:06
blroh yes -_-00:07
blrparticularly when the tool is... temperamental.00:07
wgrantQuite.00:08
blrwgrant: regarding the assertion in format_commit(), the only caller does currently check for GIT_OBJ_COMMIT, but I suppose we might re-use this elsewhere00:12
blrperhaps I should move the exception in get_commit to format_commit?00:13
blrwould save repetition in get_log00:14
wgrantblr: That's not unreasonable, as long as the request returns 400 or something like that.00:15
blrwgrant: if I pass an iterator to the view, rather than the commit collection, I'm not certain about having the limit logic in the view.00:43
blrfeels like it should be in get_log00:43
blrwould prefer the view not to touch pygit2 if possible.00:44
blrI realise it is already leaking with the exceptions, but in general would prefer to minimise it.00:44
wgrantblr: I think this makes things uglier, but I'm happy to leave it as and see how things grow naturally.00:45
blrwgrant: some weird behaviour with pygit2 unicode Signatures01:32
blrwgrant: sig = pygit2.Signature(u'Владимир Владимирович Набоков'.encode('utf-8'), u'Набоко@zembl01:34
blra.ru'.encode('utf-8'))01:34
blrugh01:34
blrplease reassemble, and call sig.name01:34
wgrantIs pygit2.Signature meant to be given bytestrings?01:34
wgrantIt works if you give it encoding='utf-8'01:35
blrthat's not in the docs O.o01:35
wgrantI'd check the code, but I suspect you're meant to give it one of a unicode, an ASCII str, or a str plus an encoding.01:35
wgrantI didn't look at the docs, I just tried it :P01:35
blrrelying on documentation is clearly a major character flaw of mine. I'll work on it.01:36
blrwgrant: huh, I can't reproduce that, passing encoding='utf-8' to the constructor throw a UnicodeEncodeError01:39
wgrantblr: http://paste.ubuntu.com/10588625/01:40
blrsig = pygit2.Signature(u'Владимир Владимирович Набоков'.encode('utf-8'), u'Набоко@zembl01:40
* blr sighs01:40
blrwgrant: that does work, sorry.01:43
blrwhy would ascii be the default?01:43
wgrantblr: ASCII is the only correct default for interpreting a bytestring without any other information.01:52
wgrant(but, for our purposes, we can sensibly say that if there's no declared encoding we default to UTF-8 with errors='replace')01:55
wgrantBecause this API is allowed to be lossy, and anyone who doesn't use UTF-8 is a fool.01:56
blrwgrant: do commit objects with non utf-8 data need to be filtered, akin to refs?02:05
wgrantblr: No, in that case we can just do errors='replace'.02:06
wgrantWe can't do that with refs, since they're identifiers and would be ambiguous.02:06
wgrantFor metadata it's fine to be lossy.02:06
blrok, that makes sense.02:06
lifelessyou could do unicode_escape02:29
lifelessfor errors02:29
lifelessIIRC02:29
blrwgrant: afaict, pygit2 is already lossy, creating a commit with a latin1 bytestring returns a utf-8 'replaced' string02:36
blror more specifically, I think create_blob() is doing that02:38
wgrantlifeless: unicode_escape is the opposite direction.02:40
wgrantblr: create blob should take a bytestring, though, since its content isn't text02:41
blrhmm nope02:42
blryep, just looking at the code now trying to work out where this is happening02:42
wgrantthe API is a bit odd, vut it seems to be sensible in terms of str vs unicode02:43
blrwgrant: yes it appears to be handling non utf-8 sanely. There's a test now at any rate.02:49
blrwgrant: there now if you have a moment to re-review.02:52
blrjust looking at cjwatson's nonexistent-repo branch, I guess that was a bad assumption that it would throw a GitError.03:06
blror rather, the bad thing is making an untested assumption. :/03:08
wgrantRight.03:14
wgrantKeyError is a pretty odd error, though!03:14
blrthanks wgrant03:22
blrhope that will free up cjwatson for his next bit of work. Will return to stackystack.03:25
* wgrant is making Answers a bit easier to manage from a spam perspective.03:26
wgrantBut mojo might be a nice distraction if you continue to run into walls.03:27
blrwould like to get to some of those other LP tasks next week as well, perhaps the keybindings for chunk navigation03:27
wgrantIndeed.03:28
wgrantThat should be even nicer than Ctrl+Enter.03:28
blrwgrant: missed your inline comment, damnit. limit is a string there, the view should cast it, rather than doing it there though.03:30
wgrantYup, another usability issue with inline comments :)03:30
StevenKNeeds more VWS? Or <blink> tags?03:31
blrStevenK: bring back <marquee> imo03:31
StevenKblr: Doable with JS, and oh look, inline comments already uses lots of it03:32
blrok, going to head off. have a good weekend wgrant04:16
wgrantblr: Night. Thanks for sorting out commit-api.04:17
blrand thanks for your help with it! ttyl04:17
cjwatsonblr: I marked the commit/log API tasks done in asana - hopefully that's right17:46

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