[darcs-devel] A forwarded darcs patch

Ian Lynagh igloo at earth.li
Mon Jun 21 18:40:03 PDT 2004


The following patch was either unsigned, or signed by a non-allowed
key, or there was a gpg failure.

>From igloo at comlab.ox.ac.uk Mon Jun 21 21:40:03 2004
Return-path: <igloo at comlab.ox.ac.uk>
Envelope-to: droundy at abridgegame.org
Delivery-date: Mon, 21 Jun 2004 21:40:03 -0400
Received: from tx0.oucs.ox.ac.uk ([129.67.1.163])
	by www.abridgegame.org with esmtp (Exim 3.35 #1 (Debian))
	id 1BcaGY-0002ye-00
	for <droundy at abridgegame.org>; Mon, 21 Jun 2004 21:40:03 -0400
Received: from scan0.oucs.ox.ac.uk ([129.67.1.162] helo=localhost)
	by tx0.oucs.ox.ac.uk with esmtp (Exim 4.24)
	id 1BcaGX-0005vy-Eq
	for droundy at abridgegame.org; Tue, 22 Jun 2004 02:40:01 +0100
Received: from rx0.oucs.ox.ac.uk ([129.67.1.161])
 by localhost (scan0.oucs.ox.ac.uk [129.67.1.162]) (amavisd-new, port 25)
 with ESMTP id 22700-02 for <droundy at abridgegame.org>;
 Tue, 22 Jun 2004 02:40:01 +0100 (BST)
Received: from userpc15.comlab.ox.ac.uk ([163.1.27.191])
	by rx0.oucs.ox.ac.uk with esmtp (Exim 4.24)
	id 1BcaGN-0005t1-1B
	for droundy at abridgegame.org; Tue, 22 Jun 2004 02:39:51 +0100
Received: from igloo by userpc15.comlab.ox.ac.uk with local (Exim 3.35 #1 (Debian))
	id 1BcaGN-0000z6-00
	for <droundy at abridgegame.org>; Tue, 22 Jun 2004 02:39:51 +0100
To: Davids Darcs Repo <droundy at abridgegame.org>
Subject: darcs patch
DarcsURL: http://abridgegame.org/repos/darcs
Content-Type: multipart/mixed; boundary="aaack"
Message-Id: <E1BcaGN-0000z6-00 at userpc15.comlab.ox.ac.uk>
Sender: Ian Lynagh <igloo at comlab.ox.ac.uk>
Date: Tue, 22 Jun 2004 02:39:51 +0100

--aaack


Sun Jun 20 20:03:08 BST 2004  Ian Lynagh <igloo at earth.li>
  * Tidy up selection a bit

Tue Jun 22 02:27:47 BST 2004  Ian Lynagh <igloo at earth.li>
  * Bug fix: Make patch reversal happen later in with_any_selected_changes


--aaack
Content-Type: text/x-darcs-patch
Content-Description: A darcs patch for your repository!


New patches:

[Tidy up selection a bit
Ian Lynagh <igloo at earth.li>**20040620190308] {
hunk ./SelectChanges.lhs 78
-                          -> (Bool, Bool) -> [FilePath] -> [Patch]
+                          -> Bool -> [FilePath] -> [Patch]
hunk ./SelectChanges.lhs 84
-    with_any_selected_changes jobname opts s (False,False) [] ps job
+    with_any_selected_changes jobname opts s False [] ps job
hunk ./SelectChanges.lhs 86
-    with_any_selected_changes jobname opts s (False,False) fs ps job
+    with_any_selected_changes jobname opts s False fs ps job
hunk ./SelectChanges.lhs 88
-    with_any_selected_changes jobname opts s (True,False) [] ps job
+    with_any_selected_changes jobname opts s True [] ps job
hunk ./SelectChanges.lhs 90
-    with_any_selected_changes jobname opts s (True,True) [] ps job
+    with_any_selected_changes jobname opts s True [] (reverse ps) job
hunk ./SelectChanges.lhs 266
-with_any_selected_changes jobname opts _ order@(islast,isreverse) fs ps job =
+with_any_selected_changes jobname opts _ islast fs ps job =
hunk ./SelectChanges.lhs 278
-    do pc <- without_buffering $ tentatively_text_select jobname order opts ps
-             (find_first_maybe isreverse ps init_pc) $ init_pc
+    do pc <- case find_first_maybe ps init_pc of
+                 (ps_done, ps_todo, n) ->
+                     without_buffering $
+                     tentatively_text_select jobname islast opts (length ps) n
+                                             ps_done ps_todo init_pc
hunk ./SelectChanges.lhs 294
-find_first_maybe :: Bool -> [Patch] -> PatchChoices -> Int
-find_first_maybe isreverse ps pc = ffm 0
-    where ffm j | j >= length ps = 0
-                | is_patch_first p pc /= Nothing = ffm (j+1)
-                | otherwise = j
-                      where p = if isreverse
-                                then ps !! (length ps - j - 1)
-                                else ps !! j
+find_first_maybe :: [Patch] -> PatchChoices -> ([Patch], [Patch], Int)
+find_first_maybe ps pc = ffm [] ps 0
+    where ffm _ [] _ = ([], ps, 0)
+          ffm ps_done (p:ps_todo) j
+           | is_patch_first p pc /= Nothing = ffm (p:ps_done) ps_todo (j+1)
+           | otherwise = (ps_done, p:ps_todo, j)
hunk ./SelectChanges.lhs 301
-text_select :: String -> (Bool, Bool) -> [DarcsFlag] -> [Patch] -> Int
-            -> PatchChoices -> IO PatchChoices
+text_select :: String -> Bool -> [DarcsFlag] -> Int -> Int
+            -> [Patch] -> [Patch] -> PatchChoices -> IO PatchChoices
hunk ./SelectChanges.lhs 304
-text_select _ _ _ ps n pc | n >= length ps = return pc
-text_select jn order opts ps n pc | n < 0 = text_select jn order opts ps 0 pc
-text_select jn order@(islast,isreverse) opts ps n pc = do
+text_select _ _ _ _ _ _ [] pc = return pc
+text_select jn islast opts n_max n ps_done ps_todo@(p:ps_todo') pc = do
hunk ./SelectChanges.lhs 308
+           "(" ++ show (n+1) ++ "/" ++ show n_max ++ ") " ++
hunk ./SelectChanges.lhs 315
+    let do_next = tentatively_text_select jn islast opts n_max
+                                          (n+1) (p:ps_done) ps_todo'
+        repeat_this = text_select jn islast opts n_max n ps_done ps_todo pc
hunk ./SelectChanges.lhs 319
-      'y' -> tentatively_text_select jn order opts ps (n+1) $ force_yes p pc
-      'n' -> tentatively_text_select jn order opts ps (n+1) $ force_no p pc
-      's' -> tentatively_text_select jn order opts ps (n+1) $ skip_file
-      'f' -> tentatively_text_select jn order opts ps (n+1) $ do_file
+      'y' -> do_next $ force_yes p pc
+      'n' -> do_next $ force_no p pc
+      's' -> do_next $ skip_file
+      'f' -> do_next $ do_file
hunk ./SelectChanges.lhs 324
-                text_select jn order opts ps n pc
+                repeat_this
hunk ./SelectChanges.lhs 326
-                text_select jn order opts ps n pc
-      'w' -> tentatively_text_select jn order opts ps (n+1) $ make_uncertain p pc
-      'k' -> text_select jn order opts ps (n-1) pc
+                repeat_this
+      'w' -> do_next $ make_uncertain p pc
+      'k' -> case ps_done of
+                 [] -> repeat_this
+                 (p':ps_done') -> text_select jn islast opts n_max (n-1)
+                                              ps_done' (p':ps_todo) pc
hunk ./SelectChanges.lhs 335
-      'j' -> if n < length ps - 1
-             then text_select jn order opts ps (n+1) pc
-             else text_select jn order opts ps n pc
+      'j' -> case ps_todo' of
+                 [] -> repeat_this
+                 _ -> text_select jn islast opts n_max (n+1)
+                                  (p:ps_done) ps_todo' pc
hunk ./SelectChanges.lhs 340
-              text_select jn order opts ps n pc
+              repeat_this
hunk ./SelectChanges.lhs 343
-            p = if isreverse
-                then ps !! (length ps - n - 1)
-                else ps !! n
-            patches_to_skip = (p:) $ filter (is_similar p) $ drop n ps
+            patches_to_skip = (p:) $ filter (is_similar p) $ ps_todo'
hunk ./SelectChanges.lhs 356
-tentatively_text_select :: String -> (Bool, Bool) -> [DarcsFlag]
-                        -> [Patch] -> Int -> PatchChoices
+tentatively_text_select :: String -> Bool -> [DarcsFlag]
+                        -> Int -> Int -> [Patch] -> [Patch] -> PatchChoices
hunk ./SelectChanges.lhs 359
-tentatively_text_select jn order@(_,isreverse) opts ps n pc
-    | n < 0 = tentatively_text_select jn order opts ps 0 pc
-    | n >= length ps = return pc
+tentatively_text_select _ _ _ _ _ _ [] pc = return pc
+tentatively_text_select jn islast opts n_max n ps_done ps_todo@(p:ps_todo') pc
hunk ./SelectChanges.lhs 362
-        = tentatively_text_select jn order opts ps (n+1) pc
-    | otherwise = text_select jn order opts ps n pc
-    where p = if isreverse
-              then ps !! (length ps - n - 1)
-              else ps !! n
+        = tentatively_text_select jn islast opts n_max (n+1) (p:ps_done) ps_todo' pc
+    | otherwise = text_select jn islast opts n_max n ps_done ps_todo pc
}

[Bug fix: Make patch reversal happen later in with_any_selected_changes
Ian Lynagh <igloo at earth.li>**20040622012747] {
hunk ./SelectChanges.lhs 78
-                          -> Bool -> [FilePath] -> [Patch]
+                          -> Bool -> Bool -> [FilePath] -> [Patch]
hunk ./SelectChanges.lhs 84
-    with_any_selected_changes jobname opts s False [] ps job
+    with_any_selected_changes jobname opts s False False [] ps job
hunk ./SelectChanges.lhs 86
-    with_any_selected_changes jobname opts s False fs ps job
+    with_any_selected_changes jobname opts s False False fs ps job
hunk ./SelectChanges.lhs 88
-    with_any_selected_changes jobname opts s True [] ps job
+    with_any_selected_changes jobname opts s True False [] ps job
hunk ./SelectChanges.lhs 90
-    with_any_selected_changes jobname opts s True [] (reverse ps) job
+    with_any_selected_changes jobname opts s True True [] ps job
hunk ./SelectChanges.lhs 266
-with_any_selected_changes jobname opts _ islast fs ps job =
+with_any_selected_changes jobname opts _ islast isreversed fs ps job =
hunk ./SelectChanges.lhs 278
-    do pc <- case find_first_maybe ps init_pc of
+    do pc <- case find_first_maybe ps' init_pc of
hunk ./SelectChanges.lhs 286
-    where init_pc = deselect_not_touching fs $
+    where ps' = if isreversed then reverse ps else ps
+          init_pc = deselect_not_touching fs $
}



Context:

[add hash of patch bundles.
David Roundy <droundy at abridgegame.org>**20040621102255
 Also, reorganize patch bundle code a bit.
] 
[Make capitalization and punctuation consistent for help lines
schaffner at gmx.li**20040619172824] 
[fix failure to run test on darcs record.
David Roundy <droundy at abridgegame.org>**20040620003115] 
[fix failure to run test in darcs check.
David Roundy <droundy at abridgegame.org>**20040620002450] 
[possibly speed up takePS and dropPS a tad.
David Roundy <droundy at abridgegame.org>**20040620001216
 This just eliminates a couple of adds and subtracts from each.
] 
[actually get FILENAME_SIZE right.
David Roundy <droundy at abridgegame.org>**20040619104147] 
[increase FILENAME_SIZE (fixes some errors with locking).
droundy at abridgegame.org**20040619103451] 
[fix warnings in Test.lhs.
droundy at abridgegame.org**20040619103433] 
[add extra-informative error messages in careful_atomic_create.
David Roundy <droundy at abridgegame.org>**20040619095620] 
[mention command-specific help in generic help.
David Roundy <droundy at abridgegame.org>**20040619094234] 
[don't need use_mmap in Repository.lhs.
David Roundy <droundy at abridgegame.org>**20040618112000] 
[make optimize --checkpoint give nicer formatted message.
David Roundy <droundy at abridgegame.org>**20040618111941] 
[fix bug in optimize --checkpoint.
David Roundy <droundy at abridgegame.org>**20040618111904] 
[fix bug in rm_recursive.
David Roundy <droundy at abridgegame.org>**20040618102014] 
[add vertical space between explanations in --extended-help
schaffner at gmx.li**20040617202923] 
[properly support --verbose and --quiet in add.
David Roundy <droundy at abridgegame.org>**20040617105614] 
[replace binary web page links with single link to wiki.
David Roundy <droundy at abridgegame.org>**20040617101920] 
[adjust nomenclature in --extended-help and command overview table.
David Roundy <droundy at abridgegame.org>**20040617100354] 
[reorder commands in --help and --extended-help.
David Roundy <droundy at abridgegame.org>**20040617094142] 
[darcs-server should recommend xsltproc.
David Roundy <droundy at abridgegame.org>**20040617091533] 
[Merge debian/ directory with 0.9.20-1
Gabriel Ebner <ge at gabrielebner.at>**20040616140614] 
[Tiny tidyup
Ian Lynagh <igloo at earth.li>**20040616180606] 
[don't display binary data to screen.
David Roundy <droundy at abridgegame.org>**20040616110333
 Note that if you pipe the output of whatsnew, you will actually get the
 binary data.  The reason is that you aren't printing to a screen, so the
 print code doesn't "know" that you don't want the actual patch.
] 
[allow --tag in match_several.
David Roundy <droundy at abridgegame.org>**20040616100541] 
[add comments regarding wait_a_moment.
David Roundy <droundy at abridgegame.org>**20040616100528] 
[stop creating the is_converted files... they aren't needed any more.
David Roundy <droundy at abridgegame.org>**20040616094647] 
[be smarter about finding tags.
David Roundy <droundy at abridgegame.org>**20040615111311
 This fixes bugs in --partial repositories, and speeds up full
 repositories.
] 
[switch from IO.bracket to Control.Exception.bracket.
David Roundy <droundy at abridgegame.org>**20040615111254] 
[DARCS_EDITOR rather than DARCSEDITOR
peter.maxwell at anu.edu.au**20040615080155] 
[Use withCurrentDirectory.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040614225821
 Replace setCurrentDirectory usages with withCurrentDirectory, which
 ensures bracketing.  This does not replace all uses, just the more
 obvious ones.
] 
[Implement withCurrentDirectory.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040614221212] 
[when given a --patches flag with --dry-run, display only what would actually get pulled.
David Roundy <droundy at abridgegame.org>**20040614104532] 
[fix bug in selecting patches by pattern.
David Roundy <droundy at abridgegame.org>**20040614104446] 
[fix bug in force_matching_last.
David Roundy <droundy at abridgegame.org>**20040614104432] 
[mention in docs that you don't need to run autoconf manually.
David Roundy <droundy at abridgegame.org>**20040614101757] 
[update docs on contributing patches.
David Roundy <droundy at abridgegame.org>**20040614101435] 
[don't cause an error when pulling a change creating a dir that's already in workin dir.
David Roundy <droundy at abridgegame.org>**20040614095656] 
[Make locks work on non-POSIX filesystems.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040613225300
 Probably Linux-specific.
] 
[Better error reporting for lockfile creation.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040613223236] 
[mention darcs-devel on website.
David Roundy <droundy at abridgegame.org>**20040613111107] 
[fix bug when specifying logfile in a subdirectory.
David Roundy <droundy at abridgegame.org>**20040613110227
 Darcs wasn't correcting the relative path of the logfile, and thus was
 losing the logfile.
] 
[web page fixes.
David Roundy <droundy at abridgegame.org>**20040613104246] 
[give nice error message when adding a file to a directory that isn't in the repo.
David Roundy <droundy at abridgegame.org>**20040613103521] 
[support backslashes for directory separators in windows.
David Roundy <droundy at abridgegame.org>**20040613101834] 
[make windows link go to wiki page.
David Roundy <droundy at abridgegame.org>**20040613095337] 
[fix make install-server problem with darcs.cgi when making debs.
David Roundy <droundy at abridgegame.org>**20040613095307] 
[Avoid unpacking PackedStrings in the printer.
jch at pps.jussieu.fr**20040613000234
 Darcs reads file data into PackedStrings, but unpacks them when
 printing out a patch.
       
 The fix is to make the printer able to grok streams of arbitrary
 tokens, not just Haskell strings (streams of Char).  See the type
 class Printer.Printable and the instance Printer.PChar.  See also the
 type synonim PrintPatch.PrinterType, which is what gets actually used.
 
 The net effect is that darcs whatsnew is more than twice as fast, and
 darcs pull of large patches uses 10 (!) times less memory.  On the
 other hand, darcs pull of many small patches uses up a few percent
 more CPU time, which I don't understand.
] 
[Install xslt files with appropriate perms
Nigel Rowe <rho at swiftdsl.com.au>**20040612113632] 
[TAG 0.9.21
David Roundy <droundy at abridgegame.org>**20040612105625] 

Patch bundle hash:
402bdd465984aff346af23dcadc921a6c31b82ec

--aaack





More information about the darcs-devel mailing list