Sun Jun 12 19:49:25 CEST 2005 Tommy Pettersson <ptp@xxxxxxxxxxxxxx>
* bugfix, make _darcs/prefs/defaults really override $HOME/.darcs/defaults
Variants of the same flag from the two defaults files where just merged,
and an ALL in the local defaults could not override an explicit command
in the global defaults, as would be expected.
New patches:
[bugfix, make _darcs/prefs/defaults really override $HOME/.darcs/defaults
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20050612174925
Variants of the same flag from the two defaults files where just merged,
and an ALL in the local defaults could not override an explicit command
in the global defaults, as would be expected.
]
<
> {
hunk ./ArgumentDefaults.lhs 19
\begin{code}
module ArgumentDefaults ( get_default_flag,
) where
-import Monad ( liftM, liftM2 )
+import Monad (
+ liftM,
+ )
import Maybe ( catMaybes )
import DarcsArguments
hunk ./ArgumentDefaults.lhs 86
\begin{code}
get_default_flag com flag = do
- defs <- get_defaults
- case gda com flag defs of
- [] -> return $ gda "ALL" flag defs
- f -> return $ f
+ repo_defs <- default_content $ get_preflist "defaults"
+ global_defs <- default_content $ get_global "defaults"
+ case get_flag_from repo_defs of
+ [] -> return $ get_flag_from global_defs
+ f -> return $ f
+ where
+ get_flag_from defs =
+ case gda com flag defs of
+ [] -> gda "ALL" flag defs
+ f -> f
gda :: String -> DarcsOption -> [(String,String,String)] -> [DarcsFlag]
gda com opt all_defs = gda' $ filter (\ (c,_,_)-> c == com) all_defs
hunk ./ArgumentDefaults.lhs 115
drop_dashdash ('-':'-':a) = a
drop_dashdash a = a
-get_defaults :: IO [(String,String,String)]
-get_defaults = default_content $
- liftM2 (++) (get_preflist "defaults") (get_global "defaults")
\end{code}
}
Context:
[update web page to reflect new stable release (1.0.3)
Tomasz Zielonka <tomasz.zielonka@xxxxxxxxx>**20050524225643]
[TAG 1.0.3
Tomasz Zielonka <tomasz.zielonka@xxxxxxxxx>**20050524215127]
Patch bundle hash:
bdbd7cf70ca493628eaccdda4a2b56f2a0ae12eb
_______________________________________________
darcs-devel mailing list
darcs-devel@xxxxxxxxx
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
|