packages feed

git-annex 5.20150113 → 5.20150205

raw patch · 590 files changed

+2845/−1070 lines, 590 files

This diff is very large; some files are shown as “too large to diff”. Download the raw patch for the complete diff.

Files

.mailmap view
@@ -1,6 +1,7 @@-Joey Hess <joey@kitenet.net> http://joey.kitenet.net/ <joey@web>-Joey Hess <joey@kitenet.net> http://joeyh.name/ <joey@web>-Joey Hess <joey@kitenet.net> http://joeyh.name/ <http://joeyh.name/@web>+Joey Hess <id@joeyh.name> http://joey.kitenet.net/ <joey@web>+Joey Hess <id@joeyh.name> http://joeyh.name/ <joey@web>+Joey Hess <id@joeyh.name> http://joeyh.name/ <http://joeyh.name/@web> Yaroslav Halchenko <debian@onerussian.com> Yaroslav Halchenko <debian@onerussian.com> http://yarikoptic.myopenid.com/ <site-myopenid@web> Yaroslav Halchenko <debian@onerussian.com> https://www.google.com/accounts/o8/id?id=AItOawnx8kHW66N3BqmkVpgtXDlYMvr8TJ5VvfY <Yaroslav@web>+Richard Hartmann <richih@debian.org> https://www.google.com/accounts/o8/id?id=AItOawl9sYlePmv1xK-VvjBdN-5doOa_Xw-jH4U <Richard@web>
Annex.hs view
@@ -1,6 +1,6 @@ {- git-annex monad  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -85,9 +85,7 @@ 		MonadReader (MVar AnnexState), 		MonadCatch, 		MonadThrow,-#if MIN_VERSION_exceptions(0,6,0) 		MonadMask,-#endif 		Functor, 		Applicative 	)
Annex/AutoMerge.hs view
@@ -1,6 +1,6 @@ {- git-annex automatic merge conflict resolution  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -134,7 +134,7 @@ 	 	makelink key = do 		let dest = variantFile file key-		l <- inRepo $ gitAnnexLink dest key+		l <- calcRepo $ gitAnnexLink dest key 		replacewithlink dest l 		stageSymlink dest =<< hashSymlink l 
Annex/Branch.hs view
@@ -1,6 +1,6 @@ {- management of the git-annex branch  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -49,9 +49,11 @@ import Logs import Logs.Transitions import Logs.Trust.Pure+import Logs.Difference.Pure import Annex.ReplaceFile import qualified Annex.Queue import Annex.Branch.Transitions+import qualified Annex  {- Name of the branch that is used to store git-annex's information. -} name :: Git.Ref@@ -160,6 +162,7 @@ 			<$> getLocal transitionsLog 		unless (null branches) $ do 			showSideAction merge_desc+			mapM_ checkBranchDifferences refs 			mergeIndex jl refs 		let commitrefs = nub $ fullname:refs 		unlessM (handleTransitions jl localtransitions commitrefs) $ do@@ -537,3 +540,11 @@ 				apply rest hasher file content' trustmap 			PreserveFile -> 				apply rest hasher file content trustmap++checkBranchDifferences :: Git.Ref -> Annex ()+checkBranchDifferences ref = do+	theirdiffs <- allDifferences . parseDifferencesLog . decodeBS+		<$> catFile ref differenceLog+	mydiffs <- annexDifferences <$> Annex.getGitConfig+	when (theirdiffs /= mydiffs) $+		error "Remote repository is tuned in incompatable way; cannot be merged with local repository."
Annex/Branch/Transitions.hs view
@@ -1,6 +1,6 @@ {- git-annex branch transitions  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/BranchState.hs view
@@ -2,7 +2,7 @@  -  - Runtime state about the git-annex branch.  -- - Copyright 2011-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/CatFile.hs view
@@ -1,6 +1,6 @@ {- git cat-file interface, with handle automatically stored in the Annex monad  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/CheckAttr.hs view
@@ -1,6 +1,6 @@ {- git check-attr interface, with handle automatically stored in the Annex monad  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/CheckIgnore.hs view
@@ -1,7 +1,7 @@ {- git check-ignore interface, with handle automatically stored in  - the Annex monad  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Content.hs view
@@ -1,6 +1,6 @@ {- git-annex file content managing  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -110,10 +110,10 @@ 			( checkOr is_unlocked lockfile 			, return is_missing 			)-	checkOr def lockfile = do+	checkOr d lockfile = do 		v <- checkLocked lockfile 		return $ case v of-			Nothing -> def+			Nothing -> d 			Just True -> is_locked 			Just False -> is_unlocked #else@@ -234,8 +234,8 @@ 	tmp <- fromRepo $ gitAnnexTmpObjectLocation key  	e <- liftIO $ doesFileExist tmp-	alreadythere <- if e-		then fromIntegral . fileSize <$> liftIO (getFileStatus tmp)+	alreadythere <- liftIO $ if e+		then getFileSize tmp 		else return 0 	ifM (checkDiskSpace Nothing key alreadythere) 		( do@@ -446,7 +446,7 @@ 		removeInodeCache key 		mapM_ (resetfile cache) fs 	resetfile cache f = whenM (sameInodeCache f cache) $ do-		l <- inRepo $ gitAnnexLink f key+		l <- calcRepo $ gitAnnexLink f key 		secureErase f 		replaceFile f $ makeAnnexLink l 
Annex/Content/Direct.hs view
@@ -1,6 +1,6 @@ {- git-annex file content managing for direct mode  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -174,10 +174,10 @@ 	go (Just curr) = elemInodeCaches curr old  {- Checks if a FileStatus matches the recorded InodeCache of a file. -}-sameFileStatus :: Key -> FileStatus -> Annex Bool-sameFileStatus key status = do+sameFileStatus :: Key -> FilePath -> FileStatus -> Annex Bool+sameFileStatus key f status = do 	old <- recordedInodeCache key-	curr <- withTSDelta $ \delta -> liftIO $ toInodeCache delta status+	curr <- withTSDelta $ \delta -> liftIO $ toInodeCache delta f status 	case (old, curr) of 		(_, Just c) -> elemInodeCaches c old 		([], Nothing) -> return True
+ Annex/Difference.hs view
@@ -0,0 +1,58 @@+{- git-annex repository differences+ -+ - Copyright 2015 Joey Hess <id@joeyh.name>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++module Annex.Difference (+	module Types.Difference,+	setDifferences,+) where++import Common.Annex+import Types.Difference+import Logs.Difference+import Config+import Annex.UUID+import Logs.UUID+import Annex.Version+import qualified Annex++import qualified Data.Map as M++-- Differences are only allowed to be tweaked when initializing a+-- repository for the first time, and then only if there is not another+-- known uuid. If the repository was cloned from elsewhere, it inherits+-- the existing settings.+--+-- Must be called before setVersion, so it can check if this is the first+-- time the repository is being initialized.+setDifferences :: Annex ()+setDifferences = do+	u <- getUUID+	otherds <- allDifferences <$> recordedDifferences+	ds <- mappend otherds . annexDifferences <$> Annex.getGitConfig+	when (ds /= mempty) $ do+		ds' <- ifM (isJust <$> getVersion)+			( do+				oldds <- recordedDifferencesFor u+				when (ds /= oldds) $+					warning $ "Cannot change tunable parameters in already initialized repository."+				return oldds+			, if otherds == mempty+				then ifM (not . null . filter (/= u) . M.keys <$> uuidMap)+					( do+						warning "Cannot change tunable parameters in a clone of an existing repository."+						return mempty+					, return ds+					)+				else if otherds /= ds+					then do+						warning "The specified tunable parameters differ from values being used in other clones of this repository."+						return otherds+					else return ds+			)+		forM_ (listDifferences ds') $ \d ->+			setConfig (ConfigKey $ differenceConfigKey d) (differenceConfigVal d)+		recordDifferences ds' u
+ Annex/DirHashes.hs view
@@ -0,0 +1,86 @@+{- git-annex file locations+ -+ - Copyright 2010-2015 Joey Hess <id@joeyh.name>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++module Annex.DirHashes (+	Hasher,+	HashLevels(..),+	objectHashLevels,+	branchHashLevels,+	branchHashDir,+	dirHashes,+	hashDirMixed,+	hashDirLower,+) where++import Data.Bits+import Data.Word+import Data.Hash.MD5+import Data.Default++import Common+import Types.Key+import Types.GitConfig+import Types.Difference++type Hasher = Key -> FilePath++-- Number of hash levels to use. 2 is the default.+newtype HashLevels = HashLevels Int++instance Default HashLevels where+	def = HashLevels 2++objectHashLevels :: GitConfig -> HashLevels+objectHashLevels = configHashLevels OneLevelObjectHash++branchHashLevels :: GitConfig -> HashLevels+branchHashLevels = configHashLevels OneLevelBranchHash++configHashLevels :: Difference -> GitConfig -> HashLevels+configHashLevels d config+	| hasDifference d (annexDifferences config) = HashLevels 1+	| otherwise = def++branchHashDir :: GitConfig -> Key -> String+branchHashDir config key = hashDirLower (branchHashLevels config) key++{- Two different directory hashes may be used. The mixed case hash+ - came first, and is fine, except for the problem of case-strict+ - filesystems such as Linux VFAT (mounted with shortname=mixed),+ - which do not allow using a directory "XX" when "xx" already exists.+ - To support that, most repositories use the lower case hash for new data. -}+dirHashes :: [HashLevels -> Hasher]+dirHashes = [hashDirLower, hashDirMixed]++hashDirs :: HashLevels -> Int -> String -> FilePath+hashDirs (HashLevels 1) sz s = addTrailingPathSeparator $ take sz s+hashDirs _ sz s = addTrailingPathSeparator $ take sz s </> drop sz s++hashDirMixed :: HashLevels -> Hasher+hashDirMixed n k = hashDirs n 2 $ take 4 $ display_32bits_as_dir =<< [a,b,c,d]+  where+	ABCD (a,b,c,d) = md5 $ md5FilePath $ key2file $ nonChunkKey k++hashDirLower :: HashLevels -> Hasher+hashDirLower n k = hashDirs n 3 $ take 6 $ md5s $ md5FilePath $ key2file $ nonChunkKey k++{- modified version of display_32bits_as_hex from Data.Hash.MD5+ -   Copyright (C) 2001 Ian Lynagh + -   License: Either BSD or GPL+ -}+display_32bits_as_dir :: Word32 -> String+display_32bits_as_dir w = trim $ swap_pairs cs+  where +	-- Need 32 characters to use. To avoid inaverdently making+	-- a real word, use letters that appear less frequently.+	chars = ['0'..'9'] ++ "zqjxkmvwgpfZQJXKMVWGPF"+	cs = map (\x -> getc $ (shiftR w (6*x)) .&. 31) [0..7]+	getc n = chars !! fromIntegral n+	swap_pairs (x1:x2:xs) = x2:x1:swap_pairs xs+	swap_pairs _ = []+	-- Last 2 will always be 00, so omit.+	trim = take 6
Annex/Direct.hs view
@@ -1,6 +1,6 @@ {- git-annex direct mode  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -56,7 +56,7 @@ 	go (file, Just sha, Just mode) = withTSDelta $ \delta -> do 		shakey <- catKey sha mode 		mstat <- liftIO $ catchMaybeIO $ getSymbolicLinkStatus file-		mcache <- liftIO $ maybe (pure Nothing) (toInodeCache delta) mstat+		mcache <- liftIO $ maybe (pure Nothing) (toInodeCache delta file) mstat 		filekey <- isAnnexLink file 		case (shakey, filekey, mstat, mcache) of 			(_, Just key, _, _)@@ -86,7 +86,7 @@ 		deletegit file 	 	stageannexlink file key = do-		l <- inRepo $ gitAnnexLink file key+		l <- calcRepo $ gitAnnexLink file key 		stageSymlink file =<< hashSymlink l 		void $ addAssociatedFile key file @@ -131,7 +131,7 @@ 		return False 	got (Just (key, _)) = ifM (sameInodeCache file [cache]) 		( do-			l <- inRepo $ gitAnnexLink file key+			l <- calcRepo $ gitAnnexLink file key 			stageSymlink file =<< hashSymlink l 			addInodeCache key cache 			void $ addAssociatedFile key file@@ -282,7 +282,7 @@ 	 - with the content. -} 	movein item makeabs k f = unlessM (goodContent k f) $ do 		preserveUnannexed item makeabs f oldref-		l <- inRepo $ gitAnnexLink f k+		l <- calcRepo $ gitAnnexLink f k 		replaceFile f $ makeAnnexLink l 		toDirect k f 	
Annex/Direct/Fixup.hs view
@@ -1,6 +1,6 @@ {- git-annex direct mode guard fixup  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Drop.hs view
@@ -1,6 +1,6 @@ {- dropping of unwanted content  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Environment.hs view
@@ -1,6 +1,6 @@ {- git-annex environment  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/FileMatcher.hs view
@@ -1,6 +1,6 @@ {- git-annex file matching  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -28,12 +28,12 @@ checkFileMatcher matcher file = checkMatcher matcher Nothing (Just file) S.empty True  checkMatcher :: (FileMatcher Annex) -> Maybe Key -> AssociatedFile -> AssumeNotPresent -> Bool -> Annex Bool-checkMatcher matcher mkey afile notpresent def-	| isEmpty matcher = return def+checkMatcher matcher mkey afile notpresent d+	| isEmpty matcher = return d 	| otherwise = case (mkey, afile) of 		(_, Just file) -> go =<< fileMatchInfo file 		(Just key, _) -> go (MatchingKey key)-		_ -> return def+		_ -> return d   where 	go mi = matchMrun matcher $ \a -> a notpresent mi 
Annex/Hook.hs view
@@ -4,7 +4,7 @@  - not change, otherwise removing old hooks using an old version of  - the script would fail.  -- - Copyright 2013-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2013-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -16,7 +16,6 @@ import Config import qualified Annex import Utility.Shell-import Utility.FileMode  import qualified Data.Map as M @@ -53,19 +52,16 @@  - the existing hooks are cached. -} runAnnexHook :: Git.Hook -> Annex () runAnnexHook hook = do-	cmd <- fromRepo $ Git.hookFile hook 	m <- Annex.getState Annex.existinghooks 	case M.lookup hook m of-		Just True -> run cmd+		Just True -> run 		Just False -> noop 		Nothing -> do-			exists <- hookexists cmd+			exists <- inRepo $ Git.hookExists hook 			Annex.changeState $ \s -> s 				{ Annex.existinghooks = M.insert hook exists m }-			when exists $-				run cmd+			when exists run   where-	hookexists f = liftIO $ catchBoolIO $-		isExecutable . fileMode <$> getFileStatus f-	run cmd = unlessM (liftIO $ boolSystem cmd []) $-		warning $ cmd ++ " failed"+	run = unlessM (inRepo $ Git.runHook hook) $ do+		h <- fromRepo $ Git.hookFile hook+		warning $ h ++ " failed"
Annex/Index.hs view
@@ -1,6 +1,6 @@ {- Using other git index files  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Init.hs view
@@ -1,6 +1,6 @@ {- git-annex repository initialization  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -27,6 +27,7 @@ import Logs.Trust.Basic import Types.TrustLevel import Annex.Version+import Annex.Difference import Annex.UUID import Config import Annex.Direct@@ -44,7 +45,7 @@ genDescription :: Maybe String -> Annex String genDescription (Just d) = return d genDescription Nothing = do-	reldir <- liftIO . relHome =<< fromRepo Git.repoPath+	reldir <- liftIO . relHome =<< liftIO . absPath =<< fromRepo Git.repoPath 	hostname <- fromMaybe "" <$> liftIO getHostname #ifndef mingw32_HOST_OS 	let at = if null hostname then "" else "@"@@ -73,6 +74,7 @@ 	checkCrippledFileSystem 	unlessM isBare $ 		hookWrite preCommitHook+	setDifferences 	setVersion supportedVersion 	ifM (crippledFileSystem <&&> not <$> isBare) 		( do
Annex/Journal.hs view
@@ -4,7 +4,7 @@  - git-annex branch. Among other things, it ensures that if git-annex is  - interrupted, its recorded data is not lost.  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Link.hs view
@@ -5,7 +5,7 @@  - On other filesystems, git instead stores the symlink target in a regular  - file.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/LockFile.hs view
@@ -1,6 +1,6 @@ {- git-annex lock files.  -- - Copyright 2012, 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/MakeRepo.hs view
@@ -1,6 +1,6 @@ {- making local repositories (used by webapp mostly)  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/MetaData.hs view
@@ -1,6 +1,6 @@ {- git-annex metadata  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/MetaData/StandardFields.hs view
@@ -1,6 +1,6 @@ {- git-annex metadata, standard fields  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Notification.hs view
@@ -1,6 +1,6 @@ {- git-annex desktop notifications  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Path.hs view
@@ -1,6 +1,6 @@ {- git-annex program path  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Perms.hs view
@@ -1,6 +1,6 @@ {- git-annex file permissions  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Queue.hs view
@@ -1,6 +1,6 @@ {- git-annex command queue  -- - Copyright 2011, 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011, 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Quvi.hs view
@@ -1,6 +1,6 @@ {- quvi options for git-annex  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/ReplaceFile.hs view
@@ -1,6 +1,6 @@ {- git-annex file replacing  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Ssh.hs view
@@ -1,6 +1,6 @@ {- git-annex ssh interface, with connection caching  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/TaggedPush.hs view
@@ -1,6 +1,6 @@ {- git-annex tagged pushes  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Transfer.hs view
@@ -1,6 +1,6 @@ {- git-annex transfers  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -132,8 +132,7 @@ 			liftIO $ readMVar metervar 		| otherwise = do 			f <- fromRepo $ gitAnnexTmpObjectLocation (transferKey t)-			liftIO $ catchDefaultIO 0 $-				fromIntegral . fileSize <$> getFileStatus f+			liftIO $ catchDefaultIO 0 $ getFileSize f  type RetryDecider = TransferInfo -> TransferInfo -> Bool 
Annex/UUID.hs view
@@ -6,7 +6,7 @@  - UUIDs of remotes are cached in git config, using keys named  - remote.<name>.annex-uuid  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Url.hs view
@@ -1,7 +1,7 @@ {- Url downloading, with git-annex user agent and configured http  - headers and wget/curl options.  -- - Copyright 2013-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2013-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/VariantFile.hs view
@@ -1,6 +1,6 @@ {- git-annex .variant files for automatic merge conflict resolution  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Version.hs view
@@ -1,6 +1,6 @@ {- git-annex repository versioning  -- - Copyright 2010,2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/View.hs view
@@ -1,6 +1,6 @@ {- metadata based branch views  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -354,7 +354,7 @@ 		let metadata' = getfilemetadata f `unionMetaData` metadata 		forM_ (genviewedfiles f metadata') $ \fv -> do 			f' <- fromRepo $ fromTopFilePath $ asTopFilePath fv-			stagesymlink uh hasher f' =<< inRepo (gitAnnexLink f' k)+			stagesymlink uh hasher f' =<< calcRepo (gitAnnexLink f' k) 	go uh hasher f Nothing 		| "." `isPrefixOf` f = do 			s <- liftIO $ getSymbolicLinkStatus f
Annex/View/ViewedFile.hs view
@@ -1,6 +1,6 @@ {- filenames (not paths) used in views  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Annex/Wanted.hs view
@@ -1,6 +1,6 @@ {- git-annex checking whether content is wanted  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -15,15 +15,15 @@  {- Check if a file is preferred content for the local repository. -} wantGet :: Bool -> Maybe Key -> AssociatedFile -> Annex Bool-wantGet def key file = isPreferredContent Nothing S.empty key file def+wantGet d key file = isPreferredContent Nothing S.empty key file d  {- Check if a file is preferred content for a remote. -} wantSend :: Bool -> Maybe Key -> AssociatedFile -> UUID -> Annex Bool-wantSend def key file to = isPreferredContent (Just to) S.empty key file def+wantSend d key file to = isPreferredContent (Just to) S.empty key file d  {- Check if a file can be dropped, maybe from a remote.  - Don't drop files that are preferred content. -} wantDrop :: Bool -> Maybe UUID -> Maybe Key -> AssociatedFile -> Annex Bool-wantDrop def from key file = do+wantDrop d from key file = do 	u <- maybe getUUID (return . id) from-	not <$> isPreferredContent (Just u) (S.singleton u) key file def+	not <$> isPreferredContent (Just u) (S.singleton u) key file d
Assistant.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant daemon  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Alert.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant alerts  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Alert/Utility.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant alert utilities  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/BranchChange.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant git-annex branch change tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Changes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant change tracking  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Commits.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant commit tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Common.hs view
@@ -1,6 +1,6 @@ {- Common infrastructure for the git-annex assistant.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/CredPairCache.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant CredPair cache.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/DaemonStatus.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant daemon status  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/DeleteRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant remote deletion utilities  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Drop.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant dropping of unwanted content  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Fsck.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant fscking  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/Gpg.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant gpg stuff  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/Install.hs view
@@ -1,6 +1,6 @@ {- Assistant installation  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Install/AutoStart.hs view
@@ -1,6 +1,6 @@ {- Assistant autostart file installation  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Install/Menu.hs view
@@ -1,6 +1,6 @@ {- Assistant menu installation.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/MakeRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant remote creation utilities  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Monad.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant monad  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/NamedThread.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant named threads.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/NetMessager.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant out of band network messager interface  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Pairing.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant repo pairing, core data types  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Pairing/MakeRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant pairing remote creation  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -23,12 +23,11 @@ {- Authorized keys are set up before pairing is complete, so that the other  - side can immediately begin syncing. -} setupAuthorizedKeys :: PairMsg -> FilePath -> IO ()-setupAuthorizedKeys msg repodir = do-	validateSshPubKey pubkey-	unlessM (liftIO $ addAuthorizedKeys True repodir pubkey) $-		error "failed setting up ssh authorized keys"-  where-	pubkey = remoteSshPubKey $ pairMsgData msg+setupAuthorizedKeys msg repodir = case validateSshPubKey $ remoteSshPubKey $ pairMsgData msg of+	Left err -> error err+	Right pubkey -> +		unlessM (liftIO $ addAuthorizedKeys True repodir pubkey) $+			error "failed setting up ssh authorized keys"  {- When local pairing is complete, this is used to set up the remote for  - the host we paired with. -}
Assistant/Pairing/Network.hs view
@@ -4,7 +4,7 @@  - each message is repeated until acknowledged. This is done using a  - thread, that gets stopped before the next message is sent.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Pushes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant push tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/RemoteControl.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant RemoteDaemon control  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Repair.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant repository repair  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -140,8 +140,7 @@ repairStaleLocks :: [FilePath] -> Assistant () repairStaleLocks lockfiles = go =<< getsizes   where-	getsize lf = catchMaybeIO $ -		(\s -> (lf, fileSize s)) <$> getFileStatus lf+	getsize lf = catchMaybeIO $ (\s -> (lf, s)) <$> getFileSize lf 	getsizes = liftIO $ catMaybes <$> mapM getsize lockfiles 	go [] = return () 	go l = ifM (liftIO $ null <$> Lsof.query ("--" : map fst l))
Assistant/RepoProblem.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant remote problem handling  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Restart.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant restarting  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -29,7 +29,6 @@ #else import Utility.WinProcess #endif-import Data.Default import Network.URI  {- Before the assistant can be restarted, have to remove our @@ -96,7 +95,7 @@  - warp-tls listens to http, in order to show an error page, so this works.  -} assistantListening :: URLString -> IO Bool-assistantListening url = catchBoolIO $ fst <$> exists url' def+assistantListening url = catchBoolIO $ exists url' def   where 	url' = case parseURI url of 		Nothing -> url
Assistant/ScanRemotes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant remotes needing scanning  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Ssh.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant ssh utilities  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -111,33 +111,25 @@ sshTranscript opts input = processTranscript "ssh" opts input  {- Ensure that the ssh public key doesn't include any ssh options, like- - command=foo, or other weirdness -}-validateSshPubKey :: SshPubKey -> IO ()+ - command=foo, or other weirdness.+ -+ - The returned version of the key has its comment removed.+ -}+validateSshPubKey :: SshPubKey -> Either String SshPubKey validateSshPubKey pubkey-	| length (lines pubkey) == 1 =-		either error return $ check $ words pubkey-	| otherwise = error "too many lines in ssh public key"+	| length (lines pubkey) == 1 = check $ words pubkey+	| otherwise = Left "too many lines in ssh public key"   where-	check [prefix, _key, comment] = do-		checkprefix prefix-		checkcomment comment-	check [prefix, _key] =-		checkprefix prefix+	check (prefix:key:_) = checkprefix prefix (unwords [prefix, key]) 	check _ = err "wrong number of words in ssh public key" -	ok = Right () 	err msg = Left $ unwords [msg, pubkey] -	checkprefix prefix-		| ssh == "ssh" && all isAlphaNum keytype = ok+	checkprefix prefix validpubkey+		| ssh == "ssh" && all isAlphaNum keytype = Right validpubkey 		| otherwise = err "bad ssh public key prefix" 	  where 		(ssh, keytype) = separate (== '-') prefix--	checkcomment comment = case filter (not . safeincomment) comment of-		[] -> ok-		badstuff -> err $ "bad comment in ssh public key (contains: \"" ++ badstuff ++ "\")"-	safeincomment c = isAlphaNum c || c == '@' || c == '-' || c == '_' || c == '.'  addAuthorizedKeys :: Bool -> FilePath -> SshPubKey -> IO Bool addAuthorizedKeys gitannexshellonly dir pubkey = boolSystem "sh"
Assistant/Sync.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant repo syncing  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Committer.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant commit thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -352,7 +352,7 @@ 	done change mcache file key = liftAnnex $ do 		logStatus key InfoPresent 		link <- ifM isDirect-			( inRepo $ gitAnnexLink file key+			( calcRepo $ gitAnnexLink file key 			, Command.Add.link file key mcache 			) 		whenM (pure DirWatcher.eventsCoalesce <||> isDirect) $
Assistant/Threads/ConfigMonitor.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant config monitor thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Cronner.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant sceduled jobs runner  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/DaemonStatus.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant daemon status thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Glacier.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant Amazon Glacier retrieval  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Merger.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant git merge thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/MountWatcher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant mount watcher, using either dbus or mtab polling  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/NetWatcher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant network connection watcher, using dbus  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/PairListener.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant thread to listen for incoming pairing traffic  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/ProblemFixer.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant thread to handle fixing problems with repositories  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Pusher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant git pushing thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/RemoteControl.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant communication with remotedaemon  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/SanityChecker.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant sanity checker  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -225,7 +225,7 @@ checkLogSize n = do 	f <- liftAnnex $ fromRepo gitAnnexLogFile 	logs <- liftIO $ listLogs f-	totalsize <- liftIO $ sum <$> mapM filesize logs+	totalsize <- liftIO $ sum <$> mapM getFileSize logs 	when (totalsize > 2 * oneMegabyte) $ do 		notice ["Rotated logs due to size:", show totalsize] 		liftIO $ openLog f >>= handleToFd >>= redirLog@@ -237,9 +237,7 @@ 						checkLogSize (n + 1) 				_ -> noop   where-	filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)--	oneMegabyte :: Int+	oneMegabyte :: Integer 	oneMegabyte = 1000000 #endif 
Assistant/Threads/TransferPoller.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant transfer polling thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -36,8 +36,7 @@ 		 - temp file being used for the transfer. -} 		| transferDirection t == Download = do 			let f = gitAnnexTmpObjectLocation (transferKey t) g-			sz <- liftIO $ catchMaybeIO $-				fromIntegral . fileSize <$> getFileStatus f+			sz <- liftIO $ catchMaybeIO $ getFileSize f 			newsize t info sz 		{- Uploads don't need to be polled for when the TransferWatcher 		 - thread can track file modifications. -}
Assistant/Threads/TransferScanner.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant thread to scan remotes to find needed transfers  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/TransferWatcher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant transfer watching thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Transferrer.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant data transferrer thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/UpgradeWatcher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant thread to detect when git-annex is upgraded  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Upgrader.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant thread to detect when upgrade is available  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/Watcher.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant tree watcher  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -224,7 +224,7 @@ 	v <- liftAnnex $ catKeyFile file 	case (v, fs) of 		(Just key, Just filestatus) ->-			ifM (liftAnnex $ sameFileStatus key filestatus)+			ifM (liftAnnex $ sameFileStatus key file filestatus) 				{- It's possible to get an add event for 				 - an existing file that is not 				 - really modified, but it might have@@ -232,7 +232,7 @@ 				 - so it symlink is restaged to make sure. -} 				( ifM (shouldRestage <$> getDaemonStatus) 					( do-						link <- liftAnnex $ inRepo $ gitAnnexLink file key+						link <- liftAnnex $ calcRepo $ gitAnnexLink file key 						addLink file link (Just key) 					, noChange 					)@@ -279,7 +279,7 @@ 	go (Just key) = do 		when isdirect $ 			liftAnnex $ void $ addAssociatedFile key file-		link <- liftAnnex $ inRepo $ gitAnnexLink file key+		link <- liftAnnex $ calcRepo $ gitAnnexLink file key 		if linktarget == Just link 			then ensurestaged (Just link) =<< getDaemonStatus 			else do
Assistant/Threads/WebApp.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp thread  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/XMPPClient.hs view
@@ -1,6 +1,6 @@ {- git-annex XMPP client  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Threads/XMPPPusher.hs view
@@ -9,7 +9,7 @@  - they would deadlock with only one thread. For larger numbers of  - clients, the two threads are also sufficient.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/TransferQueue.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant pending transfer queue  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/TransferSlots.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant transfer slots  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/TransferrerPool.hs view
@@ -1,6 +1,6 @@ {- A pool of "git-annex transferkeys" processes  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/Alert.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant alert types  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/BranchChange.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant git-annex branch change tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/Buddies.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant buddies  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/Changes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant change tracking  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/Commits.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant commit tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/CredPairCache.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant CredPair cache.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/DaemonStatus.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant daemon status  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/NamedThread.hs view
@@ -1,6 +1,6 @@ {- named threads  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/NetMessager.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant out of band network messager types  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/Pushes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant push tracking  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/RemoteControl.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant RemoteDaemon control  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/RepoProblem.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant repository problem tracking  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/ScanRemotes.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant remotes needing scanning  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/ThreadName.hs view
@@ -1,6 +1,6 @@ {- name of a thread  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/ThreadedMonad.hs view
@@ -1,6 +1,6 @@ {- making the Annex monad available across threads  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/TransferQueue.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant pending transfer queue  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/TransferSlots.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant transfer slots  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/TransferrerPool.hs view
@@ -1,6 +1,6 @@ {- A pool of "git-annex transferkeys" processes available for use  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Types/UrlRenderer.hs view
@@ -1,6 +1,6 @@ {- webapp url renderer access from the assistant  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Unused.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant unused files  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/Upgrade.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant upgrading  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp core  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Common.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp, common imports  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurators  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/AWS.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurators for Amazon AWS services  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/Delete.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp repository deletion  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/Edit.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurator for editing existing repos  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -144,13 +144,13 @@ 	legalName = makeLegalName . T.unpack . repoName  editRepositoryAForm :: Maybe Remote -> RepoConfig -> MkAForm RepoConfig-editRepositoryAForm mremote def = RepoConfig+editRepositoryAForm mremote d = RepoConfig 	<$> areq (if ishere then readonlyTextField else textField)-		(bfs "Name") (Just $ repoName def)-	<*> aopt textField (bfs "Description") (Just $ repoDescription def)-	<*> areq (selectFieldList groups `withNote` help) (bfs "Repository group") (Just $ repoGroup def)+		(bfs "Name") (Just $ repoName d)+	<*> aopt textField (bfs "Description") (Just $ repoDescription d)+	<*> areq (selectFieldList groups `withNote` help) (bfs "Repository group") (Just $ repoGroup d) 	<*> associateddirectory-	<*> areq checkBoxField "Syncing enabled" (Just $ repoSyncable def)+	<*> areq checkBoxField "Syncing enabled" (Just $ repoSyncable d)   where 	ishere = isNothing mremote 	isspecial = fromMaybe False $@@ -163,14 +163,14 @@ 		| isspecial = const True 		| otherwise = not . specialRemoteOnly 	customgroups :: [(Text, RepoGroup)]-	customgroups = case repoGroup def of+	customgroups = case repoGroup d of 		RepoGroupCustom s -> [(T.pack s, RepoGroupCustom s)] 		_ -> [] 	help = [whamlet|<a href="@{RepoGroupR}">What's this?</a>|] -	associateddirectory = case repoAssociatedDirectory def of+	associateddirectory = case repoAssociatedDirectory d of 		Nothing -> aopt hiddenField "" Nothing-		Just d -> aopt textField (bfs "Associated directory") (Just $ Just d)+		Just dir -> aopt textField (bfs "Associated directory") (Just $ Just dir)  getEditRepositoryR :: RepoId -> Handler Html getEditRepositoryR = postEditRepositoryR
Assistant/WebApp/Configurators/Fsck.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant fsck configuration  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -167,8 +167,8 @@ 	<$> (annexFsckNudge <$> Annex.getGitConfig)  fsckPreferencesAForm :: FsckPreferences -> MkAForm FsckPreferences-fsckPreferencesAForm def = FsckPreferences-	<$> areq (checkBoxField `withNote` nudgenote) "Reminders" (Just $ enableFsckNudge def)+fsckPreferencesAForm d = FsckPreferences+	<$> areq (checkBoxField `withNote` nudgenote) "Reminders" (Just $ enableFsckNudge d)   where 	nudgenote = [whamlet|Remind me when using repositories that lack consistency checks.|] 
Assistant/WebApp/Configurators/IA.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurators for Internet Archive  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -191,7 +191,7 @@ getRepoInfo :: RemoteConfig -> Widget getRepoInfo c = do 	uo <- liftAnnex Url.getUrlOptions-	exists <- liftIO $ catchDefaultIO False $ fst <$> Url.exists url uo+	exists <- liftIO $ catchDefaultIO False $ Url.exists url uo 	[whamlet| <a href="#{url}">   Internet Archive item
Assistant/WebApp/Configurators/Local.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurators for making local repositories  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/Pairing.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurator for pairing  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/Preferences.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant general preferences  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -34,17 +34,17 @@ 	}  prefsAForm :: PrefsForm -> MkAForm PrefsForm-prefsAForm def = PrefsForm+prefsAForm d = PrefsForm 	<$> areq (storageField `withNote` diskreservenote)-		(bfs "Disk reserve") (Just $ diskReserve def)+		(bfs "Disk reserve") (Just $ diskReserve d) 	<*> areq (positiveIntField `withNote` numcopiesnote)-		(bfs "Number of copies") (Just $ numCopies def)+		(bfs "Number of copies") (Just $ numCopies d) 	<*> areq (checkBoxField `withNote` autostartnote)-		"Auto start" (Just $ autoStart def)+		"Auto start" (Just $ autoStart d) 	<*> areq (selectFieldList autoUpgradeChoices)-		(bfs autoUpgradeLabel) (Just $ autoUpgrade def)+		(bfs autoUpgradeLabel) (Just $ autoUpgrade d) 	<*> areq (checkBoxField `withNote` debugnote)-		"Enable debug logging" (Just $ debugEnabled def)+		"Enable debug logging" (Just $ debugEnabled d)   where 	diskreservenote = [whamlet|<br>Avoid downloading files from other repositories when there is too little free disk space.|] 	numcopiesnote = [whamlet|<br>Only drop a file after verifying that other repositories contain this many copies.|]
Assistant/WebApp/Configurators/Ssh.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurator for ssh-based remotes  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -91,15 +91,15 @@ #else sshInputAForm :: Field WebApp WebApp Text -> SshInput -> AForm WebApp WebApp SshInput #endif-sshInputAForm hostnamefield def = normalize <$> gen+sshInputAForm hostnamefield d = normalize <$> gen   where 	gen = SshInput-		<$> aopt check_hostname (bfs "Host name") (Just $ inputHostname def)-		<*> aopt check_username (bfs "User name") (Just $ inputUsername def)-		<*> areq (selectFieldList authmethods) (bfs "Authenticate with") (Just $ inputAuthMethod def)+		<$> aopt check_hostname (bfs "Host name") (Just $ inputHostname d)+		<*> aopt check_username (bfs "User name") (Just $ inputUsername d)+		<*> areq (selectFieldList authmethods) (bfs "Authenticate with") (Just $ inputAuthMethod d) 		<*> aopt passwordField (bfs "Password") Nothing-		<*> aopt textField (bfs "Directory") (Just $ Just $ fromMaybe (T.pack gitAnnexAssistantDefaultDir) $ inputDirectory def)-		<*> areq intField (bfs "Port") (Just $ inputPort def)+		<*> aopt textField (bfs "Directory") (Just $ Just $ fromMaybe (T.pack gitAnnexAssistantDefaultDir) $ inputDirectory d)+		<*> areq intField (bfs "Port") (Just $ inputPort d) 	 	authmethods :: [(Text, AuthMethod)] 	authmethods =@@ -133,10 +133,10 @@  	-- The directory is implicitly in home, so remove any leading ~/ 	normalize i = i { inputDirectory = normalizedir <$> inputDirectory i }-	normalizedir d-		| "~/" `T.isPrefixOf` d = T.drop 2 d-		| "/~/" `T.isPrefixOf` d = T.drop 3 d-		| otherwise = d+	normalizedir dir+		| "~/" `T.isPrefixOf` dir = T.drop 2 dir+		| "/~/" `T.isPrefixOf` dir = T.drop 3 dir+		| otherwise = dir  data ServerStatus 	= UntestedServer
Assistant/WebApp/Configurators/Unused.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant unused file preferences  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -26,11 +26,11 @@ 	}  unusedForm :: UnusedForm -> Hamlet.Html -> MkMForm UnusedForm-unusedForm def msg = do+unusedForm d msg = do 	(enableRes, enableView) <- mreq (selectFieldList enabledisable) (bfs "")-		(Just $ enableExpire def)+		(Just $ enableExpire d) 	(whenRes, whenView) <- mreq intField (bfs "")-		(Just $ expireWhen def)+		(Just $ expireWhen d) 	let form = do 		webAppFormAuthToken 		$(widgetFile "configurators/unused/form")
Assistant/WebApp/Configurators/Upgrade.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp upgrade UI  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/WebDAV.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp configurators for WebDAV remotes  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Configurators/XMPP.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant XMPP configuration  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}@@ -161,8 +161,8 @@ creds2Form c = XMPPForm (xmppJID c) (xmppPassword c)  xmppAForm :: (Maybe XMPPForm) -> MkAForm XMPPForm-xmppAForm def = XMPPForm-	<$> areq jidField (bfs "Jabber address") (formJID <$> def)+xmppAForm d = XMPPForm+	<$> areq jidField (bfs "Jabber address") (formJID <$> d) 	<*> areq passwordField (bfs "Password") Nothing  jidField :: MkField Text
Assistant/WebApp/Control.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp control  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/DashBoard.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp dashboard  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Documentation.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp documentation  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Form.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp form utilities  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Gpg.hs view
@@ -1,6 +1,6 @@ {- git-annex webapp gpg stuff  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/MakeRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp making remotes  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Notifications.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp notifications  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/OtherRepos.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp switching to other repos  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Page.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp page display  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Repair.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant repository repair  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/RepoId.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp RepoId type  -- - Copyright 2012,2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012,2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/RepoList.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp repository list  -- - Copyright 2012,2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012,2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/SideBar.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp sidebar  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/WebApp/Types.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant webapp types  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU AGPL version 3 or higher.  -}
Assistant/XMPP.hs view
@@ -1,6 +1,6 @@ {- core xmpp support  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/XMPP/Buddies.hs view
@@ -1,6 +1,6 @@ {- xmpp buddies  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/XMPP/Client.hs view
@@ -1,6 +1,6 @@ {- xmpp client support  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Assistant/XMPP/Git.hs view
@@ -1,6 +1,6 @@ {- git over XMPP  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Backend.hs view
@@ -1,6 +1,6 @@ {- git-annex key/value backends  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Backend/Hash.hs view
@@ -1,12 +1,10 @@ {- git-tnnex hashing backends  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -} -{-# LANGUAGE CPP #-}- module Backend.Hash ( 	backends, 	testKeyBackend,@@ -24,7 +22,7 @@ import qualified Data.ByteString.Lazy as L import Data.Char -data Hash = SHAHash HashSize | SkeinHash HashSize+data Hash = SHAHash HashSize | SkeinHash HashSize | MD5Hash type HashSize = Int  {- Order is slightly significant; want SHA256 first, and more general@@ -32,9 +30,8 @@ hashes :: [Hash] hashes = concat  	[ map SHAHash [256, 1, 512, 224, 384]-#ifdef WITH_CRYPTOHASH 	, map SkeinHash [256, 512]-#endif+	, [MD5Hash] 	]  {- The SHA256E backend is the default, so genBackendE comes first. -}@@ -60,6 +57,7 @@ hashName :: Hash -> String hashName (SHAHash size) = "SHA" ++ show size hashName (SkeinHash size) = "SKEIN" ++ show size+hashName MD5Hash = "MD5"  hashNameE :: Hash -> String hashNameE hash = hashName hash ++ "E"@@ -68,8 +66,7 @@ keyValue :: Hash -> KeySource -> Annex (Maybe Key) keyValue hash source = do 	let file = contentLocation source-	stat <- liftIO $ getFileStatus file-	let filesize = fromIntegral $ fileSize stat+	filesize <- liftIO $ getFileSize file 	s <- hashFile hash file filesize 	return $ Just $ stubKey 		{ keyName = s@@ -103,7 +100,7 @@ 	mstat <- liftIO $ catchMaybeIO $ getFileStatus file 	case (mstat, fast) of 		(Just stat, False) -> do-			let filesize = fromIntegral $ fileSize stat+			filesize <- liftIO $ getFileSize' file stat 			showSideAction "checksum" 			check <$> hashFile hash file filesize 		_ -> return True@@ -157,6 +154,7 @@ 			either error return  				=<< externalSHA command hashsize file 	go (SkeinHash hashsize) = skeinHasher hashsize <$> L.readFile file+	go MD5Hash = md5Hasher <$> L.readFile file  shaHasher :: HashSize -> Integer -> Either (L.ByteString -> String) String shaHasher hashsize filesize@@ -179,11 +177,12 @@  skeinHasher :: HashSize -> (L.ByteString -> String) skeinHasher hashsize -#ifdef WITH_CRYPTOHASH 	| hashsize == 256 = show . skein256 	| hashsize == 512 = show . skein512-#endif 	| otherwise = error $ "unsupported skein size " ++ show hashsize++md5Hasher :: L.ByteString -> String+md5Hasher = show . md5  {- A varient of the SHA256E backend, for testing that needs special keys  - that cannot collide with legitimate keys in the repository.
Backend/URL.hs view
@@ -1,6 +1,6 @@ {- git-annex "URL" backend -- keys whose content is available from urls.  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Backend/Utilities.hs view
@@ -1,6 +1,6 @@ {- git-annex backend utilities  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Backend/WORM.hs view
@@ -1,6 +1,6 @@ {- git-annex "WORM" backend -- Write Once, Read Many  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -32,11 +32,13 @@  -} keyValue :: KeySource -> Annex (Maybe Key) keyValue source = do-	stat <- liftIO $ getFileStatus $ contentLocation source+	let f = contentLocation source+	stat <- liftIO $ getFileStatus f+	sz <- liftIO $ getFileSize' f stat 	relf <- getTopFilePath <$> inRepo (toTopFilePath $ keyFilename source) 	return $ Just $ stubKey 		{ keyName = genKeyName relf 		, keyBackendName = name backend-		, keySize = Just $ fromIntegral $ fileSize stat+		, keySize = Just sz 		, keyMtime = Just $ modificationTime stat 		}
Build/BundledPrograms.hs view
@@ -1,6 +1,6 @@ {- Bundled programs  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/Configure.hs view
@@ -15,6 +15,7 @@ import Utility.SafeCommand import Utility.ExternalSHA import Utility.Env+import Utility.Exception import qualified Git.Version import Utility.DottedVersion @@ -106,7 +107,8 @@ 	<$> getWgetVersion   getWgetVersion :: IO (Maybe DottedVersion)-getWgetVersion = extract <$> readProcess "wget" ["--version"]+getWgetVersion = catchDefaultIO Nothing $+	extract <$> readProcess "wget" ["--version"]   where 	extract s = case lines s of 		[] -> Nothing
Build/DesktopFile.hs view
@@ -1,7 +1,7 @@ {- Generating and installing a desktop menu entry file and icon,  - and a desktop autostart file. (And OSX equivilants.)  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/DistributionUpdate.hs view
@@ -22,6 +22,7 @@ import Data.Default import Data.Time.Clock import Data.Char+import System.Posix.Directory  -- git-annex distribution signing key (for Joey Hess) signingKey :: String@@ -49,10 +50,12 @@  main :: IO () main = do+	version <- liftIO getChangelogVersion 	repodir <- getRepoDir+	changeWorkingDirectory repodir 	updated <- catMaybes <$> mapM (getbuild repodir) autobuilds-	state <- Annex.new =<< Git.Construct.fromPath repodir-	Annex.eval state (makeinfos updated)+	state <- Annex.new =<< Git.Construct.fromPath "."+	Annex.eval state (makeinfos updated version)  -- Download a build from the autobuilder, and return its version. -- It's very important that the version matches the build, otherwise@@ -91,26 +94,25 @@ 		return $ if null bv || any (not . versionchar) bv then Nothing else Just bv 	versionchar c = isAlphaNum c || c == '.' || c == '-' -makeinfos :: [(FilePath, Version)] -> Annex ()-makeinfos updated = do+makeinfos :: [(FilePath, Version)] -> Version -> Annex ()+makeinfos updated version = do 	mapM_ (\f -> inRepo $ runBool [Param "annex", Param "add", File f]) (map fst updated)-	version <- liftIO getChangelogVersion 	void $ inRepo $ runBool  		[ Param "commit" 		, Param "-a"+		, Param "-S89C809CB" -- git-annex distribution signing key 		, Param "-m" 		, Param $ "publishing git-annex " ++ version 		]-	basedir <- liftIO getRepoDir 	now <- liftIO getCurrentTime-	liftIO $ putStrLn $ "building info files in " ++ basedir+	liftIO $ putStrLn $ "building info files" 	forM_ updated $ \(f, bv) -> do-		v <- lookupFile (basedir </> f)+		v <- lookupFile f 		case v of 			Nothing -> noop 			Just k -> whenM (inAnnex k) $ do 				liftIO $ putStrLn f-				let infofile = basedir </> f ++ ".info"+				let infofile = f ++ ".info" 				liftIO $ writeFile infofile $ show $ GitAnnexDistribution 					{ distributionUrl = mkUrl f 					, distributionKey = k@@ -120,10 +122,11 @@ 					} 				void $ inRepo $ runBool [Param "add", File infofile] 				signFile infofile-				signFile (basedir </> f)+				signFile f 	void $ inRepo $ runBool  		[ Param "commit" 		, Param "-m"+		, Param "-S89C809CB" -- git-annex distribution signing key 		, Param $ "updated info files for git-annex " ++ version 		] 	void $ inRepo $ runBool@@ -137,14 +140,14 @@ 	 	-- Check for out of date info files. 	infos <- liftIO $ filter (".info" `isSuffixOf`)-		<$> dirContentsRecursive (basedir </> "git-annex")+		<$> dirContentsRecursive "git-annex" 	ds <- liftIO $ forM infos (readish <$$> readFile) 	let dis = zip infos ds-	let ood = filter (outofdate version) dis+	let ood = filter outofdate dis 	unless (null ood) $ 		error $ "Some info files are out of date: " ++ show (map fst ood)   where-	outofdate version (_, md) = case md of+	outofdate (_, md) = case md of 		Nothing -> True 		Just d -> distributionVersion d /= version 
Build/EvilLinker.hs view
@@ -3,7 +3,7 @@  -  - See https://ghc.haskell.org/trac/ghc/ticket/8596  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/EvilSplicer.hs view
@@ -23,7 +23,7 @@  - need modifications to compile.  -  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/InstallDesktopFile.hs view
@@ -1,7 +1,7 @@ {- Generating and installing a desktop menu entry file and icon,  - and a desktop autostart file. (And OSX equivilants.)  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/LinuxMkLibs.hs view
@@ -1,6 +1,6 @@ {- Linux library copier and binary shimmer  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/NullSoftInstaller.hs view
@@ -11,7 +11,7 @@  - exception of git. The user needs to install git separately,
  - and the installer checks for that.
  -
- - Copyright 2013 Joey Hess <joey@kitenet.net>
+ - Copyright 2013 Joey Hess <id@joeyh.name>
  -
  - Licensed under the GNU GPL version 3 or higher.
  -}
@@ -44,7 +44,9 @@ 			return p
 		webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp"
 		autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart"
-		writeFile nsifile $ makeInstaller gitannex license
+		let htmlhelp = tmpdir </> "git-annex.html"
+		writeFile htmlhelp htmlHelpText
+		writeFile nsifile $ makeInstaller gitannex license htmlhelp
 			(catMaybes extrabins)
 			[ webappscript, autostartscript ]
 		mustSucceed "makensis" [File nsifile]
@@ -98,8 +100,8 @@ 	, fromString "You can install git from http:////git-scm.com//"
 	]
 
-makeInstaller :: FilePath -> FilePath -> [FilePath] -> [FilePath] -> String
-makeInstaller gitannex license extrabins launchers = nsis $ do
+makeInstaller :: FilePath -> FilePath -> FilePath -> [FilePath] -> [FilePath] -> String
+makeInstaller gitannex license htmlhelp extrabins launchers = nsis $ do
 	name "git-annex"
 	outFile $ str installer
 	{- Installing into the same directory as git avoids needing to modify
@@ -137,6 +139,8 @@ 		setOutPath "$INSTDIR\\cmd"
 		mapM_ addfile (gitannex:extrabins)
 	section "meta" [] $ do
+		setOutPath "$INSTDIR\\doc\\git\\html"
+		addfile htmlhelp
 		setOutPath "$INSTDIR"
 		addfile license
 		mapM_ addfile launchers
@@ -145,6 +149,7 @@ 		delete [RebootOK] $ startMenuItem
 		delete [RebootOK] $ autoStartItem
 		removefilesFrom "$INSTDIR/cmd" (gitannex:extrabins)
+		removefilesFrom "$INSTDIR\\doc\\git\\html" [htmlhelp]
 		removefilesFrom "$INSTDIR" $
 			launchers ++
 			[ license
@@ -195,4 +200,17 @@ 	, "cygreadline7.dll"
 	, "cygncursesw-10.dll"
 	, "cygusb0.dll"
+	]
+
+-- msysgit opens Program Files/Git/doc/git/html/git-annex.html
+-- when git annex --help is run.
+htmlHelpText :: String
+htmlHelpText = unlines
+	[ "<html>"
+	, "<title>git-annex help</title>"
+	, "<body>"
+	, "For help on git-annex, run \"git annex help\", or"
+	, "<a href=\"https://git-annex.branchable.com/git-annex/\">read the man page</a>."
+	, "</body>"
+	, "</html"
 	]
Build/OSXMkLibs.hs view
@@ -1,6 +1,6 @@ {- OSX library copier  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Build/Standalone.hs view
@@ -1,6 +1,6 @@ {- Makes standalone bundle.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
BuildFlags.hs view
@@ -1,6 +1,6 @@ {- git-annex build flags reporting  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -80,11 +80,6 @@ #endif #ifdef WITH_TDFA 	, "TDFA"-#endif-#ifdef WITH_CRYPTOHASH-	, "CryptoHash"-#else-#warning Building without CryptoHash. #endif #ifdef WITH_TORRENTPARSER 	, "TorrentParser"
CHANGELOG view
@@ -1,3 +1,40 @@+git-annex (5.20150205) unstable; urgency=medium++  * info: Can now display info about a given uuid.+  * Added to remote/uuid info: Count of the number of keys present+    on the remote, and their size. This is rather expensive to calculate,+    so comes last and --fast will disable it.+  * info remote: Include the date of the last sync with the remote.+  * sync: Added --message/-m option like git commit.+  * remotedaemon: Fix problem that could prevent ssh connections being+    made after two LOSTNET messages were received in a row (perhaps due to+    two different network interfaces being brought down).+  * Fix build failure when wget is not installed.+  * Fix wording of message displayed when unable to get a file that+    is available in untrusted repositories.+  * addurl: When a Content-Disposition header suggests a filename to use,+    addurl will consider using it, if it's reasonable and doesn't conflict+    with an existing file. (--file overrides this)+  * Fix default repository description created by git annex init,+    which got broken by the relative path changes in the last release.+  * init: Repository tuning parameters can now be passed when initializing a+    repository for the first time. For details, see+    http://git-annex.branchable.com/tuning/+  * merge: Refuse to merge changes from a git-annex branch of a repo+    that has been tuned in incompatible ways.+  * Support annex.tune.objecthash1, annex.tune.objecthashlower, and+    annex.tune.branchhash1.+  * Remove support for building without cryptohash.+  * Added MD5 and MD5E backends.+  * assistant: Fix local pairing when ssh pubkey comment contains spaces.+  * Avoid using fileSize which maxes out at just 2 gb on Windows.+    Instead, use hFileSize, which doesn't have a bounded size.+    Fixes support for files > 2 gb on Windows.+  * Windows: Fix running of the pre-commit-annex hook.+  * Windows: Fix S3 special remote; need to call withSocketsDo. Thanks, Trent.++ -- Joey Hess <id@joeyh.name>  Thu, 05 Feb 2015 14:08:33 -0400+ git-annex (5.20150113) unstable; urgency=medium    * unlock: Don't allow unlocking files that have never been committed to git
@@ -2,30 +2,30 @@ Source: native package  Files: *-Copyright: © 2010-2014 Joey Hess <joey@kitenet.net>+Copyright: © 2010-2015 Joey Hess <id@joeyh.name> License: GPL-3+  Files: Assistant/WebApp.hs Assistant/WebApp/* templates/* static/*-Copyright: © 2012-2014 Joey Hess <joey@kitenet.net>+Copyright: © 2012-2014 Joey Hess <id@joeyh.name>            © 2014 Sören Brunk License: AGPL-3+  Files: Remote/Ddar.hs-Copyright: © 2011 Joey Hess <joey@kitenet.net>+Copyright: © 2011 Joey Hess <id@joeyh.name>            © 2014 Robie Basak <robie@justgohome.co.uk> License: GPL-3+  Files: Utility/ThreadScheduler.hs Copyright: 2011 Bas van Dijk & Roel van Dijk-           2012, 2013 Joey Hess <joey@kitenet.net>+           2012, 2013 Joey Hess <id@joeyh.name> License: BSD-2-clause  Files: Utility/*-Copyright: 2012-2014 Joey Hess <joey@kitenet.net>+Copyright: 2012-2015 Joey Hess <id@joeyh.name> License: BSD-2-clause  Files: Utility/Gpg.hs Utility/DirWatcher*-Copyright: © 2010-2014 Joey Hess <joey@kitenet.net>+Copyright: © 2010-2014 Joey Hess <id@joeyh.name> License: GPL-3+  Files: Assistant/WebApp/Bootstrap3.hs@@ -34,7 +34,7 @@  Files: doc/logo* */favicon.ico standalone/osx/git-annex.app/Contents/Resources/git-annex.icns standalone/android/icons/* Copyright: 2007 Henrik Nyh <http://henrik.nyh.se/>-           2010 Joey Hess <joey@kitenet.net>+           2010 Joey Hess <id@joeyh.name> 	   2013 John Lawrence License: other   Free to modify and redistribute with due credit, and obviously free to use.@@ -46,14 +46,14 @@ Files: Utility/libmounts.c Copyright: 1980, 1989, 1993, 1994 The Regents of the University of California            2001 David Rufino <daverufino@btinternet.com>-           2012 Joey Hess <joey@kitenet.net>+           2012 Joey Hess <id@joeyh.name> License: BSD-3-clause  * Copyright (c) 1980, 1989, 1993, 1994  *      The Regents of the University of California.  All rights reserved.  * Copyright (c) 2001  *      David Rufino <daverufino@btinternet.com>  * Copyright 2012- *      Joey Hess <joey@kitenet.net>+ *      Joey Hess <id@joeyh.name>  *  * Redistribution and use in source and binary forms, with or without  * modification, are permitted provided that the following conditions
Checks.hs view
@@ -3,7 +3,7 @@  - Common sanity checks for commands, and an interface to selectively  - remove them, or add others.  - - - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine.hs view
@@ -1,6 +1,6 @@ {- git-annex command line parsing and dispatch  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/Action.hs view
@@ -1,6 +1,6 @@ {- git-annex command-line actions  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/GitAnnex.hs view
@@ -1,6 +1,6 @@ {- git-annex main program  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/GitAnnex/Options.hs view
@@ -1,6 +1,6 @@ {- git-annex options  -- - Copyright 2010, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/GitAnnexShell.hs view
@@ -1,6 +1,6 @@ {- git-annex-shell main program  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/GitAnnexShell/Fields.hs view
@@ -1,6 +1,6 @@ {- git-annex-shell fields  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/Option.hs view
@@ -1,6 +1,6 @@ {- common command-line options  -- - Copyright 2010-2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/Seek.hs view
@@ -4,7 +4,7 @@  - the values a user passes to a command, and prepare actions operating  - on them.  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
CmdLine/Usage.hs view
@@ -1,6 +1,6 @@ {- git-annex usage messages  -- - Copyright 2010-2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command.hs view
@@ -1,6 +1,6 @@ {- git-annex command infrastructure  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Add.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -160,8 +160,9 @@ ingest (Just source) = withTSDelta $ \delta -> do 	backend <- chooseBackend $ keyFilename source 	k <- genKey source backend-	ms <- liftIO $ catchMaybeIO $ getFileStatus $ contentLocation source-	mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta) ms+	let src = contentLocation source+	ms <- liftIO $ catchMaybeIO $ getFileStatus src+	mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta src) ms 	case (mcache, inodeCache source) of 		(_, Nothing) -> go k mcache ms 		(Just newc, Just c) | compareStrong c newc -> go k mcache ms@@ -229,7 +230,7 @@ {- Creates the symlink to the annexed content, returns the link target. -} link :: FilePath -> Key -> Maybe InodeCache -> Annex String link file key mcache = flip catchNonAsync (undo file key) $ do-	l <- inRepo $ gitAnnexLink file key+	l <- calcRepo $ gitAnnexLink file key 	replaceFile file $ makeAnnexLink l  	-- touch symlink to have same time as the original file,@@ -271,7 +272,7 @@ cleanup file key mcache hascontent = do 	ifM (isDirect <&&> pure hascontent) 		( do-			l <- inRepo $ gitAnnexLink file key+			l <- calcRepo $ gitAnnexLink file key 			stageSymlink file =<< hashSymlink l 		, addLink file key mcache 		)
Command/AddUnused.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/AddUrl.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -120,17 +120,16 @@ 	loguri = setDownloader uri OtherDownloader  startWeb :: Bool -> Maybe FilePath -> Maybe Int -> String -> CommandStart-startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s+startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI urlstring   where-	(s', downloader) = getDownloader s-	bad = fromMaybe (error $ "bad url " ++ s') $-		parseURI $ escapeURIString isUnescapedInURI s'-	choosefile = flip fromMaybe optfile+	(urlstring, downloader) = getDownloader s+	bad = fromMaybe (error $ "bad url " ++ urlstring) $+		parseURI $ escapeURIString isUnescapedInURI urlstring 	go url = case downloader of 		QuviDownloader -> usequvi 		_ ->  #ifdef WITH_QUVI-			ifM (quviSupported s')+			ifM (quviSupported urlstring) 				( usequvi 				, regulardownload url 				)@@ -139,30 +138,44 @@ #endif 	regulardownload url = do 		pathmax <- liftIO $ fileNameLengthLimit "."-		let file = choosefile $ url2file url pathdepth pathmax+		urlinfo <- if relaxed+			then pure $ Url.UrlInfo True Nothing Nothing+			else Url.withUrlOptions (Url.getUrlInfo urlstring)+		file <- case optfile of+			Just f -> pure f+			Nothing -> case Url.urlSuggestedFile urlinfo of+				Nothing -> pure $ url2file url pathdepth pathmax+				Just sf -> do+					let f = truncateFilePath pathmax $+						sanitizeFilePath sf+					ifM (liftIO $ doesFileExist f <||> doesDirectoryExist f)+						( pure $ url2file url pathdepth pathmax+						, pure f+						) 		showStart "addurl" file-		next $ performWeb relaxed s' file+		next $ performWeb relaxed urlstring file urlinfo #ifdef WITH_QUVI-	badquvi = error $ "quvi does not know how to download url " ++ s'+	badquvi = error $ "quvi does not know how to download url " ++ urlstring 	usequvi = do 		page <- fromMaybe badquvi-			<$> withQuviOptions Quvi.forceQuery [Quvi.quiet, Quvi.httponly] s'+			<$> withQuviOptions Quvi.forceQuery [Quvi.quiet, Quvi.httponly] urlstring 		let link = fromMaybe badquvi $ headMaybe $ Quvi.pageLinks page 		pathmax <- liftIO $ fileNameLengthLimit "."-		let file = choosefile $ truncateFilePath pathmax $ sanitizeFilePath $-			Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link+		let file = flip fromMaybe optfile $+			truncateFilePath pathmax $ sanitizeFilePath $+				Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link 		showStart "addurl" file-		next $ performQuvi relaxed s' (Quvi.linkUrl link) file+		next $ performQuvi relaxed urlstring (Quvi.linkUrl link) file #else 	usequvi = error "not built with quvi support" #endif -performWeb :: Bool -> URLString -> FilePath -> CommandPerform-performWeb relaxed url file = ifAnnexed file addurl geturl+performWeb :: Bool -> URLString -> FilePath -> Url.UrlInfo -> CommandPerform+performWeb relaxed url file urlinfo = ifAnnexed file addurl geturl   where-	geturl = next $ isJust <$> addUrlFile relaxed url file-	addurl = addUrlChecked relaxed url webUUID checkexistssize-	checkexistssize = Url.withUrlOptions . Url.check url . keySize+	geturl = next $ isJust <$> addUrlFile relaxed url urlinfo file+	addurl = addUrlChecked relaxed url webUUID $ \k -> return $+		(Url.urlExists urlinfo, Url.urlSize urlinfo == keySize k)  #ifdef WITH_QUVI performQuvi :: Bool -> URLString -> URLString -> FilePath -> CommandPerform@@ -189,7 +202,8 @@ 			 - retained, because the size of a video stream 			 - might change and we want to be able to download 			 - it later. -}-			sizedkey <- addSizeUrlKey videourl key+			urlinfo <- Url.withUrlOptions (Url.getUrlInfo videourl)+			let sizedkey = addSizeUrlKey urlinfo key 			prepGetViaTmpChecked sizedkey Nothing $ do 				tmp <- fromRepo $ gitAnnexTmpObjectLocation key 				showOutput@@ -225,17 +239,17 @@ 					stop 		) -addUrlFile :: Bool -> URLString -> FilePath -> Annex (Maybe Key)-addUrlFile relaxed url file = do+addUrlFile :: Bool -> URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)+addUrlFile relaxed url urlinfo file = do 	liftIO $ createDirectoryIfMissing True (parentDir file) 	ifM (Annex.getState Annex.fast <||> pure relaxed)-		( nodownload relaxed url file-		, downloadWeb url file+		( nodownload url urlinfo file+		, downloadWeb url urlinfo file 		) -downloadWeb :: URLString -> FilePath -> Annex (Maybe Key)-downloadWeb url file = do-	dummykey <- addSizeUrlKey url =<< Backend.URL.fromUrl url Nothing+downloadWeb :: URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)+downloadWeb url urlinfo file = do+	dummykey <- addSizeUrlKey urlinfo <$> Backend.URL.fromUrl url Nothing 	let downloader f _ = do 		showOutput 		downloadUrl [url] f@@ -272,15 +286,9 @@ 			liftIO $ createDirectoryIfMissing True (parentDir tmp) 			downloader tmp p -{- Hits the url to get the size, if available.- -- - This is needed to avoid exceeding the diskreserve when downloading,- - and so the assistant can display a pretty progress bar.- -}-addSizeUrlKey :: URLString -> Key -> Annex Key-addSizeUrlKey url key = do-	size <- snd <$> Url.withUrlOptions (Url.exists url)-	return $ key { keySize = size }+{- Adds the url size to the Key. -}+addSizeUrlKey :: Url.UrlInfo -> Key -> Key+addSizeUrlKey urlinfo key = key { keySize = Url.urlSize urlinfo }  cleanup :: UUID -> URLString -> FilePath -> Key -> Maybe FilePath -> Annex () cleanup u url file key mtmp = do@@ -295,19 +303,15 @@ 		Annex.Queue.flush 	maybe noop (moveAnnex key) mtmp -nodownload :: Bool -> URLString -> FilePath -> Annex (Maybe Key)-nodownload relaxed url file = do-	(exists, size) <- if relaxed-		then pure (True, Nothing)-		else Url.withUrlOptions (Url.exists url)-	if exists-		then do-			key <- Backend.URL.fromUrl url size-			cleanup webUUID url file key Nothing-			return (Just key)-		else do-			warning $ "unable to access url: " ++ url-			return Nothing+nodownload :: URLString -> Url.UrlInfo -> FilePath -> Annex (Maybe Key)+nodownload url urlinfo file+	| Url.urlExists urlinfo = do+		key <- Backend.URL.fromUrl url (Url.urlSize urlinfo)+		cleanup webUUID url file key Nothing+		return (Just key)+	| otherwise = do+		warning $ "unable to access url: " ++ url+		return Nothing  url2file :: URI -> Maybe Int -> Int -> FilePath url2file url pathdepth pathmax = case pathdepth of
Command/Assistant.hs view
@@ -1,6 +1,6 @@ {- git-annex assistant  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Commit.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/ConfigList.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Copy.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Dead.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Describe.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/DiffDriver.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Direct.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Drop.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -156,7 +156,7 @@ 		show (length have) ++ " out of " ++ show (fromNumCopies need) ++  		" necessary copies" 	Remote.showTriedRemotes bad-	Remote.showLocations key (have++skip)+	Remote.showLocations True key (have++skip) 		"Rather than dropping this file, try using: git annex move" 	hint 	return False
Command/DropKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/DropUnused.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/EnableRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/ExamineKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Find.hs view
@@ -1,12 +1,13 @@ {- git-annex command  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}  module Command.Find where +import Data.Default import qualified Data.Map as M  import Common.Annex@@ -65,8 +66,8 @@ 	, ("bytesize", size show) 	, ("humansize", size $ roughSize storageUnits True) 	, ("keyname", keyName key)-	, ("hashdirlower", hashDirLower key)-	, ("hashdirmixed", hashDirMixed key)+	, ("hashdirlower", hashDirLower def key)+	, ("hashdirmixed", hashDirMixed def key) 	, ("mtime", whenavail show $ keyMtime key) 	]   where
Command/FindRef.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Fix.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -28,7 +28,7 @@ {- Fixes the symlink to an annexed file. -} start :: FilePath -> Key -> CommandStart start file key = do-	link <- inRepo $ gitAnnexLink file key+	link <- calcRepo $ gitAnnexLink file key 	stopUnless ((/=) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) $ do 		showStart "fix" file 		next $ perform file link
Command/Forget.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/FromKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -33,7 +33,7 @@  perform :: Key -> FilePath -> CommandPerform perform key file = do-	link <- inRepo $ gitAnnexLink file key+	link <- calcRepo $ gitAnnexLink file key 	liftIO $ createDirectoryIfMissing True (parentDir file) 	liftIO $ createSymbolicLink link file 	next $ cleanup file
Command/Fsck.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -192,7 +192,7 @@  -} fixLink :: Key -> FilePath -> Annex Bool fixLink key file = do-	want <- inRepo $ gitAnnexLink file key+	want <- calcRepo $ gitAnnexLink file key 	have <- getAnnexLinkTarget file 	maybe noop (go want) have 	return True@@ -303,8 +303,7 @@ checkKeySizeOr bad key file = case Types.Key.keySize key of 	Nothing -> return True 	Just size -> do-		size' <- fromIntegral . fileSize-			<$> liftIO (getFileStatus file)+		size' <- liftIO $ getFileSize file 		comparesizes size size'   where 	comparesizes a b = do
Command/FuzzTest.hs view
@@ -1,6 +1,6 @@ {- git-annex fuzz generator  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/GCryptSetup.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Get.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -79,7 +79,7 @@ 			( docopy r witness <||> trycopy full rs witness 			, trycopy full rs witness 			)-	showlocs = Remote.showLocations key []+	showlocs = Remote.showLocations False key [] 		"No other repository is known to contain the file." 	-- This check is to avoid an ugly message if a remote is a 	-- drive that is not mounted.
Command/Group.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Help.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Import.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/ImportFeed.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -144,7 +144,9 @@ 		rundownload url (takeExtension url) $ \f -> do 			r <- Remote.claimingUrl url 			if Remote.uuid r == webUUID-				then maybeToList <$> addUrlFile relaxed url f+				then do+					urlinfo <- Url.withUrlOptions (Url.getUrlInfo url)+					maybeToList <$> addUrlFile relaxed url urlinfo f 				else do 					res <- tryNonAsync $ maybe 						(error $ "unable to checkUrl of " ++ Remote.name r)
Command/InAnnex.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Indirect.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -88,7 +88,7 @@ 			v <- tryNonAsync (moveAnnex k f) 			case v of 				Right _ -> do -					l <- inRepo $ gitAnnexLink f k+					l <- calcRepo $ gitAnnexLink f k 					liftIO $ createSymbolicLink l f 				Left e -> catchNonAsync (Command.Add.undo f k e) 					warnlocked
Command/Info.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -29,6 +29,7 @@ import Types.Key import Logs.UUID import Logs.Trust+import Logs.Location import Config.NumCopies import Remote import Config@@ -65,11 +66,12 @@ data StatInfo = StatInfo 	{ presentData :: Maybe KeyData 	, referencedData :: Maybe KeyData+	, remoteData :: M.Map UUID KeyData 	, numCopiesStats :: Maybe NumCopiesStats 	}-		+ emptyStatInfo :: StatInfo-emptyStatInfo = StatInfo Nothing Nothing Nothing+emptyStatInfo = StatInfo Nothing Nothing M.empty Nothing  -- a state monad for running Stats in type StatState = StateT StatInfo Annex@@ -104,11 +106,16 @@ 		v <- Remote.byName' p 		case v of 			Right r -> remoteInfo r-			Left _ -> maybe noinfo (fileInfo p) =<< isAnnexLink p+			Left _ -> do+				v' <- Remote.nameToUUID' p+				case v' of+					Right u -> uuidInfo u+					Left _ -> maybe noinfo (fileInfo p)+						=<< isAnnexLink p 	)   where 	isdir = liftIO . catchBoolIO . (isDirectory <$$> getFileStatus)-	noinfo = error $ p ++ " is not a directory or an annexed file or a remote"+	noinfo = error $ p ++ " is not a directory or an annexed file or a remote or a uuid"  dirInfo :: FilePath -> Annex () dirInfo dir = showCustom (unwords ["info", dir]) $ do@@ -126,9 +133,16 @@ remoteInfo :: Remote -> Annex () remoteInfo r = showCustom (unwords ["info", Remote.name r]) $ do 	info <- map (\(k, v) -> simpleStat k (pure v)) <$> Remote.getInfo r-	evalStateT (mapM_ showStat (remote_stats r ++ info)) emptyStatInfo+	l <- selStats (remote_fast_stats r ++ info) (uuid_slow_stats (Remote.uuid r))+	evalStateT (mapM_ showStat l) emptyStatInfo 	return True +uuidInfo :: UUID -> Annex ()+uuidInfo u = showCustom (unwords ["info", fromUUID u]) $ do+	l <- selStats [] ((uuid_slow_stats u))+	evalStateT (mapM_ showStat l) emptyStatInfo+	return True+ selStats :: [Stat] -> [Stat] -> Annex [Stat] selStats fast_stats slow_stats = do 	fast <- Annex.getState Annex.fast@@ -179,8 +193,8 @@ 	, key_name k 	] -remote_stats :: Remote -> [Stat]-remote_stats r = map (\s -> s r)+remote_fast_stats :: Remote -> [Stat]+remote_fast_stats r = map (\s -> s r) 	[ remote_name 	, remote_description 	, remote_uuid@@ -188,6 +202,12 @@ 	, remote_type 	] +uuid_slow_stats :: UUID -> [Stat]+uuid_slow_stats u = map (\s -> s u)+	[ remote_annex_keys+	, remote_annex_size+	]+ stat :: String -> (String -> StatState String) -> Stat stat desc a = return $ Just (desc, a desc) @@ -262,6 +282,14 @@ local_annex_size = simpleStat "local annex size" $ 	showSizeKeys <$> cachedPresentData +remote_annex_keys :: UUID -> Stat+remote_annex_keys u = stat "remote annex keys" $ json show $+	countKeys <$> cachedRemoteData u++remote_annex_size :: UUID -> Stat+remote_annex_size u = simpleStat "remote annex size" $+	showSizeKeys <$> cachedRemoteData u+ known_annex_files :: Stat known_annex_files = stat "annexed files in working tree" $ json show $ 	countKeys <$> cachedReferencedData@@ -361,6 +389,16 @@ 			put s { presentData = Just v } 			return v +cachedRemoteData :: UUID -> StatState KeyData+cachedRemoteData u = do+	s <- get+	case M.lookup u (remoteData s) of+		Just v -> return v+		Nothing -> do+			v <- foldKeys <$> lift (loggedKeysFor u)+			put s { remoteData = M.insert u v (remoteData s) }+			return v+ cachedReferencedData :: StatState KeyData cachedReferencedData = do 	s <- get@@ -383,7 +421,7 @@ 	(presentdata, referenceddata, numcopiesstats) <- 		Command.Unused.withKeysFilesReferencedIn dir initial 			(update matcher fast)-	return $ StatInfo (Just presentdata) (Just referenceddata) (Just numcopiesstats)+	return $ StatInfo (Just presentdata) (Just referenceddata) M.empty (Just numcopiesstats)   where 	initial = (emptyKeyData, emptyKeyData, emptyNumCopiesStats) 	update matcher fast key file vs@(presentdata, referenceddata, numcopiesstats) =@@ -451,8 +489,7 @@ 	keysizes keys = do 		dir <- lift $ fromRepo dirspec 		liftIO $ forM keys $ \k -> catchDefaultIO 0 $-			fromIntegral . fileSize -				<$> getFileStatus (dir </> keyFile k)+			getFileSize (dir </> keyFile k)  aside :: String -> String aside s = " (" ++ s ++ ")"
Command/Init.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/InitRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011,2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011,2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/List.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  - Copyright 2013 Antoine Beaupré  -  - Licensed under the GNU GPL version 3 or higher.
Command/Lock.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Log.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -141,7 +141,8 @@ getLog key os = do 	top <- fromRepo Git.repoPath 	p <- liftIO $ relPathCwdToFile top-	let logfile = p </> locationLogFile key+	config <- Annex.getGitConfig+	let logfile = p </> locationLogFile config key 	inRepo $ pipeNullSplitZombie $ 		[ Params "log -z --pretty=format:%ct --raw --abbrev=40" 		, Param "--remove-empty"
Command/LookupKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Map.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Merge.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/MetaData.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Migrate.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Mirror.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Move.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/NotifyChanges.hs view
@@ -1,6 +1,6 @@ {- git-annex-shell command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/NumCopies.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/PreCommit.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Proxy.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/ReKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/RecvKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -62,8 +62,7 @@ 		oksize <- case Types.Key.keySize key of 		        Nothing -> return True 		        Just size -> do-				size' <- fromIntegral . fileSize-					<$> liftIO (getFileStatus tmp)+				size' <- liftIO $ getFileSize tmp 				return $ size == size' 		if oksize 			then case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of
Command/Reinit.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Reinject.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/RemoteDaemon.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Repair.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/ResolveMerge.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/RmUrl.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Schedule.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Semitrust.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/SendKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/SetPresentKey.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Status.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -70,7 +70,7 @@ 		| not (isSymbolicLink s) = checkkey s =<< catKeyFile f 		| otherwise = Just <$> checkNew f 	-	checkkey s (Just k) = ifM (sameFileStatus k s)+	checkkey s (Just k) = ifM (sameFileStatus k f s) 		( return Nothing 		, return $ Just ModifiedFile 		)
Command/Sync.hs view
@@ -1,7 +1,7 @@ {- git-annex command  -  - Copyright 2011 Joachim Breitner <mail@joachim-breitner.de>- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -52,11 +52,17 @@ 	seek SectionCommon "synchronize local repository with remotes"]  syncOptions :: [Option]-syncOptions = [ contentOption ]+syncOptions =+	[ contentOption+	, messageOption+	]  contentOption :: Option contentOption = flagOption [] "content" "also transfer file contents" +messageOption :: Option+messageOption = fieldOption ['m'] "message" "MSG" "specify commit message"+ seek :: CommandSeek seek rs = do 	prepMerge@@ -139,6 +145,8 @@  commit :: CommandStart commit = next $ next $ do+	commitmessage <- fromMaybe "git-annex automatic sync"+		<$> Annex.getField (optionName messageOption) 	showStart "commit" "" 	Annex.Branch.commit "update" 	ifM isDirect@@ -154,8 +162,6 @@ 				] 			return True 		)-  where-	commitmessage = "git-annex automatic sync"  commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool commitStaged commitmode commitmessage = go =<< inRepo Git.Branch.currentUnsafe
Command/Test.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/TestRemote.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/TransferInfo.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/TransferKey.hs view
@@ -1,6 +1,6 @@ {- git-annex plumbing command (for use by old assistant, and users)  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/TransferKeys.hs view
@@ -1,6 +1,6 @@ {- git-annex command, used internally by assistant  -- - Copyright 2012, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Trust.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010, 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Unannex.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Undo.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Ungroup.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Uninit.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Unlock.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Untrust.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Unused.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Upgrade.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/VAdd.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/VCycle.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/VFilter.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/VPop.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Version.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Vicfg.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/View.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Wanted.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Watch.hs view
@@ -1,6 +1,6 @@ {- git-annex watch command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/WebApp.hs view
@@ -1,6 +1,6 @@ {- git-annex webapp launcher  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/Whereis.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Command/XMPPGit.hs view
@@ -1,6 +1,6 @@ {- git-annex command  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Common.hs view
@@ -11,6 +11,7 @@ import Data.List as X hiding (head, tail, init, last) import Data.String.Utils as X hiding (join) import Data.Monoid as X+import Data.Default as X  import System.FilePath as X import System.Directory as X@@ -30,7 +31,8 @@ import Utility.Data as X import Utility.Applicative as X import Utility.FileSystemEncoding as X-import Utility.PosixFiles as X+import Utility.PosixFiles as X hiding (fileSize)+import Utility.FileSize as X import Utility.Network as X  import Utility.PartialPrelude as X
Config.hs view
@@ -1,6 +1,6 @@ {- Git configuration  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -23,7 +23,7 @@  {- Looks up a setting in git config. -} getConfig :: ConfigKey -> String -> Annex String-getConfig (ConfigKey key) def = fromRepo $ Git.Config.get key def+getConfig (ConfigKey key) d = fromRepo $ Git.Config.get key d  getConfigMaybe :: ConfigKey -> Annex (Maybe String) getConfigMaybe (ConfigKey key) = fromRepo $ Git.Config.getMaybe key@@ -58,7 +58,7 @@  - by remote.<name>.annex-cost, or if remote.<name>.annex-cost-command  - is set and prints a number, that is used. -} remoteCost :: RemoteGitConfig -> Cost -> Annex Cost-remoteCost c def = fromMaybe def <$> remoteCost' c+remoteCost c d = fromMaybe d <$> remoteCost' c  remoteCost' :: RemoteGitConfig -> Annex (Maybe Cost) remoteCost' c = case remoteAnnexCostCommand c of
Config/Cost.hs view
@@ -1,6 +1,6 @@ {- Remote costs.  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Config/Files.hs view
@@ -1,6 +1,6 @@ {- git-annex extra config files  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Config/NumCopies.hs view
@@ -1,6 +1,6 @@ {- git-annex numcopies configuration  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Creds.hs view
@@ -1,6 +1,6 @@ {- Credentials storage  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Crypto.hs view
@@ -3,7 +3,7 @@  - Currently using gpg; could later be modified to support different  - crypto backends if neccessary.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git.hs view
@@ -3,7 +3,7 @@  - This is written to be completely independant of git-annex and should be  - suitable for other uses.  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/AutoCorrect.hs view
@@ -1,6 +1,6 @@ {- git autocorrection using Damerau-Levenshtein edit distance  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Branch.hs view
@@ -1,6 +1,6 @@ {- git branch stuff  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/BuildVersion.hs view
@@ -1,6 +1,6 @@ {- git build version  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/CatFile.hs view
@@ -1,6 +1,6 @@ {- git cat-file interface  -- - Copyright 2011, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/CheckAttr.hs view
@@ -1,6 +1,6 @@ {- git check-attr interface  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/CheckIgnore.hs view
@@ -1,6 +1,6 @@ {- git check-ignore interface  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Command.hs view
@@ -1,6 +1,6 @@ {- running git commands  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Command/Batch.hs view
@@ -1,6 +1,6 @@ {- running batch git commands  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Config.hs view
@@ -1,6 +1,6 @@ {- git repository configuration handling  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Construct.hs view
@@ -1,6 +1,6 @@ {- Construction of Git Repo objects  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/CurrentRepo.hs view
@@ -1,6 +1,6 @@ {- The current git repository.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/DiffTree.hs view
@@ -1,6 +1,6 @@ {- git diff-tree interface  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/DiffTreeItem.hs view
@@ -1,6 +1,6 @@ {- git diff-tree item  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/FileMode.hs view
@@ -1,6 +1,6 @@ {- git file modes  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/FilePath.hs view
@@ -5,7 +5,7 @@  - top of the repository even when run in a subdirectory. Adding some  - types helps keep that straight.  -- - Copyright 2012-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Filename.hs view
@@ -1,7 +1,7 @@ {- Some git commands output encoded filenames, in a rather annoyingly complex  - C-style encoding.  -- - Copyright 2010, 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Fsck.hs view
@@ -1,6 +1,6 @@ {- git fsck interface  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/GCrypt.hs view
@@ -2,7 +2,7 @@  -  - https://github.com/blake2-ppc/git-remote-gcrypt  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/HashObject.hs view
@@ -1,6 +1,6 @@ {- git hash-object interface  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Hook.hs view
@@ -1,15 +1,20 @@ {- git hooks  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013-2015 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -} +{-# LANGUAGE CPP #-}+ module Git.Hook where  import Common import Git import Utility.Tmp+#ifndef mingw32_HOST_OS+import Utility.FileMode+#endif  data Hook = Hook 	{ hookName :: FilePath@@ -56,3 +61,37 @@ expectedContent h r = do 	content <- readFile $ hookFile h r 	return $ content == hookScript h++hookExists :: Hook -> Repo -> IO Bool+hookExists h r = do+	let f = hookFile h r+	catchBoolIO $+#ifndef mingw32_HOST_OS+		isExecutable . fileMode <$> getFileStatus f+#else+		doesFileExist f+#endif++runHook :: Hook -> Repo -> IO Bool+runHook h r = do+	let f = hookFile h r+	(c, ps) <- findcmd f+	boolSystem c ps+  where+#ifndef mingw32_HOST_OS+	findcmd = defcmd+#else+	{- Like msysgit, parse the first line of the hook file,+	 - look for "#!", and dispatch the interpreter on the file. -}+	findcmd f = do+		l <- headMaybe . lines <$> catchDefaultIO "" (readFile f)+		case l of+			Just ('#':'!':rest) -> case words rest of+				[] -> defcmd f+				(c:ps) -> do+					let ps' = map Param (ps ++ [f])+					ok <- inPath c+					return (if ok then c else takeFileName c, ps')+			_ -> defcmd f+#endif+	defcmd f = return (f, [])
Git/Index.hs view
@@ -1,6 +1,6 @@ {- git index file stuff  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/LsFiles.hs view
@@ -1,6 +1,6 @@ {- git ls-files interface  -- - Copyright 2010,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/LsTree.hs view
@@ -1,6 +1,6 @@ {- git ls-tree interface  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Merge.hs view
@@ -1,6 +1,6 @@ {- git merging  -- - Copyright 2012, 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012, 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Objects.hs view
@@ -1,6 +1,6 @@ {- .git/objects  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Queue.hs view
@@ -1,6 +1,6 @@ {- git repository command queue  -- - Copyright 2010,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Ref.hs view
@@ -1,6 +1,6 @@ {- git ref stuff  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/RefLog.hs view
@@ -1,6 +1,6 @@ {- git reflog interface  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Remote.hs view
@@ -1,6 +1,6 @@ {- git remote stuff  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Remote/Remove.hs view
@@ -1,6 +1,6 @@ {- git remote stuff  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Repair.hs view
@@ -1,6 +1,6 @@ {- git repository recovery  -- - Copyright 2013-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2013-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Sha.hs view
@@ -1,6 +1,6 @@ {- git SHA stuff  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/SharedRepository.hs view
@@ -1,6 +1,6 @@ {- git core.sharedRepository handling  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Types.hs view
@@ -1,6 +1,6 @@ {- git data types  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/UnionMerge.hs view
@@ -1,6 +1,6 @@ {- git-union-merge library  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/UpdateIndex.hs view
@@ -1,6 +1,6 @@ {- git-update-index library  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Url.hs view
@@ -1,6 +1,6 @@ {- git repository urls  -- - Copyright 2010, 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010, 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Git/Version.hs view
@@ -1,6 +1,6 @@ {- git versions  -- - Copyright 2011, 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011, 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Limit.hs view
@@ -1,6 +1,6 @@ {- user-specified limits on files to act on  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -239,9 +239,7 @@ 	checkkey sz key = return $ keySize key `vs` Just sz 	check _ sz (Just key) = checkkey sz key 	check fi sz Nothing = do-		filesize <- liftIO $ catchMaybeIO $-			fromIntegral . fileSize-				<$> getFileStatus (relFile fi)+		filesize <- liftIO $ catchMaybeIO $ getFileSize (relFile fi) 		return $ filesize `vs` Just sz  addMetaData :: String -> Annex ()
Limit/Wanted.hs view
@@ -1,6 +1,6 @@ {- git-annex limits by wanted status  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Locations.hs view
@@ -1,6 +1,6 @@ {- git-annex file locations  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2015 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -20,7 +20,6 @@ 	gitAnnexInodeSentinal, 	gitAnnexInodeSentinalCache, 	annexLocations,-	annexLocation, 	gitAnnexDir, 	gitAnnexObjectDir, 	gitAnnexTmpMiscDir,@@ -59,7 +58,7 @@ 	gitAnnexRemotesDir, 	gitAnnexAssistantDefaultDir, 	isLinkToAnnex,-	annexHashes,+	HashLevels(..), 	hashDirMixed, 	hashDirLower, 	preSanitizeKeyName,@@ -67,16 +66,16 @@ 	prop_idempotent_fileKey ) where -import Data.Bits-import Data.Word-import Data.Hash.MD5 import Data.Char+import Data.Default  import Common-import Types+import Types.GitConfig import Types.Key import Types.UUID+import Types.Difference import qualified Git+import Annex.DirHashes  {- Conventions:  -@@ -102,12 +101,16 @@ objectDir = addTrailingPathSeparator $ annexDir </> "objects"  {- Annexed file's possible locations relative to the .git directory.- - There are two different possibilities, using different hashes. -}-annexLocations :: Key -> [FilePath]-annexLocations key = map (annexLocation key) annexHashes-annexLocation :: Key -> Hasher -> FilePath-annexLocation key hasher = objectDir </> keyPath key hasher+ - There are two different possibilities, using different hashes.+ -+ - Also, some repositories have a Difference in hash directory depth.+ -}+annexLocations :: GitConfig -> Key -> [FilePath]+annexLocations config key = map (annexLocation config key) dirHashes +annexLocation :: GitConfig -> Key -> (HashLevels -> Hasher) -> FilePath+annexLocation config key hasher = objectDir </> keyPath key (hasher $ objectHashLevels config)+ {- Annexed object's location in a repository.  -  - When there are multiple possible locations, returns the one where the@@ -120,32 +123,37 @@  - the actual location of the file's content.  -} gitAnnexLocation :: Key -> Git.Repo -> GitConfig -> IO FilePath-gitAnnexLocation key r config = gitAnnexLocation' key r (annexCrippledFileSystem config)-gitAnnexLocation' :: Key -> Git.Repo -> Bool -> IO FilePath-gitAnnexLocation' key r crippled+gitAnnexLocation key r config = gitAnnexLocation' key r config (annexCrippledFileSystem config)+gitAnnexLocation' :: Key -> Git.Repo -> GitConfig -> Bool -> IO FilePath+gitAnnexLocation' key r config crippled 	{- Bare repositories default to hashDirLower for new 	 - content, as it's more portable. 	 - 	 - Repositories on filesystems that are crippled also use 	 - hashDirLower, since they do not use symlinks and it's-	 - more portable. -}-	| Git.repoIsLocalBare r || crippled =-		check $ map inrepo $ annexLocations key+	 - more portable.+	 -+	 - ObjectHashLower can also be set to force it.+	 -}+	| Git.repoIsLocalBare r +		|| crippled +		|| hasDifference ObjectHashLower (annexDifferences config) =+			check $ map inrepo $ annexLocations config key 	{- Non-bare repositories only use hashDirMixed, so 	 - don't need to do any work to check if the file is 	 - present. -}-	| otherwise = return $ inrepo $ annexLocation key hashDirMixed+	| otherwise = return $ inrepo $ annexLocation config key hashDirMixed   where 	inrepo d = Git.localGitDir r </> d 	check locs@(l:_) = fromMaybe l <$> firstM doesFileExist locs 	check [] = error "internal"  {- Calculates a symlink to link a file to an annexed object. -}-gitAnnexLink :: FilePath -> Key -> Git.Repo -> IO FilePath-gitAnnexLink file key r = do+gitAnnexLink :: FilePath -> Key -> Git.Repo -> GitConfig -> IO FilePath+gitAnnexLink file key r config = do 	currdir <- getCurrentDirectory 	let absfile = fromMaybe whoops $ absNormPathUnix currdir file-	loc <- gitAnnexLocation' key r False+	loc <- gitAnnexLocation' key r config False 	relPathDirToFile (parentDir absfile) loc   where 	whoops = error $ "unable to normalize " ++ file@@ -399,9 +407,9 @@   where 	k = stubKey { keyName = s, keyBackendName = "test" } -{- A location to store a key on the filesystem. A directory hash is used,- - to protect against filesystems that dislike having many items in a- - single directory.+{- A location to store a key on a special remote that uses a filesystem.+ - A directory hash is used, to protect against filesystems that dislike+ - having many items in a single directory.  -  - The file is put in a directory with the same name, this allows  - write-protecting the directory to avoid accidental deletion of the file.@@ -411,44 +419,11 @@   where 	f = keyFile key -{- All possibile locations to store a key using different directory hashes. -}-keyPaths :: Key -> [FilePath]-keyPaths key = map (keyPath key) annexHashes--{- Two different directory hashes may be used. The mixed case hash- - came first, and is fine, except for the problem of case-strict- - filesystems such as Linux VFAT (mounted with shortname=mixed),- - which do not allow using a directory "XX" when "xx" already exists.- - To support that, most repositories use the lower case hash for new data. -}-type Hasher = Key -> FilePath--annexHashes :: [Hasher]-annexHashes = [hashDirLower, hashDirMixed]--hashDirMixed :: Hasher-hashDirMixed k = addTrailingPathSeparator $ take 2 dir </> drop 2 dir-  where-	dir = take 4 $ display_32bits_as_dir =<< [a,b,c,d]-	ABCD (a,b,c,d) = md5 $ md5FilePath $ key2file $ nonChunkKey k--hashDirLower :: Hasher-hashDirLower k = addTrailingPathSeparator $ take 3 dir </> drop 3 dir-  where-	dir = take 6 $ md5s $ md5FilePath $ key2file $ nonChunkKey k--{- modified version of display_32bits_as_hex from Data.Hash.MD5- -   Copyright (C) 2001 Ian Lynagh - -   License: Either BSD or GPL+{- All possibile locations to store a key in a special remote+ - using different directory hashes.+ -+ - This is compatible with the annexLocations, for interoperability between+ - special remotes and git-annex repos.  -}-display_32bits_as_dir :: Word32 -> String-display_32bits_as_dir w = trim $ swap_pairs cs-  where -	-- Need 32 characters to use. To avoid inaverdently making-	-- a real word, use letters that appear less frequently.-	chars = ['0'..'9'] ++ "zqjxkmvwgpfZQJXKMVWGPF"-	cs = map (\x -> getc $ (shiftR w (6*x)) .&. 31) [0..7]-	getc n = chars !! fromIntegral n-	swap_pairs (x1:x2:xs) = x2:x1:swap_pairs xs-	swap_pairs _ = []-	-- Last 2 will always be 00, so omit.-	trim = take 6+keyPaths :: Key -> [FilePath]+keyPaths key = map (\h -> keyPath key (h def)) dirHashes
Logs.hs view
@@ -1,6 +1,6 @@ {- git-annex log file names  -- - Copyright 2013-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2013-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -9,6 +9,7 @@  import Common.Annex import Types.Key+import Annex.DirHashes  {- There are several varieties of log file formats. -} data LogVariety@@ -39,6 +40,7 @@ 	, preferredContentLog 	, requiredContentLog 	, scheduleLog+	, differenceLog 	]  {- All the ways to get a key from a presence log file -}@@ -82,9 +84,12 @@ scheduleLog :: FilePath scheduleLog = "schedule.log" +differenceLog :: FilePath+differenceLog = "difference.log"+ {- The pathname of the location log file for a given key. -}-locationLogFile :: Key -> String-locationLogFile key = hashDirLower key ++ keyFile key ++ ".log"+locationLogFile :: GitConfig -> Key -> String+locationLogFile config key = branchHashDir config key </> keyFile key ++ ".log"  {- Converts a pathname into a key if it's a location log. -} locationLogFileKey :: FilePath -> Maybe Key@@ -97,15 +102,17 @@ 	(base, ext) = splitAt (length file - 4) file  {- The filename of the url log for a given key. -}-urlLogFile :: Key -> FilePath-urlLogFile key = hashDirLower key </> keyFile key ++ urlLogExt+urlLogFile :: GitConfig -> Key -> FilePath+urlLogFile config key = branchHashDir config key </> keyFile key ++ urlLogExt  {- Old versions stored the urls elsewhere. -}-oldurlLogs :: Key -> [FilePath]-oldurlLogs key =-	[ "remote/web" </> hashDirLower key </> key2file key ++ ".log"-	, "remote/web" </> hashDirLower key </> keyFile key ++ ".log"+oldurlLogs :: GitConfig -> Key -> [FilePath]+oldurlLogs config key =+	[ "remote/web" </> hdir </> key2file key ++ ".log"+	, "remote/web" </> hdir </> keyFile key ++ ".log" 	]+  where+	hdir = branchHashDir config key  urlLogExt :: String urlLogExt = ".log.web"@@ -126,8 +133,9 @@ isUrlLog file = urlLogExt `isSuffixOf` file  {- The filename of the remote state log for a given key. -}-remoteStateLogFile :: Key -> FilePath-remoteStateLogFile key = hashDirLower key </> keyFile key ++ remoteStateLogExt+remoteStateLogFile :: GitConfig -> Key -> FilePath+remoteStateLogFile config key = branchHashDir config key +	</> keyFile key ++ remoteStateLogExt  remoteStateLogExt :: String remoteStateLogExt = ".log.rmt"@@ -136,8 +144,8 @@ isRemoteStateLog path = remoteStateLogExt `isSuffixOf` path  {- The filename of the chunk log for a given key. -}-chunkLogFile :: Key -> FilePath-chunkLogFile key = hashDirLower key </> keyFile key ++ chunkLogExt+chunkLogFile :: GitConfig -> Key -> FilePath+chunkLogFile config key = branchHashDir config key </> keyFile key ++ chunkLogExt  chunkLogFileKey :: FilePath -> Maybe Key chunkLogFileKey path@@ -155,35 +163,11 @@ isChunkLog path = chunkLogExt `isSuffixOf` path  {- The filename of the metadata log for a given key. -}-metaDataLogFile :: Key -> FilePath-metaDataLogFile key = hashDirLower key </> keyFile key ++ metaDataLogExt+metaDataLogFile :: GitConfig -> Key -> FilePath+metaDataLogFile config key = branchHashDir config key </> keyFile key ++ metaDataLogExt  metaDataLogExt :: String metaDataLogExt = ".log.met"  isMetaDataLog :: FilePath -> Bool isMetaDataLog path = metaDataLogExt `isSuffixOf` path--prop_logs_sane :: Key -> Bool-prop_logs_sane dummykey = and-	[ isNothing (getLogVariety "unknown")-	, expect gotUUIDBasedLog (getLogVariety uuidLog)-	, expect gotPresenceLog (getLogVariety $ locationLogFile dummykey)-	, expect gotPresenceLog (getLogVariety $ urlLogFile dummykey)-	, expect gotNewUUIDBasedLog (getLogVariety $ remoteStateLogFile dummykey)-	, expect gotChunkLog (getLogVariety $ chunkLogFile dummykey)-	, expect gotOtherLog (getLogVariety $ metaDataLogFile dummykey)-	, expect gotOtherLog (getLogVariety numcopiesLog)-	]-  where-	expect = maybe False-	gotUUIDBasedLog UUIDBasedLog = True-	gotUUIDBasedLog _ = False-	gotNewUUIDBasedLog NewUUIDBasedLog = True-	gotNewUUIDBasedLog _ = False-	gotChunkLog (ChunkLog k) = k == dummykey-	gotChunkLog _ = False-	gotPresenceLog (PresenceLog k) = k == dummykey-	gotPresenceLog _ = False-	gotOtherLog OtherLog = True-	gotOtherLog _ = False
Logs/Chunk.hs view
@@ -10,7 +10,7 @@  -  - Format: "timestamp uuid:chunksize chunkcount"  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -29,6 +29,7 @@ import Logs.MapLog import qualified Annex.Branch import Logs.Chunk.Pure+import qualified Annex  import qualified Data.Map as M import Data.Time.Clock.POSIX@@ -36,14 +37,17 @@ chunksStored :: UUID -> Key -> ChunkMethod -> ChunkCount -> Annex () chunksStored u k chunkmethod chunkcount = do 	ts <- liftIO getPOSIXTime-	Annex.Branch.change (chunkLogFile k) $+	config <- Annex.getGitConfig+	Annex.Branch.change (chunkLogFile config k) $ 		showLog . changeMapLog ts (u, chunkmethod) chunkcount . parseLog  chunksRemoved :: UUID -> Key -> ChunkMethod -> Annex () chunksRemoved u k chunkmethod = chunksStored u k chunkmethod 0  getCurrentChunks :: UUID -> Key -> Annex [(ChunkMethod, ChunkCount)]-getCurrentChunks u k = select . parseLog <$> Annex.Branch.get (chunkLogFile k)+getCurrentChunks u k = do+	config <- Annex.getGitConfig+	select . parseLog <$> Annex.Branch.get (chunkLogFile config k)   where 	select = filter (\(_m, ct) -> ct > 0) 		. map (\((_ku, m), l) -> (m, value l))
Logs/Chunk/Pure.hs view
@@ -1,6 +1,6 @@ {- Chunk logs, pure operations.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
+ Logs/Difference.hs view
@@ -0,0 +1,41 @@+{- git-annex difference log+ -+ - Copyright 2015 Joey Hess <id@joeyh.name>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++module Logs.Difference (+	recordDifferences,+	recordedDifferences,+	recordedDifferencesFor,+	module Logs.Difference.Pure+) where++import Data.Monoid+import Data.Time.Clock.POSIX+import qualified Data.Map as M++import Common.Annex+import Types.Difference+import qualified Annex.Branch+import Logs+import Logs.UUIDBased+import Logs.Difference.Pure++recordDifferences :: Differences -> UUID -> Annex ()+recordDifferences (Differences differences) uuid = do+	ts <- liftIO getPOSIXTime+	Annex.Branch.change differenceLog $+		showLog id . changeLog ts uuid (show differences) . parseLog Just+recordDifferences UnknownDifferences _ = return ()++-- Map of UUIDs that have Differences recorded.+-- If a new version of git-annex has added a Difference this version+-- doesn't know about, it will contain UnknownDifferences.+recordedDifferences :: Annex (M.Map UUID Differences)+recordedDifferences = parseDifferencesLog <$> Annex.Branch.get differenceLog++recordedDifferencesFor :: UUID -> Annex Differences+recordedDifferencesFor u = fromMaybe mempty . M.lookup u +	<$> recordedDifferences
+ Logs/Difference/Pure.hs view
@@ -0,0 +1,25 @@+{- git-annex difference log, pure functions+ -+ - Copyright 2015 Joey Hess <id@joeyh.name>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++module Logs.Difference.Pure (+	allDifferences,+	parseDifferencesLog,+) where++import Data.Monoid+import qualified Data.Map as M++import Common.Annex+import Types.Difference+import Logs.UUIDBased++parseDifferencesLog :: String -> (M.Map UUID Differences)+parseDifferencesLog = simpleMap . parseLog (Just . readDifferences)++-- The sum of all recorded differences, across all UUIDs.+allDifferences :: M.Map UUID Differences -> Differences+allDifferences = mconcat . M.elems
Logs/FsckResults.hs view
@@ -1,6 +1,6 @@ {- git-annex fsck results log files  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Group.hs view
@@ -1,6 +1,6 @@ {- git-annex group log  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Location.hs view
@@ -8,7 +8,7 @@  - Repositories record their UUID and the date when they --get or --drop  - a value.  - - - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -29,6 +29,7 @@ import Logs.Presence import Annex.UUID import Git.Types (RefDate)+import qualified Annex  {- Log a change in the presence of a key's value in current repository. -} logStatus :: Key -> LogStatus -> Annex ()@@ -38,7 +39,9 @@  {- Log a change in the presence of a key's value in a repository. -} logChange :: Key -> UUID -> LogStatus -> Annex ()-logChange key (UUID u) s = addLog (locationLogFile key) =<< logNow s u+logChange key (UUID u) s = do+	config <- Annex.getGitConfig+	addLog (locationLogFile config key) =<< logNow s u logChange _ NoUUID _ = noop  {- Returns a list of repository UUIDs that, according to the log, have@@ -51,7 +54,9 @@ loggedLocationsHistorical = getLoggedLocations . historicalLog  getLoggedLocations :: (FilePath -> Annex [String]) -> Key -> Annex [UUID]-getLoggedLocations getter key = map toUUID <$> (getter . locationLogFile) key+getLoggedLocations getter key = do+	config <- Annex.getGitConfig+	map toUUID <$> (getter . locationLogFile config) key  {- Finds all keys that have location log information.  - (There may be duplicate keys in the list.) -}
Logs/MapLog.hs view
@@ -4,7 +4,7 @@  -  - A line of the log will look like: "timestamp field value"  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/MetaData.hs view
@@ -18,7 +18,7 @@  - and so foo currently has no value.  -  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -38,6 +38,7 @@ import Types.MetaData import Annex.MetaData.StandardFields import qualified Annex.Branch+import qualified Annex import Logs import Logs.SingleValue @@ -52,7 +53,9 @@ 	deserialize = Types.MetaData.deserialize  getMetaDataLog :: Key -> Annex (Log MetaData)-getMetaDataLog = readLog . metaDataLogFile+getMetaDataLog key = do+	config <- Annex.getGitConfig+	readLog $ metaDataLogFile config key  {- Go through the log from oldest to newest, and combine it all  - into a single MetaData representing the current state.@@ -97,10 +100,12 @@ addMetaData' :: Key -> MetaData -> POSIXTime -> Annex () addMetaData' k d@(MetaData m) now 	| d == emptyMetaData = noop-	| otherwise = Annex.Branch.change (metaDataLogFile k) $-		showLog . simplifyLog -			. S.insert (LogEntry now metadata)-			. parseLog+	| otherwise = do+		config <- Annex.getGitConfig+		Annex.Branch.change (metaDataLogFile config k) $+			showLog . simplifyLog +				. S.insert (LogEntry now metadata)+				. parseLog   where 	metadata = MetaData $ M.filterWithKey (\f _ -> not (isLastChangedField f)) m @@ -181,6 +186,7 @@ 	| oldkey == newkey = noop 	| otherwise = do 		l <- getMetaDataLog oldkey-		unless (S.null l) $-			Annex.Branch.change (metaDataLogFile newkey) $+		unless (S.null l) $ do+			config <- Annex.getGitConfig+			Annex.Branch.change (metaDataLogFile config newkey) $ 				const $ showLog l
Logs/NumCopies.hs view
@@ -1,6 +1,6 @@ {- git-annex numcopies log  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/PreferredContent.hs view
@@ -1,6 +1,6 @@ {- git-annex preferred content matcher configuration  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -52,12 +52,12 @@ isRequiredContent = checkMap requiredContentMap  checkMap :: Annex (FileMatcherMap Annex) -> Maybe UUID -> AssumeNotPresent -> Maybe Key -> AssociatedFile -> Bool -> Annex Bool-checkMap getmap mu notpresent mkey afile def = do+checkMap getmap mu notpresent mkey afile d = do 	u <- maybe getUUID return mu 	m <- getmap 	case M.lookup u m of-		Nothing -> return def-		Just matcher -> checkMatcher matcher mkey afile notpresent def+		Nothing -> return d+		Just matcher -> checkMatcher matcher mkey afile notpresent d  preferredContentMap :: Annex (FileMatcherMap Annex) preferredContentMap = maybe (fst <$> preferredRequiredMapsLoad) return
Logs/PreferredContent/Raw.hs view
@@ -1,6 +1,6 @@ {- unparsed preferred content expressions  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Presence.hs view
@@ -6,7 +6,7 @@  - A line of the log will look like: "date N INFO"  - Where N=1 when the INFO is present, and 0 otherwise.  - - - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Presence/Pure.hs view
@@ -1,6 +1,6 @@ {- git-annex presence log, pure operations  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Remote.hs view
@@ -1,6 +1,6 @@ {- git-annex remote log  - - - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -   - Licensed under the GNU GPL version 3 or higher.  -}
Logs/RemoteState.hs view
@@ -1,6 +1,6 @@ {- Remote state logs.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -14,6 +14,7 @@ import Logs import Logs.UUIDBased import qualified Annex.Branch+import qualified Annex  import qualified Data.Map as M import Data.Time.Clock.POSIX@@ -23,11 +24,14 @@ setRemoteState :: UUID -> Key -> RemoteState -> Annex () setRemoteState u k s = do 	ts <- liftIO getPOSIXTime-	Annex.Branch.change (remoteStateLogFile k) $+	config <- Annex.getGitConfig+	Annex.Branch.change (remoteStateLogFile config k) $ 		showLogNew id . changeLog ts u s . parseLogNew Just  getRemoteState :: UUID -> Key -> Annex (Maybe RemoteState)-getRemoteState u k = extract . parseLogNew Just-	<$> Annex.Branch.get (remoteStateLogFile k)+getRemoteState u k = do+	config <- Annex.getGitConfig+	extract . parseLogNew Just+		<$> Annex.Branch.get (remoteStateLogFile config k)   where 	extract m = value <$> M.lookup u m
Logs/Schedule.hs view
@@ -1,6 +1,6 @@ {- git-annex scheduled activities log  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/SingleValue.hs view
@@ -6,7 +6,7 @@  -  - The line with the newest timestamp wins.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Transfer.hs view
@@ -1,6 +1,6 @@ {- git-annex transfer information files and lock files  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Transitions.hs view
@@ -7,7 +7,7 @@  - done that is listed in the remote branch by checking that the local  - branch contains the same transition, with the same or newer start time.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Trust.hs view
@@ -1,6 +1,6 @@ {- git-annex trust log  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Trust/Basic.hs view
@@ -1,6 +1,6 @@ {- git-annex trust log, basics  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Trust/Pure.hs view
@@ -1,6 +1,6 @@ {- git-annex trust log, pure operations  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/UUID.hs view
@@ -8,7 +8,7 @@  -  - uuid.log stores a list of known uuids, and their descriptions.  -- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/UUIDBased.hs view
@@ -9,7 +9,7 @@  -  - New uuid based logs instead use the form: "timestamp UUID INFO"  - - - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Unused.hs view
@@ -10,7 +10,7 @@  - The timestamp indicates when the key was first determined to be unused.  - Older versions of the log omit the timestamp.  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/View.hs view
@@ -4,7 +4,7 @@  -  - This file is stored locally in .git/annex/, not in the git-annex branch.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Logs/Web.hs view
@@ -1,6 +1,6 @@ {- Web url logs.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -37,7 +37,8 @@ {- Gets all urls that a key might be available from. -} getUrls :: Key -> Annex [URLString] getUrls key = do-	l <- go $ urlLogFile key : oldurlLogs key+	config <- Annex.getGitConfig+	l <- go $ urlLogFile config key : oldurlLogs config key 	tmpl <- Annex.getState (maybeToList . M.lookup key . Annex.tempurls) 	return (tmpl ++ l)   where@@ -54,13 +55,15 @@ setUrlPresent :: UUID -> Key -> URLString -> Annex () setUrlPresent uuid key url = do 	us <- getUrls key-	unless (url `elem` us) $-		addLog (urlLogFile key) =<< logNow InfoPresent url+	unless (url `elem` us) $ do+		config <- Annex.getGitConfig+		addLog (urlLogFile config key) =<< logNow InfoPresent url 	logChange key uuid InfoPresent  setUrlMissing :: UUID -> Key -> URLString -> Annex () setUrlMissing uuid key url = do-	addLog (urlLogFile key) =<< logNow InfoMissing url+	config <- Annex.getGitConfig+	addLog (urlLogFile config key) =<< logNow InfoMissing url 	whenM (null <$> getUrls key) $ 		logChange key uuid InfoMissing 
Messages.hs view
@@ -1,6 +1,6 @@ {- git-annex output messages  -- - Copyright 2010-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Messages/JSON.hs view
@@ -1,6 +1,6 @@ {- git-annex JSON output  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote.hs view
@@ -1,6 +1,6 @@ {- git-annex remotes  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -131,8 +131,8 @@ byNameOrGroup n = go =<< getConfigMaybe (ConfigKey ("remotes." ++ n))   where 	go (Just l) = concatMap maybeToList <$>-		mapM (Remote.byName . Just) (split " " l)-	go Nothing = maybeToList <$> Remote.byName (Just n)+		mapM (byName . Just) (split " " l)+	go Nothing = maybeToList <$> byName (Just n)  {- Only matches remote name, not UUID -} byNameOnly :: RemoteName -> Annex (Maybe Remote)@@ -272,15 +272,17 @@ 	return (sortBy (comparing cost) validremotes, validtrusteduuids)  {- Displays known locations of a key. -}-showLocations :: Key -> [UUID] -> String -> Annex ()-showLocations key exclude nolocmsg = do+showLocations :: Bool -> Key -> [UUID] -> String -> Annex ()+showLocations separateuntrusted key exclude nolocmsg = do 	u <- getUUID 	uuids <- keyLocations key-	untrusteduuids <- trustGet UnTrusted+	untrusteduuids <- if separateuntrusted+		then trustGet UnTrusted+		else pure [] 	let uuidswanted = filteruuids uuids (u:exclude++untrusteduuids)  	let uuidsskipped = filteruuids uuids (u:exclude++uuidswanted)-	ppuuidswanted <- Remote.prettyPrintUUIDs "wanted" uuidswanted-	ppuuidsskipped <- Remote.prettyPrintUUIDs "skipped" uuidsskipped+	ppuuidswanted <- prettyPrintUUIDs "wanted" uuidswanted+	ppuuidsskipped <- prettyPrintUUIDs "skipped" uuidsskipped 	showLongNote $ message ppuuidswanted ppuuidsskipped 	ignored <- filter (remoteAnnexIgnore . gitconfig) <$> remoteList 	unless (null ignored) $
Remote/BitTorrent.hs view
@@ -1,6 +1,6 @@ {- BitTorrent remote.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Bup.hs view
@@ -1,6 +1,6 @@ {- Using bup as a remote.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Ddar.hs view
@@ -1,6 +1,6 @@ {- Using ddar as a remote. Based on bup and rsync remotes.  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  - Copyright 2014 Robie Basak <robie@justgohome.co.uk>  -  - Licensed under the GNU GPL version 3 or higher.@@ -12,7 +12,6 @@ import qualified Data.ByteString.Lazy as L import System.IO.Error -import Data.String.Utils import Common.Annex import Types.Remote import Types.Key@@ -164,7 +163,7 @@ 			ExitSuccess -> return $ Right True 			ExitFailure 1 -> return $ Right False 			ExitFailure code -> return $ Left $ "ssh call " ++-				show (Data.String.Utils.join " " $ toCommand params) +++				show (unwords $ toCommand params) ++ 				" failed with status " ++ show code   where 	(host, ddarrepo') = splitRemoteDdarRepo ddarrepo
Remote/Directory.hs view
@@ -1,6 +1,6 @@ {- A "remote" that is just a filesystem directory.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -15,6 +15,7 @@  import qualified Data.ByteString.Lazy as L import qualified Data.Map as M+import Data.Default  import Common.Annex import Types.Remote@@ -107,7 +108,7 @@  {- Directory where the file(s) for a key are stored. -} storeDir :: FilePath -> Key -> FilePath-storeDir d k = addTrailingPathSeparator $ d </> hashDirLower k </> keyFile k+storeDir d k = addTrailingPathSeparator $ d </> hashDirLower def k </> keyFile k  {- Where we store temporary data for a key, in the directory, as it's being  - written. -}
Remote/Directory/LegacyChunked.hs view
@@ -2,7 +2,7 @@  -  - Can be removed eventually.  -- - Copyright 2011-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/External.hs view
@@ -1,6 +1,6 @@ {- External special remote interface.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -184,7 +184,7 @@ 	handleRemoteRequest (PROGRESS bytesprocessed) = 		maybe noop (\a -> liftIO $ a bytesprocessed) mp 	handleRemoteRequest (DIRHASH k) = -		send $ VALUE $ hashDirMixed k+		send $ VALUE $ hashDirMixed def k 	handleRemoteRequest (SETCONFIG setting value) = 		liftIO $ atomically $ do 			let v = externalConfig external
Remote/External/Types.hs view
@@ -1,6 +1,6 @@ {- External special remote data types.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/GCrypt.hs view
@@ -1,6 +1,6 @@ {- git remotes encrypted using git-remote-gcrypt  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -16,6 +16,7 @@ import qualified Data.Map as M import qualified Data.ByteString.Lazy as L import Control.Exception+import Data.Default  import Common.Annex import Types.Remote@@ -121,7 +122,7 @@ 		, availability = availabilityCalc r 		, remotetype = remote 		, mkUnavailable = return Nothing-		, getInfo = return $ gitRepoInfo r+		, getInfo = gitRepoInfo this 		, claimUrl = Nothing 		, checkUrl = Nothing 	}@@ -361,7 +362,7 @@ {- Annexed objects are hashed using lower-case directories for max  - portability. -} gCryptLocation :: Remote -> Key -> FilePath-gCryptLocation r key = Git.repoLocation (repo r) </> objectDir </> keyPath key hashDirLower+gCryptLocation r key = Git.repoLocation (repo r) </> objectDir </> keyPath key (hashDirLower def)  data AccessMethod = AccessDirect | AccessShell 
Remote/Git.hs view
@@ -1,6 +1,6 @@ {- Standard git remotes.  -- - Copyright 2011-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -159,7 +159,7 @@ 			, availability = availabilityCalc r 			, remotetype = remote 			, mkUnavailable = unavailable r u c gc-			, getInfo = return $ gitRepoInfo r+			, getInfo = gitRepoInfo new 			, claimUrl = Nothing 			, checkUrl = Nothing 			}@@ -327,13 +327,15 @@ 	-- If the remote is known to not be bare, try the hash locations 	-- used for non-bare repos first, as an optimisation. 	locs-		| remoteAnnexBare (gitconfig r) == Just False = reverse (annexLocations key)-		| otherwise = annexLocations key+		| remoteAnnexBare remoteconfig == Just False = reverse (annexLocations cfg key)+		| otherwise = annexLocations cfg key #ifndef mingw32_HOST_OS 	locs' = locs #else 	locs' = map (replace "\\" "/") locs #endif+	remoteconfig = gitconfig r+	cfg = fromJust $ remoteGitConfig remoteconfig  dropKey :: Remote -> Key -> Annex Bool dropKey r key@@ -563,9 +565,7 @@ 		(const $ copyFileExternal CopyTimeStamps src dest) 	watchfilesize oldsz = do 		threadDelay 500000 -- 0.5 seconds-		v <- catchMaybeIO $-			toBytesProcessed . fileSize-				<$> getFileStatus dest+		v <- catchMaybeIO $ toBytesProcessed <$> getFileSize dest 		case v of 			Just sz 				| sz /= oldsz -> do
Remote/Glacier.hs view
@@ -1,6 +1,6 @@ {- Amazon Glacier remotes.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/AWS.hs view
@@ -1,6 +1,6 @@ {- Amazon Web Services common infrastructure.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Chunked.hs view
@@ -1,6 +1,6 @@ {- git-annex chunked remotes  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -244,8 +244,7 @@ 	| otherwise = go =<< chunkKeys u chunkconfig basek   where 	go ls = do-		currsize <- liftIO $ catchMaybeIO $-			toInteger . fileSize <$> getFileStatus dest+		currsize <- liftIO $ catchMaybeIO $ getFileSize dest 		let ls' = maybe ls (setupResume ls) currsize 		if any null ls' 			then return True -- dest is already complete
Remote/Helper/Chunked/Legacy.hs view
@@ -1,6 +1,6 @@ {- legacy git-annex chunked remotes  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Encryptable.hs view
@@ -1,6 +1,6 @@ {- common functions for encryptable remotes  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Git.hs view
@@ -1,6 +1,6 @@ {- Utilities for git remotes.  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -10,7 +10,10 @@ import Common.Annex import qualified Git import Types.Availability+import qualified Types.Remote as Remote +import Data.Time.Clock.POSIX+ repoCheap :: Git.Repo -> Bool repoCheap = not . Git.repoIsUrl @@ -31,7 +34,15 @@ 	| Git.repoIsLocalUnknown r = fallback 	| otherwise = a -gitRepoInfo :: Git.Repo -> [(String, String)]-gitRepoInfo r =-	[ ("repository location", Git.repoLocation r)-	]+gitRepoInfo :: Remote -> Annex [(String, String)]+gitRepoInfo r = do+	d <- fromRepo Git.localGitDir+	mtimes <- liftIO $ mapM (modificationTime <$$> getFileStatus)+		=<< dirContentsRecursive (d </> "refs" </> "remotes" </> Remote.name r)+	let lastsynctime = case mtimes of+		[] -> "never"+		_ -> show $ posixSecondsToUTCTime $ realToFrac $ maximum mtimes+	return+		[ ("repository location", Git.repoLocation (Remote.repo r))+		, ("last synced", lastsynctime)+		]
Remote/Helper/Hooks.hs view
@@ -1,6 +1,6 @@ {- Adds hooks to remotes.  -- - Copyright 2012 Joey Hess <joey@kitenet.net>+ - Copyright 2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Http.hs view
@@ -1,6 +1,6 @@ {- helpers for remotes using http  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -32,7 +32,7 @@ -- the meter as it's sent. httpBodyStorer :: FilePath -> MeterUpdate -> IO RequestBody httpBodyStorer src m = do-	size <- fromIntegral . fileSize <$> getFileStatus src :: IO Integer+	size <- getFileSize src 	let streamer sink = withMeteredFile src m $ \b -> byteStringPopper b sink 	return $ RequestBodyStream (fromInteger size) streamer 
Remote/Helper/Messages.hs view
@@ -1,6 +1,6 @@ {- git-annex remote messages  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/ReadOnly.hs view
@@ -1,6 +1,6 @@ {- Adds readonly support to remotes.  -- - Copyright 2013 Joey Hess <joey@kitenet.net>+ - Copyright 2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Special.hs view
@@ -1,6 +1,6 @@ {- helpers for special remotes  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Helper/Ssh.hs view
@@ -1,6 +1,6 @@ {- git-annex remote access with ssh and git-annex-shell  -- - Copyright 2011-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Hook.hs view
@@ -1,14 +1,12 @@ {- A remote that provides hooks to run shell commands.  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}  module Remote.Hook (remote) where -import qualified Data.Map as M- import Common.Annex import Types.Remote import Types.Key@@ -20,6 +18,8 @@ import Remote.Helper.Special import Utility.Env +import qualified Data.Map as M+ type Action = String type HookName = String @@ -90,7 +90,7 @@ 		] 	fileenv Nothing = [] 	fileenv (Just file) =  [envvar "FILE" file]-	hashbits = map takeDirectory $ splitPath $ hashDirMixed k+	hashbits = map takeDirectory $ splitPath $ hashDirMixed def k  lookupHook :: HookName -> Action -> Annex (Maybe String) lookupHook hookname action = do
Remote/List.hs view
@@ -2,7 +2,7 @@  {- git-annex remote list  -- - Copyright 2011,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Rsync.hs view
@@ -1,6 +1,6 @@ {- A remote that is only accessible by rsync.  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -37,6 +37,7 @@ import Logs.Transfer import Types.Creds import Types.Key (isChunkKey)+import Annex.DirHashes  import qualified Data.Map as M @@ -212,8 +213,8 @@ 	 - content could be. Note that the parent directories have 	 - to also be explicitly included, due to how rsync 	 - traverses directories. -}-	includes = concatMap use annexHashes-	use h = let dir = h k in+	includes = concatMap use dirHashes+	use h = let dir = h def k in 		[ parentDir dir 		, dir 		-- match content directory and anything in it
Remote/Rsync/RsyncUrl.hs view
@@ -1,6 +1,6 @@ {- Rsync urls.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -14,10 +14,12 @@ import Utility.Rsync import Utility.SafeCommand +import Data.Default import System.FilePath.Posix #ifdef mingw32_HOST_OS import Data.String.Utils #endif+import Annex.DirHashes  type RsyncUrl = String @@ -35,12 +37,12 @@ 	| otherwise = u  rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl]-rsyncUrls o k = map use annexHashes+rsyncUrls o k = map use dirHashes   where 	use h = rsyncUrl o </> hash h </> rsyncEscape o (f </> f) 	f = keyFile k #ifndef mingw32_HOST_OS-	hash h = h k+	hash h = h def k #else-	hash h = replace "\\" "/" (h k)+	hash h = replace "\\" "/" (h def k) #endif
Remote/S3.hs view
@@ -1,6 +1,6 @@ {- S3 remotes  -- - Copyright 2011-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -159,7 +159,7 @@ store r h = fileStorer $ \k f p -> do 	case partSize (hinfo h) of 		Just partsz | partsz > 0 -> do-			fsz <- fromIntegral . fileSize <$> liftIO (getFileStatus f)+			fsz <- liftIO $ getFileSize f 			if fsz > partsz 				then multipartupload fsz partsz k f p 				else singlepartupload k f p
Remote/Tahoe.hs view
@@ -13,7 +13,7 @@  -  - Tahoe has its own encryption, so git-annex's encryption is not used.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/Web.hs view
@@ -1,6 +1,6 @@ {- Web remote.  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/WebDAV.hs view
@@ -1,6 +1,6 @@ {- WebDAV remotes.  -- - Copyright 2012-2014 Joey Hess <joey@kitenet.net>+ - Copyright 2012-2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Remote/WebDAV/DavLocation.hs view
@@ -1,6 +1,6 @@ {- WebDAV locations.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -17,6 +17,7 @@ import System.FilePath.Posix -- for manipulating url paths import Network.Protocol.HTTP.DAV (inDAVLocation, DAVT) import Control.Monad.IO.Class (MonadIO)+import Data.Default #ifdef mingw32_HOST_OS import Data.String.Utils #endif@@ -33,9 +34,9 @@ keyDir k = addTrailingPathSeparator $ hashdir </> keyFile k   where #ifndef mingw32_HOST_OS-	hashdir = hashDirLower k+	hashdir = hashDirLower def k #else-	hashdir = replace "\\" "/" (hashDirLower k)+	hashdir = replace "\\" "/" (hashDirLower def k) #endif  keyLocation :: Key -> DavLocation
RemoteDaemon/Common.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon utilities  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
RemoteDaemon/Core.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon core  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -20,24 +20,25 @@ import Config import Annex.Ssh -import Control.Concurrent.Async import Control.Concurrent+import Control.Concurrent.Async+import Control.Concurrent.STM import Network.URI import qualified Data.Map as M  runForeground :: IO () runForeground = do 	(readh, writeh) <- ioHandles-	ichan <- newChan :: IO (Chan Consumed)-	ochan <- newChan :: IO (Chan Emitted)+	ichan <- newTChanIO :: IO (TChan Consumed)+	ochan <- newTChanIO :: IO (TChan Emitted)  	let reader = forever $ do 		l <- hGetLine readh 		case parseMessage l of 			Nothing -> error $ "protocol error: " ++ l-			Just cmd -> writeChan ichan cmd+			Just cmd -> atomically $ writeTChan ichan cmd 	let writer = forever $ do-		msg <- readChan ochan+		msg <- atomically $ readTChan ochan 		hPutStrLn writeh $ unwords $ formatMessage msg 		hFlush writeh 	let controller = runController ichan ochan@@ -46,11 +47,11 @@ 	void $ tryIO $ 		reader `concurrently` writer `concurrently` controller -type RemoteMap = M.Map Git.Repo (IO (), Chan Consumed)+type RemoteMap = M.Map Git.Repo (IO (), TChan Consumed)  -- Runs the transports, dispatching messages to them, and handling -- the main control messages.-runController :: Chan Consumed -> Chan Emitted -> IO ()+runController :: TChan Consumed -> TChan Emitted -> IO () runController ichan ochan = do 	h <- genTransportHandle 	m <- genRemoteMap h ochan@@ -58,7 +59,7 @@ 	go h False m   where 	go h paused m = do-		cmd <- readChan ichan+		cmd <- atomically $ readTChan ichan 		case cmd of 			RELOAD -> do 				h' <- updateTransportHandle h@@ -88,22 +89,28 @@ 			-- All remaining messages are sent to 			-- all Transports. 			msg -> do-				unless paused $-					forM_ chans (`writeChan` msg)+				unless paused $ atomically $+					forM_ chans (`writeTChan` msg) 				go h paused m 	  where 		chans = map snd (M.elems m)  	startrunning m = forM_ (M.elems m) startrunning'-	startrunning' (transport, _) = void $ async transport+	startrunning' (transport, c) = do+		-- drain any old control messages from the channel+		-- to avoid confusing the transport with them+		atomically $ drain c+		void $ async transport 	-	broadcast msg m = forM_ (M.elems m) send+	drain c = maybe noop (const $ drain c) =<< tryReadTChan c+	+	broadcast msg m = atomically $ forM_ (M.elems m) send 	  where-		send (_, c) = writeChan c msg+		send (_, c) = writeTChan c msg  -- Generates a map with a transport for each supported remote in the git repo, -- except those that have annex.sync = false-genRemoteMap :: TransportHandle -> Chan Emitted -> IO RemoteMap+genRemoteMap :: TransportHandle -> TChan Emitted -> IO RemoteMap genRemoteMap h@(TransportHandle g _) ochan =  	M.fromList . catMaybes <$> mapM gen (Git.remotes g)   where@@ -111,7 +118,7 @@ 		Git.Url u -> case M.lookup (uriScheme u) remoteTransports of 			Just transport 				| remoteAnnexSync (extractRemoteGitConfig r (Git.repoDescribe r)) -> do-					ichan <- newChan :: IO (Chan Consumed)+					ichan <- newTChanIO :: IO (TChan Consumed) 					return $ Just 						( r 						, (transport r (RemoteURI u) h ichan ochan, ichan)
RemoteDaemon/Transport.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon transports  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
RemoteDaemon/Transport/Ssh.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon, git-annex-shell over ssh transport  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -18,7 +18,7 @@ import Git.Command import Utility.ThreadScheduler -import Control.Concurrent.Chan+import Control.Concurrent.STM import Control.Concurrent.Async  transport :: Transport@@ -58,7 +58,7 @@  		return $ either (either id id) id status -	send msg = writeChan ochan msg+	send msg = atomically $ writeTChan ochan msg  	fetch = do 		send (SYNCING url)@@ -80,7 +80,7 @@ 			Nothing -> return Stopping 	 	handlecontrol = do-		msg <- readChan ichan+		msg <- atomically $ readTChan ichan 		case msg of 			STOP -> return Stopping 			LOSTNET -> return Stopping
RemoteDaemon/Transport/Ssh/Types.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon, git-annex-shell notifychanges protocol types  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
RemoteDaemon/Types.hs view
@@ -1,6 +1,6 @@ {- git-remote-daemon data types.  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -17,6 +17,7 @@  import Network.URI import Control.Concurrent+import Control.Concurrent.STM  -- The URI of a remote is used to uniquely identify it (names change..) newtype RemoteURI = RemoteURI URI@@ -24,7 +25,7 @@  -- A Transport for a particular git remote consumes some messages -- from a Chan, and emits others to another Chan.-type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> Chan Consumed -> Chan Emitted -> IO ()+type Transport = RemoteRepo -> RemoteURI -> TransportHandle -> TChan Consumed -> TChan Emitted -> IO ()  type RemoteRepo = Git.Repo type LocalRepo = Git.Repo
Test.hs view
@@ -1,6 +1,6 @@ {- git-annex test suite  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2013 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -38,7 +38,6 @@ import qualified Types.Backend import qualified Types.TrustLevel import qualified Types-import qualified Logs import qualified Logs.MapLog import qualified Logs.Trust import qualified Logs.Remote@@ -138,7 +137,6 @@ 	, testProperty "prop_idempotent_key_decode" Types.Key.prop_idempotent_key_decode 	, testProperty "prop_idempotent_shellEscape" Utility.SafeCommand.prop_idempotent_shellEscape 	, testProperty "prop_idempotent_shellEscape_multiword" Utility.SafeCommand.prop_idempotent_shellEscape_multiword-	, testProperty "prop_logs_sane" Logs.prop_logs_sane 	, testProperty "prop_idempotent_configEscape" Logs.Remote.prop_idempotent_configEscape 	, testProperty "prop_parse_show_Config" Logs.Remote.prop_parse_show_Config 	, testProperty "prop_upFrom_basics" Utility.Path.prop_upFrom_basics
Types.hs view
@@ -1,6 +1,6 @@ {- git-annex abstract data types  -- - Copyright 2010 Joey Hess <joey@kitenet.net>+ - Copyright 2010 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/Availability.hs view
@@ -1,6 +1,6 @@ {- git-annex remote availability  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/Backend.hs view
@@ -2,7 +2,7 @@  -  - Most things should not need this, using Types instead  -- - Copyright 2010,2012 Joey Hess <joey@kitenet.net>+ - Copyright 2010,2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/BranchState.hs view
@@ -1,6 +1,6 @@ {- git-annex BranchState data type  -- - Copyright 2011 Joey Hess <joey@kitenet.net>+ - Copyright 2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/CleanupActions.hs view
@@ -1,6 +1,6 @@ {- Enumeration of cleanup actions  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/Command.hs view
@@ -1,6 +1,6 @@ {- git-annex command data types  -- - Copyright 2010-2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2011 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/Creds.hs view
@@ -1,6 +1,6 @@ {- credentials  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/Crypto.hs view
@@ -1,6 +1,6 @@ {- git-annex crypto types  -- - Copyright 2011-2012 Joey Hess <joey@kitenet.net>+ - Copyright 2011-2012 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
Types/DesktopNotify.hs view
@@ -1,6 +1,6 @@ {- git-annex DesktopNotify type  -- - Copyright 2014 Joey Hess <joey@kitenet.net>+ - Copyright 2014 Joey Hess <id@joeyh.name>  -  - Licensed under the GNU GPL version 3 or higher.  -}
+ Types/Difference.hs view

file too large to diff

Types/Distribution.hs view

file too large to diff

Types/FileMatcher.hs view

file too large to diff

Types/GitConfig.hs view

file too large to diff

Types/Group.hs view

file too large to diff

Types/Key.hs view

file too large to diff

Types/KeySource.hs view

file too large to diff

Types/LockPool.hs view

file too large to diff

Types/Messages.hs view

file too large to diff

Types/MetaData.hs view

file too large to diff

Types/NumCopies.hs view

file too large to diff

Types/Option.hs view

file too large to diff

Types/Remote.hs view

file too large to diff

Types/ScheduledActivity.hs view

file too large to diff

Types/StandardGroups.hs view

file too large to diff

Types/StoreRetrieve.hs view

file too large to diff

Types/TrustLevel.hs view

file too large to diff

Types/UUID.hs view

file too large to diff

Types/UrlContents.hs view

file too large to diff

Types/View.hs view

file too large to diff

Upgrade.hs view

file too large to diff

Upgrade/V0.hs view

file too large to diff

Upgrade/V1.hs view

file too large to diff

Upgrade/V2.hs view

file too large to diff

Upgrade/V3.hs view

file too large to diff

Upgrade/V4.hs view

file too large to diff

Utility/Applicative.hs view

file too large to diff

Utility/Base64.hs view

file too large to diff

Utility/Batch.hs view

file too large to diff

Utility/Bloom.hs view

file too large to diff

Utility/CoProcess.hs view

file too large to diff

Utility/CopyFile.hs view

file too large to diff

Utility/DBus.hs view

file too large to diff

Utility/Daemon.hs view

file too large to diff

Utility/Data.hs view

file too large to diff

Utility/DataUnits.hs view

file too large to diff

Utility/DirWatcher.hs view

file too large to diff

Utility/DirWatcher/FSEvents.hs view

file too large to diff

Utility/DirWatcher/INotify.hs view

file too large to diff

Utility/DirWatcher/Kqueue.hs view

file too large to diff

Utility/DirWatcher/Types.hs view

file too large to diff

Utility/DirWatcher/Win32Notify.hs view

file too large to diff

Utility/Directory.hs view

file too large to diff

Utility/DiskFree.hs view

file too large to diff

Utility/Dot.hs view

file too large to diff

Utility/DottedVersion.hs view

file too large to diff

Utility/Env.hs view

file too large to diff

Utility/Exception.hs view

file too large to diff

Utility/ExternalSHA.hs view

file too large to diff

Utility/FileMode.hs view

file too large to diff

+ Utility/FileSize.hs view

file too large to diff

Utility/FileSystemEncoding.hs view

file too large to diff

Utility/Format.hs view

file too large to diff

Utility/FreeDesktop.hs view

file too large to diff

Utility/Glob.hs view

file too large to diff

Utility/Gpg.hs view

file too large to diff

Utility/Hash.hs view

file too large to diff

Utility/HumanNumber.hs view

file too large to diff

Utility/HumanTime.hs view

file too large to diff

Utility/InodeCache.hs view

file too large to diff

Utility/JSONStream.hs view

file too large to diff

Utility/LinuxMkLibs.hs view

file too large to diff

Utility/LockFile.hs view

file too large to diff

Utility/LockFile/Posix.hs view

file too large to diff

Utility/LockFile/Windows.hs view

file too large to diff

Utility/LogFile.hs view

file too large to diff

Utility/Lsof.hs view

file too large to diff

Utility/Matcher.hs view

file too large to diff

Utility/Metered.hs view

file too large to diff

Utility/Misc.hs view

file too large to diff

Utility/Monad.hs view

file too large to diff

Utility/Mounts.hsc view

file too large to diff

Utility/Network.hs view

file too large to diff

Utility/NotificationBroadcaster.hs view

file too large to diff

Utility/OSX.hs view

file too large to diff

Utility/PID.hs view

file too large to diff

Utility/Parallel.hs view

file too large to diff

Utility/Path.hs view

file too large to diff

Utility/Percentage.hs view

file too large to diff

Utility/PosixFiles.hs view

file too large to diff

Utility/QuickCheck.hs view

file too large to diff

Utility/Quvi.hs view

file too large to diff

Utility/Rsync.hs view

file too large to diff

Utility/SRV.hs view

file too large to diff

Utility/SafeCommand.hs view

file too large to diff

Utility/Scheduled.hs view

file too large to diff

Utility/Shell.hs view

file too large to diff

Utility/SimpleProtocol.hs view

file too large to diff

Utility/SshConfig.hs view

file too large to diff

Utility/TList.hs view

file too large to diff

Utility/Tense.hs view

file too large to diff

Utility/ThreadLock.hs view

file too large to diff

Utility/ThreadScheduler.hs view

file too large to diff

Utility/Tmp.hs view

file too large to diff

Utility/Touch.hsc view

file too large to diff

Utility/URI.hs view

file too large to diff

Utility/Url.hs view

file too large to diff

Utility/UserInfo.hs view

file too large to diff

Utility/Verifiable.hs view

file too large to diff

Utility/WebApp.hs view

file too large to diff

Utility/WinProcess.hs view

file too large to diff

Utility/Yesod.hs view

file too large to diff

Utility/libdiskfree.c view

file too large to diff

Utility/libkqueue.c view

file too large to diff

Utility/libmounts.c view

file too large to diff

debian/changelog view

file too large to diff

debian/control view

file too large to diff

debian/copyright view

file too large to diff

doc/backends.mdwn view

file too large to diff

+ doc/backends/comment_11_f0f6316bbdc971a9ab157de9bbb9f74c._comment view

file too large to diff

+ doc/backends/comment_12_da76dff5fe712318d7d4313f1d827883._comment view

file too large to diff

+ doc/bugs/Build_fails_when_no_wget_avalible.mdwn view

file too large to diff

doc/bugs/Direct_mode_sync_fails_to_transfer_a_10GB_file.mdwn view

file too large to diff

+ doc/bugs/Forcing_https_for_Google_cloud_storage_remote__63__.mdwn view

file too large to diff

+ doc/bugs/How_to_use_a_DRA_bucket_in_Google_cloud_storage__63__.mdwn view

file too large to diff

doc/bugs/No_such_file_with_certain_filenames_using_WORM_backend.mdwn view

file too large to diff

doc/bugs/Revert_to_old_file_version_in_direct_mode___40__VFAT__41__.mdwn view

file too large to diff

+ doc/bugs/S3_Access_fails_on_windows.mdwn view

file too large to diff

+ doc/bugs/git-annex_assistant_not_working_with_nested_git_repos.mdwn view

file too large to diff

+ doc/bugs/git-annex_died_of_signal_11_when_syncing_content.mdwn view

file too large to diff

doc/bugs/git_annex_import_fails_on_filenames_with_newlines_in_them.mdwn view

file too large to diff

+ doc/bugs/git_annex_unused_fails_when_a_filename_contains_newline.mdwn view

file too large to diff

+ doc/bugs/git_annex_wont_work_with_git-dir_and_work-tree.mdwn view

file too large to diff

+ doc/bugs/glacier_fails_to_copy.mdwn view

file too large to diff

+ doc/bugs/windows_isExecutable_fail.mdwn view

file too large to diff

doc/chunking.mdwn view

file too large to diff

doc/contact.mdwn view

file too large to diff

doc/design/assistant/polls/Android_default_directory.mdwn view

file too large to diff

doc/design/assistant/polls/prioritizing_special_remotes.mdwn view

file too large to diff

doc/design/git-remote-daemon.mdwn view

file too large to diff

+ doc/design/v6.mdwn view

file too large to diff

+ doc/design/v6/comment_1_b7b4819211910556838ec37bc2b6b37b._comment view

file too large to diff

+ doc/design/v6/comment_2_8f35254d2cd5d0c273d5392ddd857c2d._comment view

file too large to diff

+ doc/devblog/day_246__old_todos.mdwn view

file too large to diff

+ doc/devblog/day_247__hooks_and_large_files_on_windows.mdwn view

file too large to diff

+ doc/devblog/day_248__workload_tuning.mdwn view

file too large to diff

doc/encryption.mdwn view

file too large to diff

+ doc/forum/Add_annex_files_outside_git_root_directory.mdwn view

file too large to diff

+ doc/forum/Alternative_to_XMPP_on_Windows__63__.mdwn view

file too large to diff

+ doc/forum/Is_there_any_delta_handling_for_file_modifications__63__.mdwn view

file too large to diff

+ doc/forum/Ubuntu_PPA/comment_8_feecd478a4d44cb5ffc7020c646174ba._comment view

file too large to diff

+ doc/forum/adding_remote_bup_repo_using_ssh.mdwn view

file too large to diff

doc/forum/example_of_massively_disconnected_operation.mdwn view

file too large to diff

+ doc/forum/git_annex_assistant_repository_history__63__.mdwn view

file too large to diff

+ doc/forum/scalability_with_lots_of_files.mdwn view

file too large to diff

doc/git-annex-shell.mdwn view

file too large to diff

doc/git-annex.mdwn view

file too large to diff

doc/git-union-merge.mdwn view

file too large to diff

+ doc/install/Ubuntu/comment_13_7964374bb2332940677eea570bdb0b69._comment view

file too large to diff

+ doc/install/Ubuntu/comment_14_b511063001af2e2170bef657cf016ff2._comment view

file too large to diff

doc/internals.mdwn view

file too large to diff

+ doc/internals/hashing/comment_3_19b7d20ca392078f14f9f10992f288ec._comment view

file too large to diff

+ doc/internals/hashing/comment_4_7642d6ce5fd4d37d464b05d0b4f869c6._comment view

file too large to diff

− doc/news/version_5.20141125.mdwn

file too large to diff

− doc/news/version_5.20141203.mdwn

file too large to diff

+ doc/news/version_5.20150205.mdwn view

file too large to diff

− doc/news/version_5/comment_1_ae8c464ccb7b7b218efd9151c5bbd1a5._comment

file too large to diff

doc/preferred_content.mdwn view

file too large to diff

+ doc/scalability/comment_1_a6656ae397277719d67d0953a28fe1d8._comment view

file too large to diff

+ doc/scalability/comment_2_71c7c3aa97284602d0f64c11a98d1782._comment view

file too large to diff

doc/special_remotes/S3.mdwn view

file too large to diff

doc/special_remotes/rsync.mdwn view

file too large to diff

doc/special_remotes/webdav.mdwn view

file too large to diff

+ doc/sync/comment_17_44a4ae4685c4bf2b4e7c61897eb3ff80._comment view

file too large to diff

+ doc/sync/comment_18_838fb249cd5be83962770d5cc394389a._comment view

file too large to diff

doc/thanks.mdwn view

file too large to diff

doc/tips/using_Amazon_S3.mdwn view

file too large to diff

doc/tips/using_box.com_as_a_special_remote.mdwn view

file too large to diff

doc/todo/Chunks_support_in_all_special_remotes.mdwn view

file too large to diff

+ doc/todo/Configuring_metadata_view_filenames.mdwn view

file too large to diff

doc/todo/Recursive_addurl_simlar_to_wget_--recursive.mdwn view

file too large to diff

+ doc/todo/__91__FR__93___No_consistency_check_while_on_battery-only.mdwn view

file too large to diff

doc/todo/notifications.mdwn view

file too large to diff

+ doc/todo/openwrt_package/comment_4_132e67b34f9c616217e037e4ecac70a4._comment view

file too large to diff

doc/todo/resuming_encrypted_uploads.mdwn view

file too large to diff

doc/todo/view_git_annex_log_in_webapp.mdwn view

file too large to diff

+ doc/tuning.mdwn view

file too large to diff

+ doc/tuning/comment_1_f8af8e9b696d32d238ebd56a3b8058c4._comment view

file too large to diff

+ doc/tuning/comment_2_a0091dbb39b79dfe101d05f9a5db216f._comment view

file too large to diff

doc/use_case/Bob.mdwn view

file too large to diff

doc/users/joey.mdwn view

file too large to diff

doc/walkthrough.mdwn view

file too large to diff

doc/walkthrough/renaming_files.mdwn view

file too large to diff

+ doc/walkthrough/using_special_remotes.mdwn view

file too large to diff

doc/walkthrough/using_ssh_remotes.mdwn view

file too large to diff

git-annex-shell.1 view

file too large to diff

git-annex.1 view

file too large to diff

git-annex.cabal view

file too large to diff

git-annex.hs view

file too large to diff

git-union-merge.hs view

file too large to diff