[PATCH 1 of 1] acl: skip unneeded lines in hg output
Mads Kiilerich
mads at kiilerich.com
Tue May 29 18:55:04 CDT 2012
Cameron Simpson wrote, On 05/30/2012 01:14 AM:
> First time sticking my head above water here. If I'm off the guidelines
> please let me know.
>
> Two remarks, one style and one a bug concern:
>
> On 28May2012 10:47, elifarley at gmail.com<elifarley at gmail.com> wrote:
> | acl: skip unneeded lines in hg output
> [...]
> | +> skiplines() {
> | +> sed -e /^files:/d -e /^bundling:/d -e /^changesets:/d -e /^manifests:/d \
> | +> -e '/^searching for changes/d' \
> | +> -e '/^all remote heads known locally/d' \
> | +> -e '/^invalidating branch cache/d' \
>
> 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
> '
Are sure that style _really_ is cross platform - also to dinosaur *nix
and os/x?
...
> There are a few problems with this.
This is 'just' a test and doesn't have to be as stable and
well-engineered as normal shell scripts used in production on arbitrary
input. Keeping it minimal and as simple as possible (and perhaps even
simpler than that) is also important.
You might however be right in this case - I don't know.
/Mads
More information about the Mercurial-devel
mailing list