[darcs-devel] darcs patch: Fix patch selection for command changes
--context
Daniel Bünzli
daniel.buenzli at epfl.ch
Thu Nov 17 07:20:39 PST 2005
Thu Nov 17 15:51:12 CET 2005 Daniel Bünzli <daniel.buenzli at epfl.ch>
* Fix patch selection for command changes --context
Hello,
Please double check this, I'm really not into darcs' internals (but I really want this feature). At least, the test suite succeeds. I briefly explain what I did.
The patch that added the support for patch selection to --context is
> darcs changes -p 'context.*--to-patch' -v
Wed Dec 22 21:37:54 CET 2004 Anthony Towns <aj at azure.humbug.org.au>
* make darcs changes --context support --to-patch, etc
hunk ./Changes.lhs 210
- putDocLn $ changelog opts' $ get_changes_info [] []
+ putDocLn $ changelog opts' $ get_changes_info opts' []
The patch that broke the functionnality must be that one (i.e. the
latest that touched the lines).
> darcs changes -p 'fix bug #544' -v
Sun Oct 9 13:49:41 CEST 2005 David Roundy <droundy at darcs.net>
* fix bug #544, caused by outputing changes --context with escaping and coloring.
hunk ./Changes.lhs 25
-import DarcsArguments ( DarcsFlag(Context, MachineReadable, HumanReadable,
+import DarcsArguments ( DarcsFlag(Context, MachineReadable,
hunk ./Changes.lhs 45
-import Printer ( Doc, putDocLnWith, renderPS, renderString, prefix,
+import Printer ( Doc, putDocLnWith, simplePrinters, renderPS,
+ renderString, prefix,
hunk ./Changes.lhs 219
- putDocLnWith fancyPrinters $ changelog opts' $ get_changes_info opts' []
- [head $ slightly_optimize_patchset r]
- where opts' = if HumanReadable `elem` opts || XMLOutput `elem` opts
- then opts
- else MachineReadable : opts
+ putDocLnWith simplePrinters $ changelog [MachineReadable] $
+ get_changes_info [MachineReadable] []
+ [head $ slightly_optimize_patchset r]
My patches restores the functionnality by just passing 'MachineReadable : opts' to 'changelog' and 'get_changes_info'. I hope its the right way to do it. At least it seems to works here.
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 945 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20051117/c41f4d61/attachment.bin
More information about the darcs-devel
mailing list