Hi Ian and others,

I'd appreciate if you'd take a careful look at this patch.  I think I
didn't change the behavior of the code (except making it lazier), but this
is the sort of code in which one can make changes that work fine until some
rare repository comes along and suddenly they cause corruption.

David

Sun Aug  7 09:19:00 EDT 2005  David Roundy <[EMAIL PROTECTED]>
  * simplify get_common_and_uncommon code, and make it lazier.
  This addresses the bug noticed by Florian, where we were downloading an
  unnecesary file from the remote inventories/.

New patches:

[simplify get_common_and_uncommon code, and make it lazier.
David Roundy <[EMAIL PROTECTED]>**20050807131900
 This addresses the bug noticed by Florian, where we were downloading an
 unnecesary file from the remote inventories/.
] 
<
> {
hunk ./Depends.lhs 61
 gcau (ps1,[[]]) = return ([],[concat ps1],[[]])
 gcau ([[]],ps2) = return ([],[[]],[concat ps2])
 gcau ([(pi1,_)]:_,[(pi2,_)]:_) | pi1 == pi2 = return ([pi1],[[]],[[]])
-gcau (ps1:ps1b:ps1s,ps2:ps2b:ps2s) =
-  if (fst $ last ps1) == (fst $ last ps2)
-  then gcau_simple (ps1, ps2)
-  else if length ps1 > length ps2
-       then gcau (ps1:ps1b:ps1s, (ps2++ps2b):ps2s)
-       else gcau ((ps1++ps1b):ps1s, ps2:ps2b:ps2s)
-
-gcau (ps1:ps1b:ps1s,[ps2]) =
-  if (fst $ last ps1) == (fst $ last ps2)
-  then gcau_simple (ps1, ps2)
-  else gcau ((ps1++ps1b):ps1s, [ps2])
-gcau ([ps1],ps2:ps2b:ps2s) =
-  if (fst $ last ps1) == (fst $ last ps2)
-  then gcau_simple (ps1, ps2)
-  else gcau ([ps1], (ps2++ps2b):ps2s)
-
+gcau (ps1:_, ps2:_)
+    | (fst $ last ps1) == (fst $ last ps2) = gcau_simple (ps1, ps2)
+gcau (ps1:ps1b:ps1s,ps2:ps2s)
+    | length ps1 <= length ps2 = gcau ((ps1++ps1b):ps1s, ps2:ps2s)
+gcau (ps1s, ps2:ps2b:ps2s) = gcau (ps1s, (ps2++ps2b):ps2s)
+gcau (ps1:ps1b:ps1s,[ps2]) = gcau ((ps1++ps1b):ps1s, [ps2])
 gcau ([ps1],[ps2]) = gcau_simple (ps1, ps2)
hunk ./Depends.lhs 68
-gcau ([ps1],ps2s) = gcau ([ps1],[concat ps2s])
-gcau (ps1s,[ps2]) = gcau ([concat ps1s],[ps2])
-gcau _ = bug "Unchecked args possibility in get_common_and_uncommon"
+gcau ([], _) = impossible
+gcau (_, []) = impossible
 
 gcau_simple :: ([(PatchInfo, Maybe Patch)], [(PatchInfo, Maybe Patch)]) 
             -> Either MissingPatch ([PatchInfo],PatchSet,PatchSet)
}

Context:

[fix obsolete error explanation in get_extra bug.
David Roundy <[EMAIL PROTECTED]>**20050804130610] 
[simplify fix for bug 463; reuse /// from FilePathUtils
Matt Lavin <[EMAIL PROTECTED]>**20050804021130] 
[Make curl exit with error on failed downloads
[EMAIL PROTECTED] 
[Bump up AC_PREREQ version to 2.59.
[EMAIL PROTECTED] 
[fix for bug 463 (with new test)
Matt Lavin <[EMAIL PROTECTED]>**20050802002116] 
[bump version number, since I just made a release.
David Roundy <[EMAIL PROTECTED]>**20050731190756] 
[Use simpler curl_version() function to get version string.
Kannan Goundan <[EMAIL PROTECTED]>**20050322221027] 
[fix documentation on --reorder-patches.
David Roundy <[EMAIL PROTECTED]>**20050731185406] 
[add changelog entry for bug #224.
David Roundy <[EMAIL PROTECTED]>**20050731133942] 
[fix bug when editing long comment leaves empty file.
David Roundy <[EMAIL PROTECTED]>**20050731133612] 
[TAG 1.0.4pre2
David Roundy <[EMAIL PROTECTED]>**20050731121029] 
Patch bundle hash:
80c498c029a017fb11d6d41e4f3686faf75a19b4
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to