Make darcs friendlier and more reliable
Darcs has long been the most user-friendly vcs, and very reliable. But let's not forget that a friend in need is a friend indeed. This patch introduces the --advice flag to a few commands. When you're in need of advice, this flag unleashes darcs' powers of compassion to give you the best personal advice for your situation.
Note: the behaviour -> messages database should be enriched.
Personnalwith PersonalPersonnalwith Personalpersonnalwith personal usePacks, recordRollback, amendUnrecord
usePacks, recordRollback, amendUnrecord, personnal
getContent Personnal = NoContent
personnal :: DarcsOption
personnal = DarcsSingleOption $
DarcsNoArgOption [] ["advice"] Personnal "give personnal advice"
, unified
, unified, personal
, personal
import Darcs.Arguments ( DarcsFlag( DryRun, Sign, SignAs, NoSign, SignSSL ),
import Darcs.Arguments ( DarcsFlag( DryRun, Sign, SignAs, NoSign, SignSSL, Personal ),
personal,
changesReverse
changesReverse, personal
changesReverse] ++
changesReverse,
personal] ++
putInfo opts $
if Personal `elem` opts
then putInfo opts $
text "You don't want to push anything, that's very considerate"
else putInfo opts $
exitWith ExitSuccess
exitWith ExitSuccess
PatchName, AskDeps, All ),
PatchName, AskDeps, All, Personal ),
, unified )
, unified, personal )
setScriptsExecutableOption],
setScriptsExecutableOption,
personal],
do putStrLn "Ok, if you don't want to record anything, that's fine!"
do if Personal `elem` opts
then
putStrLn "Better not record anything, they'd use it as evidence!"
else
putStrLn "Ok, if you don't want to record anything, that's fine!"
import Darcs.Arguments ( DarcsFlag( All, Debug ),
import Darcs.Arguments ( DarcsFlag( All, Debug, Personal ),
listRegisteredFiles, umaskOption, unified
listRegisteredFiles, umaskOption, unified,
personal
when Personal `elem` opts $
putStrLn "rembember, forgiving would be better than forgetting"
fixSubPaths, listRegisteredFiles )
fixSubPaths, listRegisteredFiles, personal )
, commandAdvancedOptions = [ignoretimes, noskipBoring]
, commandAdvancedOptions = [ignoretimes, noskipBoring, personal]
exitOnNoChanges (NilFL, NilFL) = do putStrLn "No changes!"
exitWith $ ExitFailure 1
exitOnNoChanges (NilFL, NilFL) | Personal `elem` opts =
do putStrLn "Nothing new, maybe you should work on your patience"
exitWith $ ExitFailure 1
exitOnNoChanges (NilFL, NilFL) | otherwise = do putStrLn "No changes!"
exitWith $ ExitFailure 1
| Personnal
, SkipConflicts )
, SkipConflicts, Personal )
Nothing ->
putStrLn $ "Cancelling " ++ jn ++ " since no patch was selected."
Nothing -> if Personal `elem` o && jn == "amend"
then
putStrLn $ "You don't want to amend anything, that's fine with be, but maybe you should learn to compromise."
else
putStrLn $ "Cancelling " ++ jn ++ " since no patch was selected."