packages feed

darcs-beta 2.3.98.2 → 2.3.98.3

raw patch · 3 files changed

+25/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

darcs-beta.cabal view
@@ -1,5 +1,5 @@ Name: darcs-beta-version:        2.3.98.2+version:        2.3.98.3 License:        GPL License-file:   COPYING Author:         David Roundy <droundy@darcs.net>, <darcs-users@darcs.net>
release/distributed-context view
@@ -1,1 +1,1 @@-Just "\nContext:\n\n[TAG 2.3.98.2\nReinier Lamers <tux_rocker@reinier.de>**20100117211225\n Ignore-this: 6b00150eff9b4cbf81db6e2dabd336ad\n] \n"+Just "\nContext:\n\n[TAG 2.3.98.3\nReinier Lamers <tux_rocker@reinier.de>**20100126101458\n Ignore-this: eb49d49537d842e4556b177adb720c19\n] \n"
src/Darcs/Patch/Split.hs view
@@ -110,18 +110,32 @@  doPrimSplit :: Prim C(x y) -> Maybe (B.ByteString, B.ByteString -> Maybe (FL Prim C(x y))) doPrimSplit (FP fn (Hunk n before after))- = Just (B.concat $ intersperse (BC.pack "\n") $ (helptext ++ [sep] ++ before ++ [sep] ++ after ++ [sep]),+ = Just (B.concat $ intersperse (BC.pack "\n") $ concat+           [ helptext+           , [mkSep " BEFORE (reference) =========================="]+           , before+           , [mkSep "=== AFTER (edit) ============================="]+           , after+           , [mkSep "=== (edit above) ============================="]+           ],          \bs -> do let ls = BC.split '\n' bs-                   (_, ls') <- breakSep ls-                   (before', ls'') <- breakSep ls'-                   (after', _) <- breakSep ls''+                   (_, ls2) <- breakSep ls        -- before+                   (before', ls3) <- breakSep ls2 -- after 1+                   (after', _) <- breakSep ls3    -- after 2                    return (hunk before before' +>+ hunk before' after' +>+ hunk after' after))-    where sep = BC.pack "==="-          helptext = map BC.pack ["Interactive hunk edit:",-                                  " - Edit the first set of lines to insert a new change before the current one.",-                                  " - Edit the second set of lines to insert a new change after the current one."]+    where sep = BC.pack "=========================="+          helptext = map BC.pack [ "Interactive hunk edit:"+                                 , " - Edit the section marked 'AFTER'"+                                 , " - Arbitrary editing is supported"+                                 , " - This will only affect the patch, not your working copy"+                                 , " - Hints:"+                                 , "   - To split added text, delete the part you want to postpone"+                                 , "   - To split removed text, copy back the part you want to retain"+                                 , ""+                                 ]           hunk b a = canonize (FP fn (Hunk n b a))-          breakSep xs = case break (==sep) xs of+          mkSep s = BC.append sep (BC.pack s)+          breakSep xs = case break (sep `BC.isPrefixOf`) xs of                            (_, []) -> Nothing                            (ys, _:zs) -> Just (ys, zs) doPrimSplit _ = Nothing