[PATCH 1 of 1] acl: skip unneeded lines in hg output

Cameron Simpson cs at zip.com.au
Wed May 30 19:00:28 CDT 2012


On 30May2012 13:45, Elifarley Callado Coelho Cruz <elifarley at gmail.com> wrote:
| On a purely stylistic note, I prefer to write this kind of thing thus:
| > sed -e '
| > /^files:/d
| > /^bundling:/d
| > /^changesets:/d
| > /^manifests:/d
| > /^searching for changes/d
| > /^all remote heads known locally/d
| > /^invalidating branch cache/d
| > '
| > because it far easier to read/debug/modify.
| 
| I was not aware that you could pass multiple expressions to sed as you
| suggested.

Oh, you can even omit the "-e" if the script does not start with a dash.

| It does look better and easier to work with, so I'll send another patch
| with your suggestion. Thanks!

No worries.

| Regarding the "2>&1": it was intentional:
| 1) I must filter out some lines that go to stderr, like "invalidating
| branch cache (tip differs)", so if I get a single stream of lines, it's
| easy to filter some of them, regardless of their origin
| 2) I was not really interested in the exit status of the command. If the
| exit status changes, then the previous lines will most likely change too
| 
| Despite 2), I'll post a patch which prints a different line according to
| the exit status of the hg push command.

Will be interested to see it.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Piracy gets easier every day, but listening to legally purchased music gets harder by the day.
Firehed - http://politics.slashdot.org/comments.pl?sid=179175&cid=14846089


More information about the Mercurial-devel mailing list