From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMlEL-0003nK-HK for qemu-devel@nongnu.org; Tue, 04 Aug 2015 19:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMlEG-0007qZ-IR for qemu-devel@nongnu.org; Tue, 04 Aug 2015 19:02:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMlEG-0007pw-B1 for qemu-devel@nongnu.org; Tue, 04 Aug 2015 19:02:40 -0400 References: <1438703896-12553-1-git-send-email-armbru@redhat.com> <1438703896-12553-17-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55C1448E.1080409@redhat.com> Date: Tue, 4 Aug 2015 17:02:38 -0600 MIME-Version: 1.0 In-Reply-To: <1438703896-12553-17-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CMxkuhFtqD5q6W6QTmDrGLjvojGwIQ2iA" Subject: Re: [Qemu-devel] [PATCH RFC v3 16/32] qapi: Generate comments to simplify splitting for review List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CMxkuhFtqD5q6W6QTmDrGLjvojGwIQ2iA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/04/2015 09:58 AM, Markus Armbruster wrote: > The effect of the previous few patches on generated files is hard to > review, because stuff gets generated in different order, which renders > diffs of the generated files useless. >=20 > To get reviewable diffs, we need to split the generated files into > suitable parts: put every top-level declaration in a file named like > the thing declared, so we can diff top-level declarations regardless > of their order in the generated files. >=20 > Since I don't feel like parsing C, simply generate a // comment > identifying the declaration right before each top-level declaration. > This lets us split with a simple shell loop: >=20 As in 7/32, a tip to other reviewers: mkdir -p n > for i in q*-{commands,marshal,event,types,visit}.[ch] > do > csplit -n 4 -s "$i" '/^\/\//' '{*}' > for j in xx* > do > read h t <$j > [ "$h" =3D=3D "//" ] || t=3D"" =3D, not =3D=3D > mv $j "$i-${j#xx}-${t/ /-}" mv directly into n/$i-... here > done > done >=20 > Splits each file F into F-NUMB-ID, where NUMB counts up from 0001, and > ID comes from the // comment. >=20 > To check the split's sane, we can run >=20 > for i in q*-{commands,marshal,event,types,visit}.[ch] > do cat $i-* | diff $i - and test cat n/$i-* here. > done >=20 > We got a commit similar to this one right before the patches we want > to check. If you have that commit's split files in directory o, and > this commit's split files in directory n, you can diff them with this > loop: >=20 > for i in `(ls o; ls n) | sed -n 's/-[0-9][0-9][0-9][0-9]-/-*-/p' | = sort | uniq` Then o/* and n/* are populated correctly for this to work. > do > diff -uBp o/$i n/$i > done >=20 > Complete annotated output: Explanations are sound. (I may have more comments later after reviewing the intermediate patches; this email was just my early reminder hint on how I made your comparison easier to reproduce) Thanks again for doing this; it makes it a lot easier to be confident on the rest of the series. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --CMxkuhFtqD5q6W6QTmDrGLjvojGwIQ2iA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVwUSOAAoJEKeha0olJ0NqhqkH/AnzjfAZqEkLU0BWdZqEgrmD Wcusf8XIpSYrbgHXJOH32BAgl9yWNRjwS8WVh/CBQuW8JZXPO1xgQzFFsYB5j92x A40U2MbsmBSr+gOrVo4K3oXzI5nEFcToHELpYznDWVto54v4Qjo+8n2pvm33gKdQ xNXbMZipwT/+iYfXx6ZoAnS3pLPMraH3cTBw2fwSR04zax7LUwN56X4kw+yGrAbH ZzlMegw/FgZpQaRInZ0liqEY0fnKK63wDQpCOWIjbXSnQz/g3j1sBGHe+9e6HWk9 soNZiNKceF8n0w7k+YREnLfngCv9PiG+yMSCzCCP2l9KraPb1LAvKG69yAT+AjE= =bC/L -----END PGP SIGNATURE----- --CMxkuhFtqD5q6W6QTmDrGLjvojGwIQ2iA--