[darcs-devel] [patch749] resolve issue1812: follow emacs convention for backup ...
Gabriel Kerneis
kerneis at pps.jussieu.fr
Sat Mar 10 06:27:41 UTC 2012
On Fri, Mar 09, 2012 at 10:05:16PM +0000, miguel.pagano wrote:
> Fri Mar 9 19:01:49 ART 2012 miguel.pagano+darcs at gmail.com
> * resolve issue1812: follow emacs convention for backup files
The patch looks correct but I’m still not convinced issue1812 is relevant.
Why should darcs use emacs convention? Darcs is not Emacs!
> import System.Posix.Files ( createLink )
> -import System.Directory ( createDirectoryIfMissing )
> -import System.FilePath.Posix ( (</>), takeDirectory, normalise )
> +import System.FilePath.Posix ( (</>), normalise )
>
> import Darcs.Flags ( DarcsFlag( SignAs, Sign, SignSSL,
> Verify, VerifySSL )
> hunk ./src/Darcs/External.hs 126
> backupBy backup f =
> do hasBF <- doesFileExist f
> hasBD <- doesDirectoryExist f
> - when (hasBF || hasBD) $ helper (0::Int)
> + when (hasBF || hasBD) $ helper 0
> where
> hunk ./src/Darcs/External.hs 128
> + helper :: Int -> IO ()
> helper i = do existsF <- doesFileExist next
> existsD <- doesDirectoryExist next
> if (existsF || existsD)
Even if it is rejected, this clean-up part might be worth recording as a
separate patch anyway.
Thanks,
--
Gabriel
More information about the darcs-devel
mailing list