2013-05-10 15:08:53 -05:00
|
|
|
{-# LANGUAGE PackageImports, CPP #-}
|
2013-04-14 12:51:05 -04:00
|
|
|
|
2011-11-11 01:52:58 -04:00
|
|
|
module Common (module X) where
|
2011-10-03 22:24:57 -04:00
|
|
|
|
2013-04-22 20:24:53 -04:00
|
|
|
import Control.Monad as X
|
2012-01-24 15:28:13 -04:00
|
|
|
import Control.Monad.IfElse as X
|
2011-11-11 01:52:58 -04:00
|
|
|
import Control.Applicative as X
|
2012-10-24 14:43:32 -04:00
|
|
|
import "mtl" Control.Monad.State.Strict as X (liftIO)
|
2011-10-03 22:24:57 -04:00
|
|
|
|
2011-11-11 01:52:58 -04:00
|
|
|
import Data.Maybe as X
|
2011-12-15 18:11:42 -04:00
|
|
|
import Data.List as X hiding (head, tail, init, last)
|
2013-04-22 20:24:53 -04:00
|
|
|
import Data.String.Utils as X hiding (join)
|
2014-03-22 10:42:38 -04:00
|
|
|
import Data.Monoid as X
|
2015-01-28 16:11:28 -04:00
|
|
|
import Data.Default as X
|
2011-10-03 22:24:57 -04:00
|
|
|
|
2011-11-11 01:52:58 -04:00
|
|
|
import System.FilePath as X
|
|
|
|
import System.Directory as X
|
|
|
|
import System.IO as X hiding (FilePath)
|
2013-05-10 16:57:21 -05:00
|
|
|
#ifndef mingw32_HOST_OS
|
2015-01-04 12:52:22 -04:00
|
|
|
import System.Posix.IO as X hiding (createPipe)
|
2013-05-10 15:08:53 -05:00
|
|
|
#endif
|
2011-11-11 01:52:58 -04:00
|
|
|
import System.Exit as X
|
2011-10-03 22:24:57 -04:00
|
|
|
|
2011-11-11 01:52:58 -04:00
|
|
|
import Utility.Misc as X
|
2012-02-03 16:47:24 -04:00
|
|
|
import Utility.Exception as X
|
2011-11-11 01:52:58 -04:00
|
|
|
import Utility.SafeCommand as X
|
2012-07-18 15:30:26 -04:00
|
|
|
import Utility.Process as X
|
2011-11-11 01:52:58 -04:00
|
|
|
import Utility.Path as X
|
support .git/annex on a different disk than the rest of the repo
The only fully supported thing is to have the main repository on one disk,
and .git/annex on another. Only commands that move data in/out of the annex
will need to copy it across devices.
There is only partial support for putting arbitrary subdirectories of
.git/annex on different devices. For one thing, but this can require more
copies to be done. For example, when .git/annex/tmp is on one device, and
.git/annex/journal on another, every journal write involves a call to
mv(1). Also, there are a few places that make hard links between various
subdirectories of .git/annex with createLink, that are not handled.
In the common case without cross-device, the new moveFile is actually
faster than renameFile, avoiding an unncessary stat to check that a file
(not a directory) is being moved. Of course if a cross-device move is
needed, it is as slow as mv(1) of the data.
2011-11-28 15:26:27 -04:00
|
|
|
import Utility.Directory as X
|
2011-12-03 09:10:23 -04:00
|
|
|
import Utility.Monad as X
|
2013-09-27 19:52:36 -04:00
|
|
|
import Utility.Data as X
|
2012-06-29 10:00:05 -04:00
|
|
|
import Utility.Applicative as X
|
2012-03-09 19:08:10 -04:00
|
|
|
import Utility.FileSystemEncoding as X
|
2015-01-20 16:58:48 -04:00
|
|
|
import Utility.PosixFiles as X hiding (fileSize)
|
|
|
|
import Utility.FileSize as X
|
2014-04-14 13:25:49 -04:00
|
|
|
import Utility.Network as X
|
2011-12-15 18:11:42 -04:00
|
|
|
|
2011-12-20 11:01:50 -04:00
|
|
|
import Utility.PartialPrelude as X
|