Ian Lynagh <[EMAIL PROTECTED]> writes:
> > How about removing --xml-output and:
> > | grep '^ \* ' | head -n 1 | sed 's| \* ||'
> > (`head` just in case the detailed text has a line starting with "* ")
Note that in the textual output of 'darcs changes', inverted patches
(i.e. made with 'darcs rollback') do not begin with *, but with UNDO:.
Also, 'darcs tag' makes a patch that begins with the word 'tag' rather
than *.
> We have several Haskell XML libraries, so we ought to be able to do it
> properly
There already exists an XML-aware grep-like tool, called Xtract, in
HaXml. :-) We want ideally a simple call like
Xtract "//patch[0]/name/-"
(reading backwards) to get the text inside any <name> element inside the
zeroth <patch> element.
Unfortunately, I think HaXml likes to preserve entities in the output of
the text filter too. But I could add a new command-line option to
Xtract to squash entities to the text they represent...
Regards,
Malcolm
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc