Post by Breazeal, Don
Behalf Of Pedro Alves
Sent: Tuesday, April 29, 2014 11:58 AM
To: Tom Tromey
Subject: Re: Patchwork patch tracking system
Post by Tom Tromey
I've been trying the patchworks install as well. I don't find it all
that useful myself, but maybe it would be better if more people were
I've been trying it out too. I've already found it useful to keep track
of which of my own patches I have pending.
I've been absent a little while from review, but I'm heading back, and
I'm using patchwork to guide me.
I like that it doesn't make the mailing list a second class citizen.
I'd be willing to continue giving it a try, but indeed I think it'd be
better if more people were using it. That'll be true for any tool we
end up with.
In the past week, I've been cleaning it up whenever I see that patches
have been pushed, even those that I didn't approve myself, but of course
it'd be better if who approves the patch or the submitter themselves
take care of their own patches.
non-maintainers shouldn't hold back from creating an account and
updating the state of their own patches. Whatever helps bringing the
load down from maintainers should help your own patches. :-)
$ ~/bin/pwclient-hacked list -s New | sort | uniq -c | sort -nr
As you see, most of the patches so far, since we began tracking a few
weeks back, came from a small set of people. And I suspect many of
those are actually already in.
A patch series that I posted to gdb-patches at the beginning of April doesn't seem to show up in patchwork. It would be good to understand why that is and how to fix it.
Well, I suspect it's the same reason your patch doesn't show
inline in those urls -- follow the "raw" link and we see:
Content-Type: application/octet-stream; name="0001-remote-exit.patch"
Content-Disposition: attachment; filename="0001-remote-exit.patch"; size=9688;
creation-date="Wed, 02 Apr 2014 21:17:10 GMT";
modification-date="Wed, 02 Apr 2014 21:35:13 GMT"
You need to either inline the patch in the body of the email,
or make Content-Type be some kind of "text". For ".patch" files,
that's usually text/x-patch.
Compare with Sandra's, which is also sent as an attachment:
I don't have access to patchwork's logs, but looking around current
git mainline patchwork's sources, I see,
150 def find_content(project, mail):
151 patchbuf = None
152 commentbuf = ''
153 pullurl = None
155 for part in mail.walk():
156 if part.get_content_maintype() != 'text':
159 payload = part.get_payload(decode=True)
160 charset = part.get_content_charset()
161 subtype = part.get_content_subtype()
163 # if we don't have a charset, assume utf-8
164 if charset is None:
165 charset = 'utf-8'
167 if not isinstance(payload, unicode):
168 payload = unicode(payload, charset)
170 if subtype in ['x-patch', 'x-diff']:
171 patchbuf = payload
173 elif subtype == 'plain':
174 c = payload
176 if not patchbuf:
177 (patchbuf, c) = parse_patch(payload)
179 if not pullurl:
180 pullurl = find_pull_request(payload)
182 if c is not None:
183 commentbuf += c.strip() + '\n'
185 patch = None
186 comment = None
188 if pullurl or patchbuf:
189 name = clean_subject(mail.get('Subject'), [project.linkname])
190 patch = Patch(name = name, pull_url = pullurl, content = patchbuf,
191 date = mail_date(mail), headers = mail_headers(mail))
193 if commentbuf:
194 if patch:
195 cpatch = patch
197 cpatch = find_patch_for_comment(project, mail)
198 if not cpatch:
199 return (None, None)
200 comment = Comment(patch = cpatch, date = mail_date(mail),
201 content = clean_content(commentbuf),
202 headers = mail_headers(mail))
204 return (patch, comment)
So it looks like patchwork just skips your attachments, (rightfully) considering them blobs.
Full source here:
I suggest just using "git send-email" to send patches. It makes sending
patch series _so_ much easier, it enforces following good practices
commit log practices, and makes sure the receiving end has it easy too -- one
can just save the emails as mbox files (from the mail client, or patchwork's
web frontend -- see e.g., the "mbox" link at http://patchwork.siddhesh.in/patch/660/)
and then simply use "git am" to import the result. Or using patchwork's
command line tool, do that in one step with "pwclient git-am $patch_id".