[darcs-devel] [issue995] changes --context : {--human-readable, --xml-output} have no effect

Nathaniel Filardo bugs at darcs.net
Thu Aug 14 00:52:22 UTC 2008


New submission from Nathaniel Filardo <nwf at cs.jhu.edu>:

Running "darcs changes --context" seems to ignore --human-readable and
--xml-output, perhaps as it should, but then the documentation is wrong.  I'm 
not sure which way this goes.

Quoth the source (Darcs/Command/Changes.lhs):

190 changelog opts patchset (pis, fs, errstring)
191     | Count `elem` opts = -- ...
192     | MachineReadable `elem` opts =
...
196     | XMLOutput `elem` opts =
...
263 changes_context repository opts = do
...
267     putDocLnWith simplePrinters $ changelog opts' NilRL ...
...
270     where opts' = MachineReadable : opts

And the dox:

255 ... Note that
256 while the \verb!--context! flag may be used in conjunction with
257 \verb!--xml-output! or \verb!--human-readable!, in neither case will darcs
258 get be able to read the output.  On the other hand, sufficient information
259 \emph{will} be output for a knowledgeable human to recreate the current
260 state of the repository.

The point is that because opts' includes MachineReadable, changelog will
match that guard before any other (except --count, which is forbidden with
--context earlier).  Thus --xml-output and --human-readable are effectively
ignored.

--nwf;

----------
messages: 5497
nosy: beschmi, dagit, darcs-devel, jaredj, kowey, nwf, simon
priority: bug
status: unread
title: changes --context : {--human-readable,--xml-output} have no effect
topic: ProbablyEasy, UI

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue995>
__________________________________


More information about the darcs-devel mailing list