filter out control characters in all other Messages
This does, as a side effect, make long notes in json output not be indented. The indentation is only needed to offset them underneath the display of the file they apply to, so that's ok. Sponsored-by: Brock Spratlen on Patreon
This commit is contained in:
parent
a0e6fa18eb
commit
8b6c7bdbcc
54 changed files with 183 additions and 164 deletions
|
@ -98,7 +98,7 @@ mergeToAdjustedBranch tomerge (origbranch, adj) mergeconfig canresolvemerge comm
|
|||
-- (for an unknown reason).
|
||||
-- http://thread.gmane.org/gmane.comp.version-control.git/297237
|
||||
inRepo $ Git.Command.run [Param "reset", Param "HEAD", Param "--quiet"]
|
||||
showAction $ "Merging into " ++ fromRef (Git.Ref.base origbranch)
|
||||
showAction $ UnquotedString $ "Merging into " ++ fromRef (Git.Ref.base origbranch)
|
||||
merged <- autoMergeFrom' tomerge Nothing mergeconfig commitmode True
|
||||
(const $ resolveMerge (Just updatedorig) tomerge True)
|
||||
if merged
|
||||
|
|
|
@ -243,7 +243,7 @@ updateTo' pairs = do
|
|||
" into " ++ fromRef name
|
||||
localtransitions <- getLocalTransitions
|
||||
unless (null tomerge) $ do
|
||||
showSideAction merge_desc
|
||||
showSideAction (UnquotedString merge_desc)
|
||||
mapM_ checkBranchDifferences refs
|
||||
mergeIndex jl refs
|
||||
let commitrefs = nub $ fullname:refs
|
||||
|
|
|
@ -404,8 +404,8 @@ checkSqliteWorks = do
|
|||
Right () -> return ()
|
||||
Left e -> do
|
||||
showLongNote $ "Detected a filesystem where Sqlite does not work."
|
||||
showLongNote $ "(" ++ show e ++ ")"
|
||||
showLongNote $ "To work around this problem, you can set annex.dbdir " ++
|
||||
showLongNote $ UnquotedString $ "(" ++ show e ++ ")"
|
||||
showLongNote $ "To work around this problem, you can set annex.dbdir " <>
|
||||
"to a directory on another filesystem."
|
||||
showLongNote $ "For example: git config annex.dbdir $HOME/cache/git-annex"
|
||||
giveup "Not initialized."
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
|
||||
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, OverloadedStrings #-}
|
||||
|
||||
module Annex.NumCopies (
|
||||
module Types.NumCopies,
|
||||
|
@ -277,17 +277,17 @@ notEnoughCopies :: Key -> NumCopies -> MinCopies -> [VerifiedCopy] -> [UUID] ->
|
|||
notEnoughCopies key neednum needmin have skip bad nolocmsg lockunsupported = do
|
||||
showNote "unsafe"
|
||||
if length have < fromNumCopies neednum
|
||||
then showLongNote $
|
||||
then showLongNote $ UnquotedString $
|
||||
"Could only verify the existence of " ++
|
||||
show (length have) ++ " out of " ++ show (fromNumCopies neednum) ++
|
||||
" necessary " ++ pluralcopies (fromNumCopies neednum)
|
||||
else do
|
||||
showLongNote $ "Unable to lock down " ++ show (fromMinCopies needmin) ++
|
||||
showLongNote $ UnquotedString $ "Unable to lock down " ++ show (fromMinCopies needmin) ++
|
||||
" " ++ pluralcopies (fromMinCopies needmin) ++
|
||||
" of file necessary to safely drop it."
|
||||
if null lockunsupported
|
||||
then showLongNote "(This could have happened because of a concurrent drop, or because a remote has too old a version of git-annex-shell installed.)"
|
||||
else showLongNote $ "These remotes do not support locking: "
|
||||
else showLongNote $ UnquotedString $ "These remotes do not support locking: "
|
||||
++ Remote.listRemoteNames lockunsupported
|
||||
|
||||
Remote.showTriedRemotes bad
|
||||
|
|
|
@ -96,7 +96,7 @@ autoEnable = do
|
|||
Nothing -> cu
|
||||
case (lookupName c, findType c) of
|
||||
(Just name, Right t) -> do
|
||||
showSideAction $ "Auto enabling special remote " ++ name
|
||||
showSideAction $ UnquotedString $ "Auto enabling special remote " ++ name
|
||||
dummycfg <- liftIO dummyRemoteGitConfig
|
||||
tryNonAsync (setup t (AutoEnable c) (Just u) Nothing c dummycfg) >>= \case
|
||||
Left e -> warning (UnquotedString (show e))
|
||||
|
|
|
@ -339,7 +339,7 @@ configuredRetry numretries _old new = do
|
|||
if numretries < maxretries
|
||||
then do
|
||||
let retrydelay = Seconds (initretrydelay * 2^(numretries-1))
|
||||
showSideAction $ "Delaying " ++ show (fromSeconds retrydelay) ++ "s before retrying."
|
||||
showSideAction $ UnquotedString $ "Delaying " ++ show (fromSeconds retrydelay) ++ "s before retrying."
|
||||
liftIO $ threadDelaySeconds retrydelay
|
||||
return True
|
||||
else return False
|
||||
|
|
|
@ -128,7 +128,7 @@ resumeVerifyKeyContent k f iv = liftIO (positionIncrementalVerifier iv) >>= \cas
|
|||
liftIO $ catchDefaultIO (Just False) $
|
||||
finalizeIncrementalVerifier iv
|
||||
| otherwise = do
|
||||
showAction (descIncrementalVerifier iv)
|
||||
showAction (UnquotedString (descIncrementalVerifier iv))
|
||||
liftIO $ catchDefaultIO (Just False) $
|
||||
withBinaryFile (fromRawFilePath f) ReadMode $ \h -> do
|
||||
hSeek h AbsoluteSeek endpos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue