[darcs-users] darcs patch: make -q have an effect with darcs changes (show just p...
Trent W. Buck
trentbuck at gmail.com
Wed Sep 10 00:53:21 UTC 2008
Eric Kow <kowey at darcs.net> writes:
> On Thu, Sep 04, 2008 at 19:17:40 -0400, David Roundy wrote:
>> > Currently the --quiet flag has no effect on darcs changes. This is
>> > inconsistent with the --help docs, and an opportunity; this patch makes it
>> > show just the patch names, one per line. I find this surprisingly useful
>> > for scripting and for getting a quick handle on what's going on. If
>> > accepted we should consider doing in other places where appropriate.
>
> Personally, I would prefer not to overload the meaning of -q, which
> currently 'suppresses informational output', nor to add yet another
> switch to darcs changes.
>
> I think this could be achieved with something like
> darcs changes --xml | grep name | sed -e 's/.*<name>//' -e 's!</name>!!'
>
> which is admittably clunkier than darcs changes -q
Remember that parsing XML on a per-line basis is evil and wrong!
An XML-wise extraction of <name> content, separated by newlines:
darcs changes --xml |
xmlstarlet select --template --match changelog/patch/name --value-of . --nl
More information about the darcs-users
mailing list