[00:01] wgrant: thanks, some good things to consider there. [00:02] blr: Have you looked at mojo again? [00:03] yep looking at mojo/deployment today. [00:03] will come back to the commit-api branch later, would like to continue with this today I think. [00:04] blr: Would be good to get commit-api landed today, since Colin's up to there now. [00:06] wgrant: sure, that's fine, I'll come back to deployment on monday. [00:06] blr: We all know how good deployment/packaging/etc. are at eating an inordinate amount of time :/ [00:07] oh yes -_- [00:07] particularly when the tool is... temperamental. [00:08] Quite. [00:12] wgrant: regarding the assertion in format_commit(), the only caller does currently check for GIT_OBJ_COMMIT, but I suppose we might re-use this elsewhere [00:13] perhaps I should move the exception in get_commit to format_commit? [00:14] would save repetition in get_log [00:15] blr: That's not unreasonable, as long as the request returns 400 or something like that. [00:43] wgrant: 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] feels like it should be in get_log [00:44] would prefer the view not to touch pygit2 if possible. [00:44] I realise it is already leaking with the exceptions, but in general would prefer to minimise it. [00:45] blr: I think this makes things uglier, but I'm happy to leave it as and see how things grow naturally. [01:32] wgrant: some weird behaviour with pygit2 unicode Signatures [01:34] wgrant: sig = pygit2.Signature(u'Владимир Владимирович Набоков'.encode('utf-8'), u'Набоко@zembl [01:34] a.ru'.encode('utf-8')) [01:34] ugh [01:34] please reassemble, and call sig.name [01:34] Is pygit2.Signature meant to be given bytestrings? [01:35] It works if you give it encoding='utf-8' [01:35] that's not in the docs O.o [01:35] I'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] I didn't look at the docs, I just tried it :P [01:36] relying on documentation is clearly a major character flaw of mine. I'll work on it. [01:39] wgrant: huh, I can't reproduce that, passing encoding='utf-8' to the constructor throw a UnicodeEncodeError [01:40] blr: http://paste.ubuntu.com/10588625/ [01:40] sig = pygit2.Signature(u'Владимир Владимирович Набоков'.encode('utf-8'), u'Набоко@zembl [01:40] * blr sighs [01:43] wgrant: that does work, sorry. [01:43] why would ascii be the default? [01:52] blr: ASCII is the only correct default for interpreting a bytestring without any other information. [01:55] (but, for our purposes, we can sensibly say that if there's no declared encoding we default to UTF-8 with errors='replace') [01:56] Because this API is allowed to be lossy, and anyone who doesn't use UTF-8 is a fool. [02:05] wgrant: do commit objects with non utf-8 data need to be filtered, akin to refs? [02:06] blr: No, in that case we can just do errors='replace'. [02:06] We can't do that with refs, since they're identifiers and would be ambiguous. [02:06] For metadata it's fine to be lossy. [02:06] ok, that makes sense. [02:29] you could do unicode_escape [02:29] for errors [02:29] IIRC [02:36] wgrant: afaict, pygit2 is already lossy, creating a commit with a latin1 bytestring returns a utf-8 'replaced' string [02:38] or more specifically, I think create_blob() is doing that [02:40] lifeless: unicode_escape is the opposite direction. [02:41] blr: create blob should take a bytestring, though, since its content isn't text [02:42] hmm nope [02:42] yep, just looking at the code now trying to work out where this is happening [02:43] the API is a bit odd, vut it seems to be sensible in terms of str vs unicode [02:49] wgrant: yes it appears to be handling non utf-8 sanely. There's a test now at any rate. [02:52] wgrant: there now if you have a moment to re-review. [03:06] just looking at cjwatson's nonexistent-repo branch, I guess that was a bad assumption that it would throw a GitError. [03:08] or rather, the bad thing is making an untested assumption. :/ [03:14] Right. [03:14] KeyError is a pretty odd error, though! [03:22] thanks wgrant [03:25] hope that will free up cjwatson for his next bit of work. Will return to stackystack. [03:26] * wgrant is making Answers a bit easier to manage from a spam perspective. [03:27] But mojo might be a nice distraction if you continue to run into walls. [03:27] would like to get to some of those other LP tasks next week as well, perhaps the keybindings for chunk navigation [03:28] Indeed. [03:28] That should be even nicer than Ctrl+Enter. [03:30] wgrant: missed your inline comment, damnit. limit is a string there, the view should cast it, rather than doing it there though. [03:30] Yup, another usability issue with inline comments :) [03:31] Needs more VWS? Or tags? [03:31] StevenK: bring back imo [03:32] blr: Doable with JS, and oh look, inline comments already uses lots of it [04:16] ok, going to head off. have a good weekend wgrant [04:17] blr: Night. Thanks for sorting out commit-api. [04:17] and thanks for your help with it! ttyl [17:46] blr: I marked the commit/log API tasks done in asana - hopefully that's right