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