If this makes sense to you, I think it should probably go into stable as well.

Mon Nov 19 05:11:11 CET 2007  Eric Kow <[EMAIL PROTECTED]>
  * Simplify getCurrentDirectorySansDarcs out of existence.
  
  It was buggy and needlessly complicated.

New patches:

[Simplify getCurrentDirectorySansDarcs out of existence.
Eric Kow <[EMAIL PROTECTED]>**20071119041111
 
 It was buggy and needlessly complicated.
] {
hunk ./src/Darcs/Lock.lhs 36
-import Data.List ( isPrefixOf, inits )
hunk ./src/Darcs/Lock.lhs 63
-#include "impossible.h"
hunk ./src/Darcs/Lock.lhs 175
-          look_for_tmp [] = try_directory "/tmp" getCurrentDirectorySansDarcs
+          look_for_tmp [] = try_directory "/tmp" (sansDarcs `fmap` getCurrentDirectory)
hunk ./src/Darcs/Lock.lhs 180
-getCurrentDirectorySansDarcs :: IO FilePath
-getCurrentDirectorySansDarcs = do
-  c <- getCurrentDirectory
-  case drop 5 $ reverse $ takeWhile no_darcs $ inits c of
-    []    -> impossible
-    (d:_) -> return d
-  where no_darcs x = not $ "_darcs" `isPrefixOf` x
+sansDarcs :: FilePath -> FilePath
+sansDarcs "" = ""
+sansDarcs ('_':'d':'a':'r':'c':'s':_) = ""
+sansDarcs (x:xs) = x : sansDarcs xs
}

Context:

[TAG darcs unstable 2007-11-04
Eric Kow <[EMAIL PROTECTED]>**20071104235616] 
Patch bundle hash:
049b43f0a4ac63e05f0b5f382c4df8b12deb63b6
_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to