[Tracker-discuss] Adding a "Rietveld this" button?

"Martin v. Löwis" martin at v.loewis.de
Fri Mar 6 01:00:57 CET 2009


> It'll need a storage place, could be a Link, Multilink (if we cater to
> multiple reviews of a single issue)  or simply a column in _issue
> (hackish, but might be sufficient). Once we decide where this should
> be stored, I can work on that, plus template and whatever behavior
> change is necessary.

Just a regular string field. It could be the Rietveld issue number,
or the full code review URL. I don't find that hackish myself.

> OK, would a patch against Rietveld's upload.py be enough? Or should it
> be a wrapper that forwards any command line options it doesn't handle
> to upload.py?

I think a patch (or full file) would be good enough. We could put it
into the tracker itself, and publish it prominently where people
upload files.

> from urllib import urlopen, urlencode
> def get_title(id, tracker='http://bugs.python.org'):
>     # This should be the smallest query able to return an issue title
>     query_tpl = [('@action', 'export_csv'), ('@columns', 'title'),
>                  ('@filter', 'id'), ('id', id)]
>     # Request path + query
>     issue = '/issue?' + urlencode(query_tpl)
>     title = urlopen(tracker + issue).readlines()
>     if title[0] == 'title\r\n':
>         # Got a single data row CSV, format and return it
>         return '[issue%s] %s' % (id, title[1].strip())

Nice! I didn't think of something that complicated (or, rather,
complicated in a different way):

upload.py --roundup 5428

That could either fill in a description given by -d, or fetch
the description from roundup.

Regards,
Martin


More information about the Tracker-discuss mailing list