packages feed

git-annex 5.20140129 → 5.20140210

raw patch · 123 files changed

+1729/−559 lines, 123 filesdep ~DAV

Dependency ranges changed: DAV

Files

Annex/Branch.hs view
@@ -18,6 +18,7 @@ 	forceUpdate, 	updateTo, 	get,+	getHistorical, 	change, 	commit, 	forceCommit,@@ -197,7 +198,13 @@ 	go Nothing = getRaw file  getRaw :: FilePath -> Annex String-getRaw file = withIndex $ L.unpack <$> catFile fullname file+getRaw = getRef fullname++getHistorical :: RefDate -> FilePath -> Annex String+getHistorical date = getRef (Git.Ref.dateRef fullname date)++getRef :: Ref -> FilePath -> Annex String+getRef ref file = withIndex $ L.unpack <$> catFile ref file  {- Applies a function to modifiy the content of a file.  -
Annex/Content.hs view
@@ -35,7 +35,6 @@ ) where  import System.IO.Unsafe (unsafeInterleaveIO)-import System.PosixCompat.Files  import Common.Annex import Logs.Location@@ -435,12 +434,8 @@ 		mapM_ (resetfile cache) fs 	resetfile cache f = whenM (sameInodeCache f cache) $ do 		l <- inRepo $ gitAnnexLink f key-		top <- fromRepo Git.repoPath-		cwd <- liftIO getCurrentDirectory-		let top' = fromMaybe top $ absNormPath cwd top-		let l' = relPathDirToFile top' (fromMaybe l $ absNormPath top' l) 		secureErase f-		replaceFile f $ makeAnnexLink l'+		replaceFile f $ makeAnnexLink l  {- Runs the secure erase command if set, otherwise does nothing.  - File may or may not be deleted at the end; caller is responsible for
Annex/Content/Direct.hs view
@@ -52,10 +52,12 @@ associatedFilesRelative :: Key -> Annex [FilePath]  associatedFilesRelative key = do 	mapping <- calcRepo $ gitAnnexMapping key-	liftIO $ catchDefaultIO [] $ do-		h <- openFile mapping ReadMode+	liftIO $ catchDefaultIO [] $ withFile mapping ReadMode $ \h -> do 		fileEncoding h-		lines <$> hGetContents h+		-- Read strictly to ensure the file is closed+		-- before changeAssociatedFiles tries to write to it.+		-- (Especially needed on Windows.)+		lines <$> hGetContentsStrict h  {- Changes the associated files information for a key, applying a  - transformation to the list. Returns new associatedFiles value. -}@@ -66,15 +68,10 @@ 	let files' = transform files 	when (files /= files') $ do 		modifyContent mapping $-			liftIO $ viaTmp write mapping $ unlines files'+			liftIO $ viaTmp writeFileAnyEncoding mapping $+				unlines files' 	top <- fromRepo Git.repoPath 	return $ map (top </>) files'-  where-	write file content = do-		h <- openFile file WriteMode-		fileEncoding h- 		hPutStr h content-		hClose h  {- Removes the list of associated files. -} removeAssociatedFiles :: Key -> Annex ()
Annex/Drop.hs view
@@ -48,10 +48,10 @@ 	fs <- ifM isDirect 		( do 			l <- associatedFilesRelative key-			if null l-				then return $ maybe [] (:[]) afile-				else return l-		, return $ maybe [] (:[]) afile+			return $ if null l+				then maybeToList afile+				else l+		, return $ maybeToList afile 		) 	n <- getcopies fs 	if fromhere && checkcopies n Nothing
Annex/Link.hs view
@@ -51,19 +51,15 @@ 				| otherwise -> return Nothing 			Nothing -> fallback -	probefilecontent f = do-		h <- openFile f ReadMode+	probefilecontent f = withFile f ReadMode $ \h -> do 		fileEncoding h 		-- The first 8k is more than enough to read; link 		-- files are small. 		s <- take 8192 <$> hGetContents h 		-- If we got the full 8k, the file is too large 		if length s == 8192-			then do-				hClose h-				return ""-			else do-				hClose h+			then return ""+			else  				-- If there are any NUL or newline 				-- characters, or whitespace, we 				-- certianly don't have a link to a
Assistant/Alert.hs view
@@ -253,7 +253,7 @@  upgradeFinishedAlert :: Maybe AlertButton -> GitAnnexVersion -> Alert upgradeFinishedAlert button version =-	baseUpgradeAlert (maybe [] (:[]) button) $ fromString $ +	baseUpgradeAlert (maybeToList button) $ fromString $  		"Finished upgrading git-annex to version " ++ version  upgradeFailedAlert :: String -> Alert@@ -317,7 +317,7 @@ 	, alertPriority = High 	, alertName = Just $ PairAlert who 	, alertCombiner = Just $ dataCombiner $ \_old new -> new-	, alertButtons = maybe [] (:[]) button+	, alertButtons = maybeToList button 	}  xmppNeededAlert :: AlertButton -> Alert
Assistant/DaemonStatus.hs view
@@ -55,7 +55,7 @@ 	let good r = Remote.uuid r `elem` alive 	let syncable = filter good rs 	let syncdata = filter (not . remoteAnnexIgnore . Remote.gitconfig) $-		filter (not . isXMPPRemote) syncable+		filter (not . Remote.isXMPPRemote) syncable  	return $ \dstatus -> dstatus 		{ syncRemotes = syncable@@ -256,12 +256,6 @@ alertDuring alert a = do 	i <- addAlert $ alert { alertClass = Activity } 	removeAlert  i `after` a--{- Remotes using the XMPP transport have urls like xmpp::user@host -}-isXMPPRemote :: Remote -> Bool-isXMPPRemote remote = Git.repoIsUrl r && "xmpp::" `isPrefixOf` Git.repoLocation r-  where-	r = Remote.repo remote  getXMPPClientID :: Remote -> ClientID getXMPPClientID r = T.pack $ drop (length "xmpp::") (Git.repoLocation (Remote.repo r))
Assistant/Sync.hs view
@@ -71,7 +71,7 @@ 		mapM_ signal $ filter (`notElem` failedrs) rs'   where 	gitremotes = filter (notspecialremote . Remote.repo) rs-	(xmppremotes, nonxmppremotes) = partition isXMPPRemote rs+	(xmppremotes, nonxmppremotes) = partition Remote.isXMPPRemote rs 	notspecialremote r 		| Git.repoIsUrl r = True 		| Git.repoIsLocal r = True@@ -133,7 +133,7 @@ 			<$> gitRepo 			<*> inRepo Git.Branch.current 			<*> getUUID-	let (xmppremotes, normalremotes) = partition isXMPPRemote remotes+	let (xmppremotes, normalremotes) = partition Remote.isXMPPRemote remotes 	ret <- go True branch g u normalremotes 	unless (null xmppremotes) $ do 		shas <- liftAnnex $ map fst <$>@@ -206,7 +206,7 @@ 		return failed   where 	visibleremotes = filter (not . Remote.readonly) $-		filter (not . isXMPPRemote) rs+		filter (not . Remote.isXMPPRemote) rs  {- Manually pull from remotes and merge their branches. Returns any  - remotes that it failed to pull from, and a Bool indicating@@ -220,7 +220,7 @@ manualPull :: Maybe Git.Ref -> [Remote] -> Assistant ([Remote], Bool) manualPull currentbranch remotes = do 	g <- liftAnnex gitRepo-	let (xmppremotes, normalremotes) = partition isXMPPRemote remotes+	let (xmppremotes, normalremotes) = partition Remote.isXMPPRemote remotes 	failed <- liftIO $ forM normalremotes $ \r -> 		ifM (Git.Command.runBool [Param "fetch", Param $ Remote.name r] g) 			( return Nothing
Assistant/Threads/SanityChecker.hs view
@@ -237,5 +237,5 @@ 			button <- mkAlertButton True (T.pack "Configure") urlrenderer ConfigUnusedR 			void $ addAlert $ unusedFilesAlert [button] $ T.unpack $ renderTense Present msg #else-		debug [msg]+		debug [show $ renderTense Past msg] #endif
Assistant/Threads/XMPPClient.hs view
@@ -322,7 +322,7 @@ 	| baseJID selfjid == baseJID theirjid = autoaccept 	| otherwise = do 		knownjids <- mapMaybe (parseJID . getXMPPClientID)-			. filter isXMPPRemote . syncRemotes <$> getDaemonStatus+			. filter Remote.isXMPPRemote . syncRemotes <$> getDaemonStatus 		um <- liftAnnex uuidMap 		if elem (baseJID theirjid) knownjids && M.member theiruuid um 			then autoaccept
Assistant/WebApp/Configurators/Delete.hs view
@@ -96,12 +96,11 @@ 				rs <- syncRemotes <$> getDaemonStatus 				mapM_ (\r -> changeSyncable (Just r) False) rs -			{- Make all directories writable, so all annexed-			 - content can be deleted. -}+			{- Make all directories writable and files writable+			 - so all annexed content can be deleted. -} 			liftIO $ do-				recurseDir SystemFS dir >>=-					filterM doesDirectoryExist >>=-						mapM_ allowWrite+				recurseDir SystemFS dir+					>>= mapM_ (void . tryIO . allowWrite) 				removeDirectoryRecursive dir 			 			redirect ShutdownConfirmedR
Assistant/WebApp/Configurators/XMPP.hs view
@@ -161,7 +161,7 @@ #ifdef WITH_XMPP  getXMPPRemotes :: Assistant [(JID, Remote)]-getXMPPRemotes = catMaybes . map pair . filter isXMPPRemote . syncGitRemotes+getXMPPRemotes = catMaybes . map pair . filter Remote.isXMPPRemote . syncGitRemotes 	<$> getDaemonStatus   where   	pair r = maybe Nothing (\jid -> Just (jid, r)) $
Assistant/WebApp/RepoList.hs view
@@ -164,7 +164,7 @@ 		| Remote.readonly r = False 		| onlyCloud reposelector = Git.repoIsUrl (Remote.repo r) 			&& Remote.uuid r /= NoUUID -			&& not (isXMPPRemote r)+			&& not (Remote.isXMPPRemote r) 		| otherwise = True 	selectedremote Nothing = False 	selectedremote (Just (iscloud, _))
Build/EvilLinker.hs view
@@ -125,8 +125,8 @@ 	putStrLn $ unwords [c, show ps] 	systemenviron <- getEnvironment 	let environ' = fromMaybe [] environ ++ systemenviron-	out@(s, ok) <- processTranscript' c ps (Just environ') Nothing-	putStrLn $ unwords [c, "finished", show ok, "output size:", show (length s)]+	out@(_, ok) <- processTranscript' c ps (Just environ') Nothing+	putStrLn $ unwords [c, "finished", show ok] 	return out  atFile :: FilePath -> String
Build/LinuxMkLibs.hs view
@@ -141,4 +141,4 @@  - XXX Debian specific. -} glibcLibs :: IO [FilePath] glibcLibs = lines <$> readProcess "sh"-	["-c", "dpkg -L libc6 libgcc1 | egrep '\\.so|gconv'"]+	["-c", "dpkg -L libc6:$(dpkg --print-architecture) libgcc1:$(dpkg --print-architecture) | egrep '\\.so|gconv'"]
CHANGELOG view
@@ -1,11 +1,47 @@-git-annex (5.20140128) UNRELEASED; urgency=medium+git-annex (5.20140210) unstable; urgency=medium -  * Windows: It's now safe to run multiple git-annex processes concurrently-    on Windows; the lock files have been sorted out.+  * --in can now refer to files that were located in a repository at+    some past date. For example, --in="here@{yesterday}"   * Fixed direct mode annexed content locking code, which is used to     guard against recursive file drops.+  * This is the first beta-level release of the Windows port with important+    fixes (see below).+    (The webapp and assistant are still alpha-level on Windows.)+  * sync --content: Honor annex-ignore configuration.+  * sync: Don't try to sync with xmpp remotes, which are only currently+    supported when using the assistant.+  * sync --content: Re-pull from remotes after downloading content,+    since that can take a while and other changes may be pushed in the+    meantime.+  * sync --content: Reuse smart copy code from copy command, including+    handling and repairing out of date location tracking info.+    Closes: #737480+  * sync --content: Drop files from remotes that don't want them after+    getting them.+  * sync: Fix bug in automatic merge conflict resolution code when used+    on a filesystem not supporting symlinks, which resulted in it losing+    track of the symlink bit of annexed files.+  * Added ways to configure rsync options to be used only when uploading+    or downloading from a remote. Useful to eg limit upload bandwidth.+  * Fix initremote with encryption=pubkey to work with S3, glacier, webdav,+    and external special remotes.+  * Avoid building with DAV 0.6 which is badly broken (see #737902).+  * Fix dropping of unused keys with spaces in their name.+  * Fix build on platforms not supporting the webapp.+  * Document in man page that sshcaching uses ssh ControlMaster.+    Closes: #737476+  * Windows: It's now safe to run multiple git-annex processes concurrently+    on Windows; the lock files have been sorted out.+  * Windows: Avoid using unix-compat's rename, which refuses to rename+    directories.+  * Windows: Fix deletion of repositories by test suite and webapp.+  * Windows: Test suite 100% passes again.+  * Windows: Fix bug in symlink calculation code.+  * Windows: Fix handling of absolute unix-style git repository paths.+  * Android: Avoid crashing when unable to set file mode for ssh config file+    due to Android filesystem horribleness. - -- Joey Hess <joeyh@debian.org>  Tue, 28 Jan 2014 13:57:19 -0400+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Feb 2014 12:54:57 -0400  git-annex (5.20140127) unstable; urgency=medium 
CmdLine/GitAnnexShell/Fields.hs view
@@ -9,6 +9,7 @@  import Common.Annex import qualified Annex+import Git.FilePath  import Data.Char @@ -29,7 +30,7 @@ associatedFile :: Field associatedFile = Field "associatedfile" $ \f -> 	-- is the file a safe relative filename?-	not (isAbsolute f) && not ("../" `isPrefixOf` f)+	not (absoluteGitPath f) && not ("../" `isPrefixOf` f)  direct :: Field direct = Field "direct" $ \f -> f == "1"
CmdLine/Seek.hs view
@@ -11,8 +11,6 @@  module CmdLine.Seek where -import System.PosixCompat.Files- import Common.Annex import Types.Command import Types.Key
Command/Add.hs view
@@ -9,8 +9,6 @@  module Command.Add where -import System.PosixCompat.Files- import Common.Annex import Annex.Exception import Command
Command/Fix.hs view
@@ -9,8 +9,6 @@  module Command.Fix where -import System.PosixCompat.Files- import Common.Annex import Command import qualified Annex.Queue
Command/FromKey.hs view
@@ -7,8 +7,6 @@  module Command.FromKey where -import System.PosixCompat.Files- import Common.Annex import Command import qualified Annex.Queue
Command/Fsck.hs view
@@ -9,8 +9,6 @@  module Command.Fsck where -import System.PosixCompat.Files- import Common.Annex import Command import qualified Annex@@ -480,10 +478,9 @@ 	createAnnexDirectory $ parentDir f 	liftIO $ do 		nukeFile f-		h <- openFile f WriteMode-		t <- modificationTime <$> getFileStatus f-		hPutStr h $ showTime $ realToFrac t-		hClose h+		withFile f WriteMode $ \h -> do+			t <- modificationTime <$> getFileStatus f+			hPutStr h $ showTime $ realToFrac t   where 	showTime :: POSIXTime -> String 	showTime = show
Command/FuzzTest.hs view
@@ -146,13 +146,6 @@ genFuzzDir :: IO FuzzDir genFuzzDir = mkFuzzDir <$> (getStdRandom (randomR (1,16)) :: IO Int) -localFile :: FilePath -> Bool-localFile f-	| isAbsolute f = False-	| ".." `isInfixOf` f = False-	| ".git" `isPrefixOf` f = False-	| otherwise = True- data TimeStampedFuzzAction  	= Started UTCTime FuzzAction 	| Finished UTCTime Bool
Command/Import.hs view
@@ -7,8 +7,6 @@  module Command.Import where -import System.PosixCompat.Files- import Common.Annex import Command import qualified Annex
Command/Indirect.hs view
@@ -7,7 +7,6 @@  module Command.Indirect where -import System.PosixCompat.Files import Control.Exception.Extensible  import Common.Annex
Command/Info.hs view
@@ -14,7 +14,6 @@ import Text.JSON import Data.Tuple import Data.Ord-import System.PosixCompat.Files  import Common.Annex import qualified Remote
Command/RecvKey.hs view
@@ -7,8 +7,6 @@  module Command.RecvKey where -import System.PosixCompat.Files- import Common.Annex import Command import CmdLine
Command/Sync.hs view
@@ -34,10 +34,10 @@ import Annex.Wanted import Annex.Content import Command.Get (getKeyFile')-import Logs.Transfer-import Logs.Presence+import qualified Command.Move import Logs.Location import Annex.Drop+import Annex.UUID  import qualified Data.Set as S import Data.Hash.MD5@@ -75,6 +75,7 @@  	remotes <- syncRemotes rs 	let gitremotes = filter Remote.gitSyncableRemote remotes+	let dataremotes = filter (not . remoteAnnexIgnore . Remote.gitconfig) remotes  	-- Syncing involves many actions, any of which can independently 	-- fail, without preventing the others from running.@@ -85,7 +86,16 @@ 		,  [ mergeAnnex ] 		] 	whenM (Annex.getFlag $ optionName contentOption) $-		seekSyncContent remotes+		whenM (seekSyncContent dataremotes) $ do+			-- Transferring content can take a while,+			-- and other changes can be pushed to the git-annex+			-- branch on the remotes in the meantime, so pull+			-- and merge again to avoid our push overwriting+			-- those changes.+			seekActions $ return $ concat+				[ map (withbranch . pullRemote) gitremotes+				, [ commitAnnex, mergeAnnex ]+				] 	seekActions $ return $ concat 		[ [ withbranch pushLocal ] 		, map (withbranch . pushRemote) gitremotes@@ -112,6 +122,7 @@ 		| otherwise = listed 	listed = catMaybes <$> mapM (Remote.byName . Just) rs 	available = filter (remoteAnnexSync . Types.Remote.gitconfig)+		. filter (not . Remote.isXMPPRemote) 		<$> Remote.remoteList 	good r 		| Remote.gitSyncableRemote r = Remote.Git.repoAvail $ Types.Remote.repo r@@ -147,7 +158,7 @@ 	go (Just branch) = do 		parent <- inRepo $ Git.Ref.sha branch 		void $ inRepo $ Git.Branch.commit False commitmessage branch-			(maybe [] (:[]) parent)+			(maybeToList parent) 		return True  mergeLocal :: Maybe Git.Ref -> CommandStart@@ -170,9 +181,6 @@ pushLocal :: Maybe Git.Ref -> CommandStart pushLocal Nothing = stop pushLocal (Just branch) = do-	-- In case syncing content made changes to the git-annex branch,-	-- commit it.-	Annex.Branch.commit "update" 	-- Update the sync branch to match the new state of the branch 	inRepo $ updateBranch $ syncBranch branch 	-- In direct mode, we're operating on some special direct mode@@ -286,6 +294,11 @@ 		, show $ Git.Ref.base $ syncBranch b 		] +commitAnnex :: CommandStart+commitAnnex = do+	Annex.Branch.commit "update"+	stop+ mergeAnnex :: CommandStart mergeAnnex = do 	void Annex.Branch.forceUpdate@@ -379,14 +392,10 @@ 			-- Our side is annexed, other side is not. 			(Just keyUs, Nothing) -> do 				ifM isDirect-					-- Move newly added non-annexed object-					-- out of direct mode merge directory. 					( do 						removeoldfile keyUs 						makelink keyUs-						d <- fromRepo gitAnnexMergeDir-						liftIO $ rename (d </> file) file-					-- cleaup tree after git merge+						movefromdirectmerge file 					, do 						unstageoldfile 						makelink keyUs@@ -420,6 +429,31 @@ 	getKey select = case select (LsFiles.unmergedSha u) of 		Nothing -> return Nothing 		Just sha -> catKey sha symLinkMode+	+	{- Move something out of the direct mode merge directory and into+	 - the git work tree.+	 -+	 - On a filesystem not supporting symlinks, this is complicated+	 - because a directory may contain annex links, but just+	 - moving them into the work tree will not let git know they are+	 - symlinks.+	 -+	 - Also, if the content of the file is available, make it available+	 - in direct mode.+	 -}+	movefromdirectmerge item = do+		d <- fromRepo gitAnnexMergeDir+		liftIO $ rename (d </> item) item+		mapM_ setuplink =<< liftIO (dirContentsRecursive item)+	setuplink f = do+		v <- getAnnexLinkTarget f+		case v of+			Nothing -> noop+			Just target -> do+				unlessM (coreSymlinks <$> Annex.getGitConfig) $+					addAnnexLink target f+				maybe noop (flip toDirect f) +					(fileKey (takeFileName target))  {- git-merge moves conflicting files away to files  - named something like f~HEAD or f~branch, but the@@ -496,23 +530,33 @@  -   - Drop it from each remote that has it, where it's not preferred content  - (honoring numcopies).+ -+ - If any file movements were generated, returns true.  -}-seekSyncContent :: [Remote] -> Annex ()-seekSyncContent rs = mapM_ go =<< seekHelper LsFiles.inRepo []+seekSyncContent :: [Remote] -> Annex Bool+seekSyncContent rs = do+	mvar <- liftIO $ newEmptyMVar+	mapM_ (go mvar) =<< seekHelper LsFiles.inRepo []+	liftIO $ not <$> isEmptyMVar mvar   where-	go f = ifAnnexed f (syncFile rs f) noop+	go mvar f = ifAnnexed f+		(\v -> void (liftIO (tryPutMVar mvar ())) >> syncFile rs f v)+		noop  syncFile :: [Remote] -> FilePath -> (Key, Backend) -> Annex () syncFile rs f (k, _) = do 	locs <- loggedLocations k 	let (have, lack) = partition (\r -> Remote.uuid r `elem` locs) rs -	sequence_ =<< handleget have+	got <- anyM id =<< handleget have 	putrs <- catMaybes . snd . unzip <$> (sequence =<< handleput lack) -	-- Using callCommand rather than commandAction for drops,+	u <- getUUID+	let locs' = concat [if got then [u] else [], putrs, locs]++	-- Using callCommandAction rather than commandAction for drops, 	-- because a failure to drop does not mean the sync failed.-	handleDropsFrom (putrs ++ locs) rs "unwanted" True k (Just f)+	handleDropsFrom locs' rs "unwanted" True k (Just f) 		Nothing callCommandAction   where   	wantget have = allM id @@ -538,11 +582,5 @@ 	put dest = do 		ok <- commandAction $ do 			showStart "copy" f-			showAction $ "to " ++ Remote.name dest-			next $ next $ do-				ok <- upload (Remote.uuid dest) k (Just f) noRetry $-					Remote.storeKey dest k (Just f)-				when ok $-					Remote.logStatus dest k InfoPresent-				return ok+			next $ Command.Move.toPerform dest False k (Just f) 		return (ok, if ok then Just (Remote.uuid dest) else Nothing)
Common.hs view
@@ -15,7 +15,6 @@ import System.FilePath as X import System.Directory as X import System.IO as X hiding (FilePath)-import System.PosixCompat.Files as X #ifndef mingw32_HOST_OS import System.Posix.IO as X #endif@@ -31,5 +30,6 @@ import Utility.Data as X import Utility.Applicative as X import Utility.FileSystemEncoding as X+import Utility.PosixFiles as X  import Utility.PartialPrelude as X
Creds.hs view
@@ -51,7 +51,7 @@ 		return c  	storeconfig key (Just cipher) = do-		s <- liftIO $ encrypt [] cipher+		s <- liftIO $ encrypt (getGpgEncParams c) cipher 			(feedBytes $ L.pack $ encodeCredPair creds) 			(readBytes $ return . L.unpack) 		return $ M.insert key (toB64 s) c
Crypto.hs view
@@ -196,15 +196,21 @@ class LensGpgEncParams a where getGpgEncParams :: a -> [CommandParam]  {- Extract the GnuPG options from a pair of a Remote Config and a Remote- - Git Config. If the remote is configured to use public-key encryption,- - look up the recipient keys and add them to the option list. -}+ - Git Config. -} instance LensGpgEncParams (RemoteConfig, RemoteGitConfig) where-	getGpgEncParams (c,gc) = map Param (remoteAnnexGnupgOptions gc) ++ recipients+	getGpgEncParams (c,gc) = map Param (remoteAnnexGnupgOptions gc) ++ getGpgEncParams c 	  where-		recipients = case M.lookup "encryption" c of-			Just "pubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $-						M.lookup "cipherkeys" c-			_ -> []++{- Extract the GnuPG options from a Remote Config, ignoring any+ - git config settings. (Which is ok if the remote is just being set up + - and so doesn't have any.)+ -+ - If the remote is configured to use public-key encryption,+ - look up the recipient keys and add them to the option list.-}+instance LensGpgEncParams RemoteConfig where+	getGpgEncParams c = case M.lookup "encryption" c of+		Just "pubkey" -> Gpg.pkEncTo $ maybe [] (split ",") $ M.lookup "cipherkeys" c+		_ -> []  {- Extract the GnuPG options from a Remote. -} instance LensGpgEncParams (RemoteA a) where
Git/Command.hs view
@@ -32,7 +32,7 @@ #ifdef mingw32_HOST_OS 	-- despite running on windows, msysgit wants a unix-formatted path 	gitpath s-		| isAbsolute s = "/" ++ dropDrive (toInternalGitPath s)+		| absoluteGitPath s = "/" ++ dropDrive (toInternalGitPath s) 		| otherwise = s #else 	gitpath = id
Git/Construct.hs view
@@ -33,6 +33,7 @@ import Git.Types import Git import Git.Remote+import Git.FilePath import qualified Git.Url as Url import Utility.UserInfo @@ -57,7 +58,7 @@  - specified. -} fromAbsPath :: FilePath -> IO Repo fromAbsPath dir-	| isAbsolute dir = ifM (doesDirectoryExist dir') ( ret dir' , hunt )+	| absoluteGitPath dir = ifM (doesDirectoryExist dir') ( ret dir' , hunt ) 	| otherwise = 		error $ "internal error, " ++ dir ++ " is not absolute"   where
Git/FilePath.hs view
@@ -20,12 +20,15 @@ 	asTopFilePath, 	InternalGitPath, 	toInternalGitPath,-	fromInternalGitPath+	fromInternalGitPath,+	absoluteGitPath ) where  import Common import Git +import qualified System.FilePath.Posix+ {- A FilePath, relative to the top of the git repository. -} newtype TopFilePath = TopFilePath { getTopFilePath :: FilePath } 	deriving (Show)@@ -48,8 +51,7 @@  - it internally.   -  - On Windows, git uses '/' to separate paths stored in the repository,- - despite Windows using '\'. Also, git on windows dislikes paths starting- - with "./" or ".\".+ - despite Windows using '\'.  -  -} type InternalGitPath = String@@ -58,11 +60,7 @@ #ifndef mingw32_HOST_OS toInternalGitPath = id #else-toInternalGitPath p =-	let p' = replace "\\" "/" p-	in if "./" `isPrefixOf` p'-		then dropWhile (== '/') (drop 1 p')-		else p'+toInternalGitPath = replace "\\" "/" #endif  fromInternalGitPath :: InternalGitPath -> FilePath@@ -71,3 +69,10 @@ #else fromInternalGitPath = replace "/" "\\" #endif++{- isAbsolute on Windows does not think "/foo" or "\foo" is absolute,+ - so try posix paths.+ -}+absoluteGitPath :: FilePath -> Bool+absoluteGitPath p = isAbsolute p ||+	System.FilePath.Posix.isAbsolute (toInternalGitPath p)
Git/Ref.hs view
@@ -11,6 +11,7 @@ import Git import Git.Command import Git.Sha+import Git.Types  import Data.Char (chr) @@ -50,6 +51,10 @@  -} fileRef :: FilePath -> Ref fileRef f = Ref $ ":./" ++ f++{- Converts a Ref to refer to the content of the Ref on a given date. -}+dateRef :: Ref -> RefDate -> Ref+dateRef (Ref r) (RefDate d) = Ref $ r ++ "@" ++ d  {- A Ref that can be used to refer to a file in the repository as it  - appears in a given Ref. -}
Git/Types.hs view
@@ -57,6 +57,10 @@ type Sha = Ref type Tag = Ref +{- A date in the format described in gitrevisions. Includes the+ - braces, eg, "{yesterday}" -}+newtype RefDate = RefDate String+ {- Types of objects that can be stored in git. -} data ObjectType = BlobObject | CommitObject | TreeObject 	deriving (Eq)
Limit.hs view
@@ -13,7 +13,6 @@ import qualified Data.Set as S import qualified Data.Map as M import System.Path.WildMatch-import System.PosixCompat.Files  import Common.Annex import qualified Annex@@ -31,6 +30,8 @@ import Types.Limit import Logs.Group import Logs.Unused+import Logs.Location+import Git.Types (RefDate(..)) import Utility.HumanTime import Utility.DataUnits @@ -113,20 +114,26 @@ matchglob _ (MatchingKey _) = False  {- Adds a limit to skip files not believed to be present- - in a specfied repository. -}+ - in a specfied repository. Optionally on a prior date. -} addIn :: String -> Annex () addIn = addLimit . limitIn  limitIn :: MkLimit-limitIn name = Right $ \notpresent -> checkKey $+limitIn s = Right $ \notpresent -> checkKey $ \key -> 	if name == "."-		then inhere notpresent-		else inremote notpresent+		then if null date+			then inhere notpresent key+			else inuuid notpresent key =<< getUUID+		else inuuid notpresent key =<< Remote.nameToUUID name   where-	inremote notpresent key = do-		u <- Remote.nameToUUID name-		us <- Remote.keyLocations key-		return $ u `elem` us && u `S.notMember` notpresent+	(name, date) = separate (== '@') s+	inuuid notpresent key u+		| null date = do+			us <- Remote.keyLocations key+			return $ u `elem` us && u `S.notMember` notpresent+		| otherwise = do+			us <- loggedLocationsHistorical (RefDate date) key+			return $ u `elem` us 	inhere notpresent key 		| S.null notpresent = inAnnex key 		| otherwise = do
Locations.hs view
@@ -137,7 +137,7 @@ gitAnnexLink :: FilePath -> Key -> Git.Repo -> IO FilePath gitAnnexLink file key r = do 	cwd <- getCurrentDirectory-	let absfile = fromMaybe whoops $ absNormPath cwd file+	let absfile = fromMaybe whoops $ absNormPathUnix cwd file 	loc <- gitAnnexLocation' key r False 	return $ relPathDirToFile (parentDir absfile) loc   where
Logs/Location.hs view
@@ -8,7 +8,7 @@  - Repositories record their UUID and the date when they --get or --drop  - a value.  - - - Copyright 2010-2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <joey@kitenet.net>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -18,6 +18,7 @@ 	logStatus, 	logChange, 	loggedLocations,+	loggedLocationsHistorical, 	loggedKeys, 	loggedKeysFor, ) where@@ -27,6 +28,7 @@ import Logs import Logs.Presence import Annex.UUID+import Git.Types (RefDate)  {- Log a change in the presence of a key's value in current repository. -} logStatus :: Key -> LogStatus -> Annex ()@@ -40,10 +42,16 @@ logChange _ NoUUID _ = noop  {- Returns a list of repository UUIDs that, according to the log, have- - the value of a key.- -}+ - the value of a key. -} loggedLocations :: Key -> Annex [UUID]-loggedLocations key = map toUUID <$> (currentLog . locationLogFile) key+loggedLocations = getLoggedLocations currentLog++{- Gets the location log on a particular date. -}+loggedLocationsHistorical :: RefDate -> Key -> Annex [UUID]+loggedLocationsHistorical = getLoggedLocations . historicalLog++getLoggedLocations :: (FilePath -> Annex [String]) -> Key -> Annex [UUID]+getLoggedLocations getter key = map toUUID <$> (getter . locationLogFile) key  {- Finds all keys that have location log information.  - (There may be duplicate keys in the list.) -}
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-2011 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <joey@kitenet.net>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -16,7 +16,8 @@ 	addLog, 	readLog, 	logNow,-	currentLog+	currentLog,+	historicalLog ) where  import Data.Time.Clock.POSIX@@ -24,6 +25,7 @@ import Logs.Presence.Pure as X import Common.Annex import qualified Annex.Branch+import Git.Types (RefDate)  addLog :: FilePath -> LogLine -> Annex () addLog file line = Annex.Branch.change file $ \s -> @@ -43,3 +45,12 @@ {- Reads a log and returns only the info that is still in effect. -} currentLog :: FilePath -> Annex [String] currentLog file = map info . filterPresent <$> readLog file++{- Reads a historical version of a log and returns the info that was in+ - effect at that time. + -+ - The date is formatted as shown in gitrevisions man page.+ -}+historicalLog :: RefDate -> FilePath -> Annex [String]+historicalLog refdate file = map info . filterPresent . parseLog+	<$> Annex.Branch.getHistorical refdate file
Logs/Transfer.hs view
@@ -340,11 +340,8 @@ 	bits = splitDirectories file  writeTransferInfoFile :: TransferInfo -> FilePath -> IO ()-writeTransferInfoFile info tfile = do-	h <- openFile tfile WriteMode-	fileEncoding h-	hPutStr h $ writeTransferInfo info-	hClose h+writeTransferInfoFile info tfile = writeFileAnyEncoding tfile $+	writeTransferInfo info  {- File format is a header line containing the startedTime and any  - bytesComplete value. Followed by a newline and the associatedFile.@@ -365,10 +362,8 @@ 	]  readTransferInfoFile :: Maybe PID -> FilePath -> IO (Maybe TransferInfo)-readTransferInfoFile mpid tfile = catchDefaultIO Nothing $ do-	h <- openFile tfile ReadMode-	fileEncoding h-	hClose h `after` (readTransferInfo mpid <$> hGetContentsStrict h)+readTransferInfoFile mpid tfile = catchDefaultIO Nothing $+	readTransferInfo mpid <$> readFileStrictAnyEncoding tfile  readTransferInfo :: Maybe PID -> String -> Maybe TransferInfo readTransferInfo mpid s = TransferInfo
Logs/Unused.hs view
@@ -86,7 +86,9 @@ 		_ -> Nothing 	  where 		(sint, rest) = separate (== ' ') line-		(skey, ts) = separate (== ' ') rest+		(rts, rskey) = separate (== ' ') (reverse rest)+		skey = reverse rskey+		ts = reverse rts  readUnusedMap :: FilePath -> Annex UnusedMap readUnusedMap = log2map <$$> readUnusedLog
Makefile view
@@ -76,7 +76,8 @@ 		--disable-plugin=smiley \ 		--plugin=comments --set comments_pagespec="*" \ 		--exclude='news/.*' --exclude='design/assistant/blog/*' \-		--exclude='bugs/*' --exclude='todo/*' --exclude='forum/*'+		--exclude='bugs/*' --exclude='todo/*' --exclude='forum/*' \+		--exclude='users/*' --exclude='devblog/*'  clean: 	rm -rf tmp dist git-annex $(mans) configure  *.tix .hpc \
Remote.hs view
@@ -41,7 +41,8 @@ 	showLocations, 	forceTrust, 	logStatus,-	checkAvailable+	checkAvailable,+	isXMPPRemote ) where  import qualified Data.Map as M@@ -60,6 +61,7 @@ import Remote.List import Config import Git.Types (RemoteName)+import qualified Git  {- Map from UUIDs of Remotes to a calculated value. -} remoteMap :: (Remote -> a) -> Annex (M.Map UUID a)@@ -292,3 +294,9 @@ checkAvailable :: Bool -> Remote -> IO Bool checkAvailable assumenetworkavailable =  	maybe (return assumenetworkavailable) doesDirectoryExist . localpath++{- Remotes using the XMPP transport have urls like xmpp::user@host -}+isXMPPRemote :: Remote -> Bool+isXMPPRemote remote = Git.repoIsUrl r && "xmpp::" `isPrefixOf` Git.repoLocation r+  where+	r = repo remote
Remote/Bup.hs view
@@ -145,9 +145,8 @@ retrieve :: BupRepo -> Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex Bool retrieve buprepo k _f d _p = do 	let params = bupParams "join" buprepo [Param $ bupRef k]-	liftIO $ catchBoolIO $ do-		tofile <- openFile d WriteMode-		pipeBup params Nothing (Just tofile)+	liftIO $ catchBoolIO $ withFile d WriteMode $+		pipeBup params Nothing . Just  retrieveCheap :: BupRepo -> Key -> FilePath -> Annex Bool retrieveCheap _ _ _ = return False
Remote/Git.hs view
@@ -310,7 +310,7 @@ copyFromRemote' :: Remote -> Key -> AssociatedFile -> FilePath -> Annex Bool copyFromRemote' r key file dest 	| not $ Git.repoIsUrl (repo r) = guardUsable (repo r) False $ do-		let params = Ssh.rsyncParams r+		let params = Ssh.rsyncParams r Download 		u <- getUUID 		-- run copy from perspective of remote 		liftIO $ onLocal (repo r) $ do@@ -409,7 +409,7 @@ 		-- the remote's Annex, but it needs access to the current 		-- Annex monad's state. 		checksuccessio <- Annex.withCurrentState checksuccess-		let params = Ssh.rsyncParams r+		let params = Ssh.rsyncParams r Upload 		u <- getUUID 		-- run copy from perspective of remote 		liftIO $ onLocal (repo r) $ ifM (Annex.Content.inAnnex key)
Remote/Helper/Ssh.hs view
@@ -122,7 +122,7 @@ 		fields 	-- Convert the ssh command into rsync command line. 	let eparam = rsyncShell (Param shellcmd:shellparams)-	let o = rsyncParams r+	let o = rsyncParams r direction 	return $ if direction == Download 		then o ++ rsyncopts eparam dummy (File file) 		else o ++ rsyncopts eparam (File file) dummy@@ -140,7 +140,11 @@ 	dummy = Param "dummy:"  -- --inplace to resume partial files-rsyncParams :: Remote -> [CommandParam]-rsyncParams r = Params "--progress --inplace" :-	map Param (remoteAnnexRsyncOptions $ gitconfig r)-+rsyncParams :: Remote -> Direction -> [CommandParam]+rsyncParams r direction = Params "--progress --inplace" :+	map Param (remoteAnnexRsyncOptions gc ++ dps)+  where+	dps+		| direction == Download = remoteAnnexRsyncDownloadOptions gc+		| otherwise = remoteAnnexRsyncUploadOptions gc+	gc = gitconfig r
Remote/Rsync.hs view
@@ -41,12 +41,15 @@ import Utility.CopyFile import Utility.Metered import Annex.Perms+import Logs.Transfer  type RsyncUrl = String  data RsyncOpts = RsyncOpts 	{ rsyncUrl :: RsyncUrl 	, rsyncOptions :: [CommandParam]+	, rsyncUploadOptions :: [CommandParam]+	, rsyncDownloadOptions :: [CommandParam] 	, rsyncShellEscape :: Bool } @@ -93,10 +96,16 @@ 			}  genRsyncOpts :: RemoteConfig -> RemoteGitConfig -> [CommandParam] -> RsyncUrl -> RsyncOpts-genRsyncOpts c gc transport url = RsyncOpts url (transport ++ opts) escape+genRsyncOpts c gc transport url = RsyncOpts+	{ rsyncUrl = url+	, rsyncOptions = opts []+	, rsyncUploadOptions = transport ++ opts (remoteAnnexRsyncUploadOptions gc)+	, rsyncDownloadOptions = transport ++ opts (remoteAnnexRsyncDownloadOptions gc)+	, rsyncShellEscape = M.lookup "shellescape" c /= Just "no"+	}   where-	opts = map Param $ filter safe $ remoteAnnexRsyncOptions gc-	escape = M.lookup "shellescape" c /= Just "no"+	opts specificopts = map Param $ filter safe $+		remoteAnnexRsyncOptions gc ++ specificopts 	safe opt 		-- Don't allow user to pass --delete to rsync; 		-- that could cause it to delete other keys@@ -257,7 +266,7 @@  rsyncRetrieve :: RsyncOpts -> Key -> FilePath -> Maybe MeterUpdate -> Annex Bool rsyncRetrieve o k dest callback =-	showResumable $ untilTrue (rsyncUrls o k) $ \u -> rsyncRemote o callback+	showResumable $ untilTrue (rsyncUrls o k) $ \u -> rsyncRemote Download o callback 		-- use inplace when retrieving to support resuming 		[ Param "--inplace" 		, Param u@@ -272,13 +281,15 @@ 		return False 	) -rsyncRemote :: RsyncOpts -> Maybe MeterUpdate -> [CommandParam] -> Annex Bool-rsyncRemote o callback params = do+rsyncRemote :: Direction -> RsyncOpts -> Maybe MeterUpdate -> [CommandParam] -> Annex Bool+rsyncRemote direction o callback params = do 	showOutput -- make way for progress bar-	liftIO $ (maybe rsync rsyncProgress callback) ps+	liftIO $ (maybe rsync rsyncProgress callback) $+		opts ++ [Params "--progress"] ++ params   where-	defaultParams = [Params "--progress"]-	ps = rsyncOptions o ++ defaultParams ++ params+	opts+		| direction == Download = rsyncDownloadOptions o+		| otherwise = rsyncUploadOptions o  {- To send a single key is slightly tricky; need to build up a temporary  - directory structure to pass to rsync so it can create the hash@@ -296,12 +307,12 @@ 	liftIO $ createDirectoryIfMissing True $ parentDir dest 	ok <- liftIO $ if canrename 		then do-			renameFile src dest+			rename src dest 			return True 		else createLinkOrCopy src dest 	ps <- sendParams 	if ok-		then showResumable $ rsyncRemote o (Just callback) $ ps +++		then showResumable $ rsyncRemote Upload o (Just callback) $ ps ++ 			[ Param "--recursive" 			, partialParams 			-- tmp/ to send contents of tmp dir
Test.hs view
@@ -17,12 +17,12 @@ import Data.Monoid  import Options.Applicative hiding (command)-import System.PosixCompat.Files import Control.Exception.Extensible import qualified Data.Map as M import System.IO.HVFS (SystemFS(..)) import qualified Text.JSON import System.Path+import qualified Data.ByteString.Lazy as L  import Common @@ -32,6 +32,7 @@ import qualified Backend import qualified Git.CurrentRepo import qualified Git.Filename+import qualified Git.Types import qualified Locations import qualified Types.KeySource import qualified Types.Backend@@ -51,6 +52,7 @@ import qualified Config.Cost import qualified Crypto import qualified Annex.Init+import qualified Annex.CatFile import qualified Utility.Path import qualified Utility.FileMode import qualified Build.SysConfig@@ -65,6 +67,7 @@ import qualified Utility.Hash import qualified Utility.Scheduled import qualified Utility.HumanTime+import qualified Utility.ThreadScheduler #ifndef mingw32_HOST_OS import qualified CmdLine.GitAnnex as GitAnnex import qualified Remote.Helper.Encryptable@@ -157,7 +160,6 @@ unitTests note getenv = testGroup ("Unit Tests " ++ note) 	[ check "add sha1dup" test_add_sha1dup 	, check "add extras" test_add_extras-	, check "add subdirs" test_add_subdirs 	, check "reinject" test_reinject 	, check "unannex (no copy)" test_unannex_nocopy 	, check "unannex (with copy)" test_unannex_withcopy@@ -188,6 +190,7 @@ 	, check "union merge regression" test_union_merge_regression 	, check "conflict resolution" test_conflict_resolution_movein_bug 	, check "conflict_resolution (mixed directory and file)" test_mixed_conflict_resolution+	, check "conflict_resolution (mixed directory and file) 2" test_mixed_conflict_resolution2 	, check "map" test_map 	, check "uninit" test_uninit 	, check "uninit (in git-annex branch)" test_uninit_inbranch@@ -199,6 +202,7 @@ 	, check "bup remote" test_bup_remote 	, check "crypto" test_crypto 	, check "preferred content" test_preferred_content+	, check "add subdirs" test_add_subdirs 	]   where 	check desc t = testCase desc (getenv >>= t)@@ -250,19 +254,6 @@ 	annexed_present wormannexedfile 	checkbackend wormannexedfile backendWORM -test_add_subdirs :: TestEnv -> Assertion-test_add_subdirs env = intmpclonerepo env $ do-	createDirectory "dir"-	writeFile ("dir" </> "foo") $ content annexedfile-	git_annex env "add" ["dir"] @? "add of subdir failed"-	createDirectory "dir2"-	writeFile ("dir2" </> "foo") $ content annexedfile-#ifndef mingw32_HOST_OS-	{- This does not work on Windows, for whatever reason. -}-	setCurrentDirectory "dir"-	git_annex env "add" [".." </> "dir2"] @? "add of ../subdir failed"-#endif- test_reinject :: TestEnv -> Assertion test_reinject env = intmpclonerepoInDirect env $ do 	git_annex env "drop" ["--force", sha1annexedfile] @? "drop failed"@@ -781,6 +772,7 @@ 		forM_ [r1, r2] $ \r -> indir env r $ do 			{- Get all files, see check below. -} 			git_annex env "get" [] @? "get failed"+			disconnectOrigin 		pair env r1 r2 		forM_ [r1, r2] $ \r -> indir env r $ do 			{- Set up a conflict. -}@@ -815,39 +807,62 @@ 	check_mixed_conflict inr1 = withtmpclonerepo env False $ \r1 -> 		withtmpclonerepo env False $ \r2 -> do 			indir env r1 $ do+				disconnectOrigin 				writeFile conflictor "conflictor" 				git_annex env "add" [conflictor] @? "add conflicter failed"-				git_annex env "sync" [] @? "sync failed"+				git_annex env "sync" [] @? "sync failed in r1" 			indir env r2 $ do+				disconnectOrigin 				createDirectory conflictor 				writeFile (conflictor </> "subfile") "subfile" 				git_annex env "add" [conflictor] @? "add conflicter failed"-				git_annex env "sync" [] @? "sync failed"+				git_annex env "sync" [] @? "sync failed in r2" 			pair env r1 r2-			let r = if inr1 then r1 else r2-			indir env r $ do+			let l = if inr1 then [r1, r2] else [r2, r1]+			forM_ l $ \r -> indir env r $ 				git_annex env "sync" [] @? "sync failed in mixed conflict"-			checkmerge r1-			checkmerge r2-	  where-		conflictor = "conflictor"-		variantprefix = conflictor ++ ".variant"-		checkmerge d = do-			doesDirectoryExist (d </> conflictor) @? (d ++ " conflictor directory missing")-			(any (variantprefix `isPrefixOf`) -				<$> getDirectoryContents d)-				@? (d ++ "conflictor file missing")+			checkmerge "r1" r1+			checkmerge "r1" r2+	conflictor = "conflictor"+	variantprefix = conflictor ++ ".variant"+	checkmerge what d = do+		doesDirectoryExist (d </> conflictor) @? (d ++ " conflictor directory missing")+		l <- getDirectoryContents d+		any (variantprefix `isPrefixOf`) l+			@? (what ++ " conflictor file missing in: " ++ show l ) -{- Set up repos as remotes of each other;- - remove origin since we're going to sync- - some changes to a file. -}+{- + - During conflict resolution, one of the annexed files in git is+ - accidentially converted from a symlink to a regular file.+ - This only happens on crippled filesystems.+ -+ - This test case happens to detect the problem when it tries the next+ - pass of conflict resolution, since it's unable to resolve a conflict+ - between an annexed and non-annexed file.+ -}+test_mixed_conflict_resolution2 :: TestEnv -> Assertion+test_mixed_conflict_resolution2 env = go >> go+  where+	go = withtmpclonerepo env False $ \r1 ->+		withtmpclonerepo env False $ \r2 -> do+			indir env r1 $ do+				writeFile conflictor "conflictor"+				git_annex env "add" [conflictor] @? "add conflicter failed"+				git_annex env "sync" [] @? "sync failed in r1"+			indir env r2 $ do+				createDirectory conflictor+				writeFile (conflictor </> "subfile") "subfile"+				git_annex env "add" [conflictor] @? "add conflicter failed"+				git_annex env "sync" [] @? "sync failed in r2"+	conflictor = "conflictor"++{- Set up repos as remotes of each other. -} pair :: TestEnv -> FilePath -> FilePath -> Assertion pair env r1 r2 = forM_ [r1, r2] $ \r -> indir env r $ do 	when (r /= r1) $ 		boolSystem "git" [Params "remote add r1", File ("../../" ++ r1)] @? "remote add" 	when (r /= r2) $ 		boolSystem "git" [Params "remote add r2", File ("../../" ++ r2)] @? "remote add"-	boolSystem "git" [Params "remote rm origin"] @? "remote rm"  test_map :: TestEnv -> Assertion test_map env = intmpclonerepo env $ do@@ -948,7 +963,8 @@ 	not <$> git_annex env "drop" [annexedfile, "--numcopies=2"] @? "drop failed to fail" 	annexed_present annexedfile #else-	-- this test doesn't work in Windows TODO+	-- Rsync remotes with a rsyncurl of a directory do not currently+	-- work on Windows. 	noop #endif @@ -1043,6 +1059,23 @@ test_crypto _env = putStrLn "gpg testing not implemented on Windows" #endif +test_add_subdirs :: TestEnv -> Assertion+test_add_subdirs env = intmpclonerepo env $ do+	createDirectory "dir"+	writeFile ("dir" </> "foo") $ "dir/" ++ content annexedfile+	git_annex env "add" ["dir"] @? "add of subdir failed"++	{- Regression test for Windows bug where symlinks were not+	 - calculated correctly for files in subdirs. -}+	git_annex env "sync" [] @? "sync failed"+	l <- annexeval $ encodeW8 . L.unpack <$> Annex.CatFile.catObject (Git.Types.Ref "HEAD:dir/foo")+	"../.git/annex/" `isPrefixOf` l @? ("symlink from subdir to .git/annex is wrong: " ++ l)++	createDirectory "dir2"+	writeFile ("dir2" </> "foo") $ content annexedfile+	setCurrentDirectory "dir"+	git_annex env "add" [".." </> "dir2"] @? "add of ../subdir failed"+ -- This is equivilant to running git-annex, but it's all run in-process -- (when the OS allows) so test coverage collection works. git_annex :: TestEnv -> String -> [String] -> IO Bool@@ -1117,6 +1150,9 @@ 	dir <- tmprepodir 	bracket (clonerepo env mainrepodir dir bare) cleanup a +disconnectOrigin :: Assertion+disconnectOrigin = boolSystem "git" [Params "remote rm origin"] @? "remote rm"+ withgitrepo :: TestEnv -> (FilePath -> Assertion) -> Assertion withgitrepo env = bracket (setuprepo env mainrepodir) return @@ -1137,9 +1173,7 @@ 	cleanup dir 	ensuretmpdir 	boolSystem "git" [Params "init -q", File dir] @? "git init failed"-	indir env dir $ do-		boolSystem "git" [Params "config user.name", Param "Test User"] @? "git config failed"-		boolSystem "git" [Params "config user.email test@example.com"] @? "git config failed"+	configrepo env dir 	return dir  -- clones are always done as local clones; we cannot test ssh clones@@ -1151,11 +1185,17 @@ 	boolSystem "git" [Params ("clone -q" ++ b), File old, File new] @? "git clone failed" 	indir env new $ 		git_annex env "init" ["-q", new] @? "git annex init failed"+	configrepo env new 	when (not bare) $ 		indir env new $ 			handleforcedirect env 	return new +configrepo :: TestEnv -> FilePath -> IO ()+configrepo env dir = indir env dir $ do+	boolSystem "git" [Params "config user.name", Param "Test User"] @? "git config failed"+	boolSystem "git" [Params "config user.email test@example.com"] @? "git config failed"+ handleforcedirect :: TestEnv -> IO () handleforcedirect env = when (M.lookup "FORCEDIRECT" env == Just "1") $ 	git_annex env "direct" ["-q"] @? "git annex direct failed"@@ -1167,16 +1207,24 @@ 		createDirectory tmpdir  cleanup :: FilePath -> IO ()-cleanup dir = do-	e <- doesDirectoryExist dir-	when e $ do-		-- git-annex prevents annexed file content from being-		-- removed via directory permissions; undo-		recurseDir SystemFS dir >>=-			filterM doesDirectoryExist >>=-				mapM_ Utility.FileMode.allowWrite-		-- For unknown reasons, this sometimes fails on Windows.-		void $ tryIO $ removeDirectoryRecursive dir+cleanup = cleanup' False++cleanup' :: Bool -> FilePath -> IO ()+cleanup' final dir = whenM (doesDirectoryExist dir) $ do+	-- Allow all files and directories to be written to, so+	-- they can be deleted. Both git and git-annex use file+	-- permissions to prevent deletion.+	recurseDir SystemFS dir >>=+		mapM_ (void . tryIO . Utility.FileMode.allowWrite)+	-- This sometimes fails on Windows, due to some files+	-- being still opened by a subprocess.+	catchIO (removeDirectoryRecursive dir) $ \e -> do+		when final $ do+			print e+			putStrLn "sleeping 10 seconds and will retry directory cleanup"+			Utility.ThreadScheduler.threadDelaySeconds (Utility.ThreadScheduler.Seconds 10)+			whenM (doesDirectoryExist dir) $ do+				removeDirectoryRecursive dir 	 checklink :: FilePath -> Assertion checklink f = do@@ -1279,7 +1327,7 @@  releaseTestEnv :: TestEnv -> IO () releaseTestEnv _env = do-	cleanup tmpdir+	cleanup' True tmpdir  prepareTestEnv :: Bool -> IO TestEnv prepareTestEnv forcedirect = do
Types/GitConfig.hs view
@@ -115,6 +115,8 @@ 	 - including special remotes. -} 	, remoteAnnexSshOptions :: [String] 	, remoteAnnexRsyncOptions :: [String]+	, remoteAnnexRsyncUploadOptions :: [String]+	, remoteAnnexRsyncDownloadOptions :: [String] 	, remoteAnnexRsyncTransport :: [String] 	, remoteAnnexGnupgOptions :: [String] 	, remoteAnnexRsyncUrl :: Maybe String@@ -144,6 +146,8 @@  	, remoteAnnexSshOptions = getoptions "ssh-options" 	, remoteAnnexRsyncOptions = getoptions "rsync-options"+	, remoteAnnexRsyncDownloadOptions = getoptions "rsync-download-options"+	, remoteAnnexRsyncUploadOptions = getoptions "rsync-upload-options" 	, remoteAnnexRsyncTransport = getoptions "rsync-transport" 	, remoteAnnexGnupgOptions = getoptions "gnupg-options" 	, remoteAnnexRsyncUrl = notempty $ getmaybe "rsyncurl"
Utility/Daemon.hs view
@@ -18,7 +18,7 @@ import System.Posix import Control.Concurrent.Async #else-import System.PosixCompat+import System.PosixCompat.Types #endif  {- Run an action as a daemon, with all output sent to a file descriptor.@@ -77,7 +77,7 @@ #else 	writeFile newfile "-1" #endif-	renameFile newfile file+	rename newfile file   where 	newfile = file ++ ".new" 
Utility/DirWatcher/Win32Notify.hs view
@@ -11,7 +11,7 @@ import Utility.DirWatcher.Types  import System.Win32.Notify-import qualified System.PosixCompat.Files as Files+import qualified Utility.PosixFiles as Files  watchDir :: FilePath -> (FilePath -> Bool) -> WatchHooks -> IO WatchManager watchDir dir ignored hooks = do
Utility/Directory.hs view
@@ -10,7 +10,6 @@ module Utility.Directory where  import System.IO.Error-import System.PosixCompat.Files import System.Directory import Control.Exception (throw) import Control.Monad@@ -19,6 +18,7 @@ import Control.Applicative import System.IO.Unsafe (unsafeInterleaveIO) +import Utility.PosixFiles import Utility.SafeCommand import Utility.Tmp import Utility.Exception
Utility/FileMode.hs view
@@ -133,10 +133,8 @@  - as writeFile.  -} writeFileProtected :: FilePath -> String -> IO ()-writeFileProtected file content = do-	h <- openFile file WriteMode+writeFileProtected file content = withFile file WriteMode $ \h -> do 	void $ tryIO $ 		modifyFileMode file $ 			removeModes [groupReadMode, otherReadMode] 	hPutStr h content-	hClose h
Utility/LogFile.hs view
@@ -30,7 +30,7 @@ 		| num > maxLogs = return () 		| otherwise = whenM (doesFileExist currfile) $ do 			go (num + 1)-			renameFile currfile nextfile+			rename currfile nextfile 	  where 		currfile = filename num 		nextfile = filename (num + 1)
Utility/Misc.hs view
@@ -33,12 +33,19 @@ readFileStrict :: FilePath -> IO String readFileStrict = readFile >=> \s -> length s `seq` return s -{-  Reads a file strictly, and using the FileSystemEncofing, so it will+{-  Reads a file strictly, and using the FileSystemEncoding, so it will  -  never crash on a badly encoded file. -} readFileStrictAnyEncoding :: FilePath -> IO String readFileStrictAnyEncoding f = withFile f ReadMode $ \h -> do 	fileEncoding h 	hClose h `after` hGetContentsStrict h++{- Writes a file, using the FileSystemEncoding so it will never crash+ - on a badly encoded content string. -}+writeFileAnyEncoding :: FilePath -> String -> IO ()+writeFileAnyEncoding f content = withFile f WriteMode $ \h -> do+	fileEncoding h+	hPutStr h content  {- Like break, but the item matching the condition is not included  - in the second result list.
Utility/Path.hs view
@@ -1,6 +1,6 @@ {- path manipulation  -- - Copyright 2010-2013 Joey Hess <joey@kitenet.net>+ - Copyright 2010-2014 Joey Hess <joey@kitenet.net>  -  - Licensed under the GNU GPL version 3 or higher.  -}@@ -21,28 +21,60 @@ import Data.Char import qualified System.FilePath.Posix as Posix #else-import qualified "MissingH" System.Path as MissingH import System.Posix.Files #endif +import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo -{- Makes a path absolute if it's not already.+{- Simplifies a path, removing any ".." or ".", and removing the trailing+ - path separator.+ -+ - On Windows, preserves whichever style of path separator might be used in+ - the input FilePaths. This is done because some programs in Windows+ - demand a particular path separator -- and which one actually varies!+ -+ - This does not guarantee that two paths that refer to the same location,+ - and are both relative to the same location (or both absolute) will+ - yeild the same result. Run both through normalise from System.FilePath+ - to ensure that.+ -}+simplifyPath :: FilePath -> FilePath+simplifyPath path = dropTrailingPathSeparator $ +	joinDrive drive $ joinPath $ norm [] $ splitPath path'+  where+	(drive, path') = splitDrive path++	norm c [] = reverse c+	norm c (p:ps)+		| p' == ".." = norm (drop 1 c) ps+		| p' == "." = norm c ps+		| otherwise = norm (p:c) ps+	  where+		p' = dropTrailingPathSeparator p++{- Makes a path absolute.+ -  - The first parameter is a base directory (ie, the cwd) to use if the path  - is not already absolute.  -- - On Unix, collapses and normalizes ".." etc in the path. May return Nothing- - if the path cannot be normalized.- -- - MissingH's absNormPath does not work on Windows, so on Windows- - no normalization is done.+ - Does not attempt to deal with edge cases or ensure security with+ - untrusted inputs.  -}-absNormPath :: FilePath -> FilePath -> Maybe FilePath+absPathFrom :: FilePath -> FilePath -> FilePath+absPathFrom dir path = simplifyPath (combine dir path)++{- On Windows, this converts the paths to unix-style, in order to run+ - MissingH's absNormPath on them. Resulting path will use / separators. -}+absNormPathUnix :: FilePath -> FilePath -> Maybe FilePath #ifndef mingw32_HOST_OS-absNormPath dir path = MissingH.absNormPath dir path+absNormPathUnix dir path = MissingH.absNormPath dir path #else-absNormPath dir path = Just $ combine dir path+absNormPathUnix dir path = todos <$> MissingH.absNormPath (fromdos dir) (fromdos path)+  where+	fromdos = replace "\\" "/"+	todos = replace "/" "\\" #endif  {- Returns the parent directory of a path.@@ -72,13 +104,13 @@  - are all equivilant.  -} dirContains :: FilePath -> FilePath -> Bool-dirContains a b = a == b || a' == b' || (a'++[pathSeparator]) `isPrefixOf` b'+dirContains a b = a == b || a' == b' || (addTrailingPathSeparator a') `isPrefixOf` b'   where-	norm p = fromMaybe "" $ absNormPath p "." 	a' = norm a 	b' = norm b+	norm = normalise . simplifyPath -{- Converts a filename into a normalized, absolute path.+{- Converts a filename into an absolute path.  -  - Unlike Directory.canonicalizePath, this does not require the path  - already exists. -}@@ -87,13 +119,6 @@ 	cwd <- getCurrentDirectory 	return $ absPathFrom cwd file -{- Converts a filename into a normalized, absolute path- - from the specified cwd. -}-absPathFrom :: FilePath -> FilePath -> FilePath-absPathFrom cwd file = fromMaybe bad $ absNormPath cwd file-  where-	bad = error $ "unable to normalize " ++ file- {- Constructs a relative path from the CWD to a file.  -  - For example, assuming CWD is /tmp/foo/bar:@@ -105,7 +130,7 @@  {- Constructs a relative path from a directory to a file.  -- - Both must be absolute, and normalized (eg with absNormpath).+ - Both must be absolute, and cannot contain .. etc. (eg use absPath first).  -} relPathDirToFile :: FilePath -> FilePath -> FilePath relPathDirToFile from to = join s $ dotdots ++ uncommon
+ Utility/PosixFiles.hs view
@@ -0,0 +1,33 @@+{- POSIX files (and compatablity wrappers).+ -+ - This is like System.PosixCompat.Files, except with a fixed rename.+ -+ - Copyright 2014 Joey Hess <joey@kitenet.net>+ -+ - Licensed under the GNU GPL version 3 or higher.+ -}++{-# LANGUAGE CPP #-}++module Utility.PosixFiles (+	module X,+	rename+) where++import System.PosixCompat.Files as X hiding (rename)++#ifndef mingw32_HOST_OS+import System.Posix.Files (rename)+#else+import qualified System.Win32.File as Win32+#endif++{- System.PosixCompat.Files.rename on Windows calls renameFile,+ - so cannot rename directories. + -+ - Instead, use Win32 moveFile, which can. It needs to be told to overwrite+ - any existing file. -}+#ifdef mingw32_HOST_OS+rename :: FilePath -> FilePath -> IO ()+rename src dest = Win32.moveFileEx src dest Win32.mOVEFILE_REPLACE_EXISTING+#endif
Utility/SshConfig.hs view
@@ -127,9 +127,13 @@  {- Ensure that the ssh config file lacks any group or other write bits,   - since ssh is paranoid about not working if other users can write- - to one of its config files (.ssh/config and .ssh/authorized_keys) -}+ - to one of its config files (.ssh/config and .ssh/authorized_keys).+ -+ - If the chmod fails, ignore the failure, as it might be a filesystem like+ - Android's that does not support file modes.+ -} setSshConfigMode :: FilePath -> IO ()-setSshConfigMode f = modifyFileMode f $+setSshConfigMode f = void $ tryIO $ modifyFileMode f $ 	removeModes [groupWriteMode, otherWriteMode]  sshDir :: IO FilePath
Utility/Tmp.hs view
@@ -13,10 +13,11 @@ import System.IO import System.Directory import Control.Monad.IfElse+import System.FilePath  import Utility.Exception-import System.FilePath import Utility.FileSystemEncoding+import Utility.PosixFiles  type Template = String @@ -30,7 +31,7 @@ 	(tmpfile, handle) <- openTempFile dir (base ++ ".tmp") 	hClose handle 	a tmpfile content-	renameFile tmpfile file+	rename tmpfile file  {- Runs an action with a tmp file located in the system's tmp directory  - (or in "." if there is none) then removes the file. -}
debian/changelog view
@@ -1,11 +1,47 @@-git-annex (5.20140128) UNRELEASED; urgency=medium+git-annex (5.20140210) unstable; urgency=medium -  * Windows: It's now safe to run multiple git-annex processes concurrently-    on Windows; the lock files have been sorted out.+  * --in can now refer to files that were located in a repository at+    some past date. For example, --in="here@{yesterday}"   * Fixed direct mode annexed content locking code, which is used to     guard against recursive file drops.+  * This is the first beta-level release of the Windows port with important+    fixes (see below).+    (The webapp and assistant are still alpha-level on Windows.)+  * sync --content: Honor annex-ignore configuration.+  * sync: Don't try to sync with xmpp remotes, which are only currently+    supported when using the assistant.+  * sync --content: Re-pull from remotes after downloading content,+    since that can take a while and other changes may be pushed in the+    meantime.+  * sync --content: Reuse smart copy code from copy command, including+    handling and repairing out of date location tracking info.+    Closes: #737480+  * sync --content: Drop files from remotes that don't want them after+    getting them.+  * sync: Fix bug in automatic merge conflict resolution code when used+    on a filesystem not supporting symlinks, which resulted in it losing+    track of the symlink bit of annexed files.+  * Added ways to configure rsync options to be used only when uploading+    or downloading from a remote. Useful to eg limit upload bandwidth.+  * Fix initremote with encryption=pubkey to work with S3, glacier, webdav,+    and external special remotes.+  * Avoid building with DAV 0.6 which is badly broken (see #737902).+  * Fix dropping of unused keys with spaces in their name.+  * Fix build on platforms not supporting the webapp.+  * Document in man page that sshcaching uses ssh ControlMaster.+    Closes: #737476+  * Windows: It's now safe to run multiple git-annex processes concurrently+    on Windows; the lock files have been sorted out.+  * Windows: Avoid using unix-compat's rename, which refuses to rename+    directories.+  * Windows: Fix deletion of repositories by test suite and webapp.+  * Windows: Test suite 100% passes again.+  * Windows: Fix bug in symlink calculation code.+  * Windows: Fix handling of absolute unix-style git repository paths.+  * Android: Avoid crashing when unable to set file mode for ssh config file+    due to Android filesystem horribleness. - -- Joey Hess <joeyh@debian.org>  Tue, 28 Jan 2014 13:57:19 -0400+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Feb 2014 12:54:57 -0400  git-annex (5.20140127) unstable; urgency=medium 
debian/control view
@@ -13,7 +13,7 @@ 	libghc-dataenc-dev, 	libghc-utf8-string-dev, 	libghc-hs3-dev (>= 0.5.6),-	libghc-dav-dev (>= 0.3) [amd64 i386 kfreebsd-amd64 kfreebsd-i386 powerpc],+	libghc-dav-dev (>= 0.6.1) [amd64 i386 kfreebsd-amd64 kfreebsd-i386 powerpc], 	libghc-quickcheck2-dev, 	libghc-monad-control-dev (>= 0.3), 	libghc-monadcatchio-transformers-dev,
+ doc/bugs/Can__39__t_set_up_rsync.net_repo_on_OS_X_10.9.mdwn view
@@ -0,0 +1,24 @@+### Please describe the problem.++I can't seem to add the rsync.net remote on an OS X 10.9 machine running git-annex assistant version 5.20140128-g0ac94c3. The process complains about a missing `/usr/libexec/ssh-askpass` in the logs, and after a few retries rsync.net locks me out. This program doesn't exist on my system.++### What steps will reproduce the problem?++1. Click "Add another repository"+2. Pick rsync.net+3. Enter the credentials I got in the email from rsync.net+4. Click "Use this rsync repository"++The resulting logs will state that `/usr/libexec/ssh-askpass` can't be found.++### What version of git-annex are you using? On what operating system?++git-annex assistant version 5.20140128-g0ac94c3 on OS X 10.9.1.++### Please provide any additional information below.++I think I have found a workaround in creating that program as a shell script which echoes my password to stdout, but can't test right now because rsync.net have wisely ratelimited my password login attempts. (-:++I'll update this page if I can confirm the workaround works.++(I fully intend to roll that password as soon as I'm in, so no worries about a stale password falling into evildoers' hands.)
+ doc/bugs/Creating_a_WebDAV_repo_under_OpenBSD.mdwn view
@@ -0,0 +1,53 @@+### Please describe the problem.+When creating a https webdav repository under openbsd it complains that /etc/ssl/certs doesn't exist. This is true considering all certs are stored in /etc/ssl/cert.pem.+After /etc/ssl/certs is created it complains about that the certificate has an unknown CA, for obvious reasons.++A workaround is to symlink /etc/ssl/cert.pem in /etc/ssl/certs++### What steps will reproduce the problem?+See below++### What version of git-annex are you using? On what operating system?+5.20140129 under OpenBSD 5.4++### Please provide any additional information below.++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log+WEBDAV_USERNAME=<username> WEBDAV_PASSWORD=<password> git annex initremote box.com type=webdav url=https://dav.box.com/dav/Documents chunksize=100mb encryption=hybrid keyid=<key> mac=HMACSHA512+initremote box.com (encryption setup) (hybrid cipher with gpg key <key>) (testing WebDAV server...)++git-annex: WebDAV failed to write file: /etc/ssl/certs/: getDirectoryContents: does not exist (No such file or directory): user error+failed+git-annex: initremote: 1 failed+++# End of transcript or log.+"""]]++> This needs to be fixed in the haskell certificate library.+> I have filed a bug there:+> <https://github.com/vincenthz/hs-certificate/issues/26>+> +> Patch would probably be pretty simple. Based on description, something like+> this:++[[!format patch """+diff --git a/System/Certificate/X509/Unix.hs b/System/Certificate/X509/Unix.hs+index 8463465..74316e9 100644+--- a/System/Certificate/X509/Unix.hs++++ b/System/Certificate/X509/Unix.hs+@@ -50,7 +50,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten+           isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)+ + getSystemCertificateStore :: IO CertificateStore+-getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates)++getSystemCertificateStore = makeCertificateStore <$> readCertificates "/etc/ssl/cert.pem"+ + getSystemPath :: IO FilePath+ getSystemPath = E.catch (getEnv envPathOverride) inDefault+"""]]++> +> [[closing|done]] as no changes to git-annex can fix this. --[[Joey]] 
doc/bugs/Creating_a_box.com_repository_fails.mdwn view
@@ -31,3 +31,7 @@  # End of transcript or log. """]]++> Seems that [DAV-0.6 is badly broken](http://bugs.debian.org/737902).+> I have adjusted the cabal file to refuse to build with that broken+> version.
+ doc/bugs/GPG_issues_with_pubkey___40__Again__63____41__.mdwn view
@@ -0,0 +1,44 @@+### Please describe the problem.+When I try to create a megaannex remote with pubkey encryption GPG complains about not finding the public key.++### What steps will reproduce the problem?+See below+++### What version of git-annex are you using? On what operating system?+5.20140129 under OSX.+++### Please provide any additional information below.++[[!format sh """+% USERNAME="<username>" PASSWORD='<password>' git annex -vd initremote mega type=external externaltype=mega encryption=pubkey keyid=X folder=Documents mac=HMACSHA512+[2014-02-06 11:39:14 CET] read: git ["--git-dir=/Users/dxtr/Documents/.git","--work-tree=/Users/dxtr/Documents","show-ref","git-annex"]+[2014-02-06 11:39:14 CET] read: git ["--git-dir=/Users/dxtr/Documents/.git","--work-tree=/Users/dxtr/Documents","show-ref","--hash","refs/heads/git-annex"]+[2014-02-06 11:39:14 CET] read: git ["--git-dir=/Users/dxtr/Documents/.git","--work-tree=/Users/dxtr/Documents","log","refs/heads/git-annex..62dc22cced06268fa5adcf54992eb1169c6ca1aa","--oneline","-n1"]+[2014-02-06 11:39:14 CET] chat: git ["--git-dir=/Users/dxtr/Documents/.git","--work-tree=/Users/dxtr/Documents","cat-file","--batch"]+initremote mega (encryption setup) [2014-02-06 11:39:14 CET] read: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--with-colons","--list-public-keys","46726B9A"]+[2014-02-06 11:39:14 CET] read: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--gen-random","--armor","2","256"]+[2014-02-06 11:39:14 CET] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--recipient","X","--encrypt","--no-encrypt-to","--no-default-recipient","--force-mdc","--no-textmode"]+(pubkey crypto with gpg key X) [2014-02-06 11:39:15 CET] chat: git-annex-remote-mega []+[2014-02-06 11:39:15 CET] git-annex-remote-mega --> VERSION 1+[2014-02-06 11:39:15 CET] git-annex-remote-mega <-- INITREMOTE+[2014-02-06 11:39:15 CET] git-annex-remote-mega --> GETCONFIG encryption+[2014-02-06 11:39:15 CET] git-annex-remote-mega <-- VALUE pubkey+[2014-02-06 11:39:15 CET] git-annex-remote-mega --> GETCONFIG folder+[2014-02-06 11:39:15 CET] git-annex-remote-mega <-- VALUE Documents+[2014-02-06 11:39:15 CET] git-annex-remote-mega --> SETCREDS mycreds <username> <password>+(gpg) [2014-02-06 11:39:15 CET] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--decrypt"]+[2014-02-06 11:39:15 CET] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--batch","--encrypt","--no-encrypt-to","--no-default-recipient","--force-mdc","--no-textmode"]+gpg: no valid addressees+gpg: [stdin]: encryption failed: no such user id++git-annex: user error (gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--batch","--encrypt","--no-encrypt-to","--no-default-recipient","--force-mdc","--no-textmode"] exited 2)+failed+git-annex: initremote: 1 failed+++# End of transcript or log.+"""]]++> [[fixed|done]] --[[Joey]] 
@@ -0,0 +1,70 @@+### Please describe the problem.+When creating a simple "parent" git repo, creating another "child" repo with an annexed file, then adding the child repo as a submodule of the parent, the symlink path of the large file contained by the submodule is incorrect.+++### What steps will reproduce the problem?+Here are the exact steps for this simple use case (I have removed unrelated output for brevity, and setting up the repos is error-free):++    # Create "parent" repo+    $ mkdir parent+    $ cd parent/+    $ git init+    $ touch parent_start+    $ git add parent_start+    $ git commit -a -m 'New parent repo'+    $ cd ../+    +    # Create "child" repo+    $ mkdir child+    $ cd child/+    $ git init+    $ touch child_start+    $ git add child_start+    $ git commit -a -m 'New child repo'+    $ git annex init+    $ cp ~/Desktop/some_big_file child_big_file+    $ git annex add child_big_file+    $ git commit -a -m 'Added big file'+    $ cd ../+    +    # Add "child" repo as a submodule of "parent" repo+    $ cd parent/+    $ git submodule add ../child ./submodule+    $ git commit -m 'Added submodule'+    +    # Try to get annexed file+    $ cd submodule/+    $ git annex init+    $ git annex get+    $ ls ./+    -rw-r--r--	.git+    lrwxr-xr-x	child_big_file -> .git/annex/objects/F5/f2/SHA256E-s1117253--ce17632dfd9c61a0a8c1384d25fb3a8a197f8056f224e15fbcad89904a82c5fd/SHA256E-s1117253--ce17632dfd9c61a0a8c1384d25fb3a8a197f8056f224e15fbcad89904a82c5fd+    -rw-r--r--	child_start+    +    # As you can see above, the child_big_file symlink path is incorrect (the ".git/annex/..." location is not a directory, and should instead be "../.git/modules/submodule/annex/...")+    +    # Show the actual location of the annexed file+    $ cd ../+    $ ls .git/modules/submodule/annex/objects/F5/f2/SHA256E-s1117253--ce17632dfd9c61a0a8c1384d25fb3a8a197f8056f224e15fbcad89904a82c5fd+    -r--r--r--	SHA256E-s1117253--ce17632dfd9c61a0a8c1384d25fb3a8a197f8056f224e15fbcad89904a82c5fd+++### What version of git-annex are you using? On what operating system?+Mac OS X Mountain Lion. git-annex files are from within the downloadable git-annex assistant.++    $ sw_vers -productVersion+    10.8.5+    $ git --version+    git version 1.7.12.4 (Apple Git-37)+    $ git-annex version+    git-annex version: 4.20131105-g136b030+    build flags: Assistant Webapp Pairing Testsuite S3 WebDAV FsEvents XMPP DNS Feeds Quvi TDFA+    key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SHA256 SHA1 SHA512 SHA224 SHA384 WORM URL+    remote types: git gcrypt S3 bup directory rsync web webdav glacier hook+    local repository version: 3+    default repository version: 3+    supported repository versions: 3 4+    upgrade supported from repository versions: 0 1 2+++Thanks for your help :)
+ doc/bugs/Jabber__47__xmpp_not_supported_on_Debian_Wheezy_backport.mdwn view
@@ -0,0 +1,12 @@+### Please describe the problem.+I've installed Git-annex via the backport, everything looks fine. But when I go to Configuration>Configure jabber account I've got this message :++[[!format sh """+ Jabber not supported+ This build of git-annex does not support Jabber. Sorry !+"""]]++### What version of git-annex are you using? On what operating system?+5.20140117~bpo70+1 and Debian Wheezy with lxde++> Build dependency problem. Fixed and backport updated. [[done]] --[[Joey]]
+ doc/bugs/Mac_OS_git_version_too_old_to_honour_.gitignore.mdwn view
@@ -0,0 +1,38 @@+### Please describe the problem.++Git annex assistant ignores .gitignore file due to packaged git version being too old.++I have a locally installed version that is greater than the 1.8.4 needed to respect .gitignore but git annex doesn't use it.++### What steps will reproduce the problem?++- Create local repository using webapp+- Add .gitignore file to local repository+- Add files that match .gitignore patterns and watch git annex add them++### What version of git-annex are you using? On what operating system?++Git Annex assistant version 5.20140128-g0ac94c3 on Mac OS 10.9.1++### Please provide any additional information below.++Log message is "The installed version of git is too old for .gitignores to be honored by git-annex."++[[!format sh """+# /Applications/git-annex.app/Contents/MacOS/git-annex version+git-annex version: 5.20140128-g0ac94c3+build flags: Assistant Webapp Pairing S3 WebDAV FsEvents XMPP DNS Feeds Quvi TDFA CryptoHash+key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL+remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier hook external++# /Applications/git-annex.app/Contents/MacOS/git --version+git version 1.8.3.4 (Apple Git-47)++# which git+/usr/local/bin/git++# /usr/local/bin/git --version+git version 1.8.5.3+"""]]++> [[fixed|done]]; it has been updated to 1.8.5.3 on the autobuilder. --[[Joey]]
+ doc/bugs/More_build_oddities_under_OpenBSD.mdwn view
@@ -0,0 +1,37 @@+### Please describe the problem.+I have managed to get most things working under OpenBSD 5.4 now.++One of the last hurdles is that if I enable XMPP the build fails on "Loading package gnuidn-0.2.1..."+See the error below.++I suspect this is an error in git-annex because network-protocol-xmpp AND gnuidn compiles (and links) fine.++I will gladly do anything I can to get this working, but I'm at a loss what to do right now. It's the last major piece of the puzzle before I get it properly functioning under OpenBSD.++### What steps will reproduce the problem?+Building with XMPP support under OpenBSD 5.4++### What version of git-annex are you using? On what operating system?+5.20140129 under OpenBSD 5.4++### Please provide any additional information below.++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log+Loading package gnuidn-0.2.1 ... ++GHCi runtime linker: fatal error: I found a duplicate definition for symbol+   c_isascii+whilst processing object file+   /usr/local/lib/libidn.a+This could be caused by:+   * Loading two different object files which export the same symbol+   * Specifying the same object file twice on the GHCi command line+   * An incorrect `package.conf' entry, causing some object to be+     loaded twice.+GHCi cannot safely continue in this situation.  Exiting now.  Sorry.+++# End of transcript or log.+"""]]
@@ -0,0 +1,102 @@+### Please describe the problem.+On Windows 7, the committed symlink files are always relative to the repo's .git root; they are not prefixed with the correct number of ../ for the given level of directing nesting.++Trying to correct this with `git annex fix` returns "You cannot run this command in a direct mode repository."++I believe that this is also the source of a pathological case I'm seeing on Windows.  After adding a lot of content, commands like `git annex sync` and `git annex status` appear to re-checksum the entire annex.  After syncing the repo to a Linux machine, fixing the symlinks there, and syncing back, these commands become snappy again.++### What steps will reproduce the problem?++[[!format sh """+git init+git annex init+mkdir -p one/two/three/four/five/six++# drop files into the dir structure+git annex add .+git annex sync+git log -p+"""]]++### What version of git-annex are you using? On what operating system?++git-annex version: 5.20140203-g83e6fb7++on Windows 7 Pro++### Please provide any additional information below.++The output of `git log -p` for me:++    commit f4d88b6bc99cc94a0b0154da41d06bad3f23cc1e+    Author: Justin Geibel <...>+    Date:   Tue Feb 4 20:56:32 2014 -0500+    +        git-annex automatic sync+    +    diff --git a/git-annex-installer.exe b/git-annex-installer.exe+    new file mode 120000+    index 0000000..64f7d83+    --- /dev/null+    +++ b/git-annex-installer.exe+    @@ -0,0 +1 @@+    +.git/annex/objects/GW/Wk/SHA256E-s14413167--ea3a1e4c09ad12fdb2993a157b77b246a058f7f0ca2cd174d8cc675d1495ec4d.exe/SHA256E-s14413167--ea3a1e4c09ad12fdb2993a157b77b246a058f7f0ca2cd174d8cc675d1495ec4d.exe+    \ No newline at end of file+    diff --git a/one/git-annex-installer(1).exe b/one/git-annex-installer(1).exe+    new file mode 120000+    index 0000000..5b37a29+    --- /dev/null+    +++ b/one/git-annex-installer(1).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/6k/8K/SHA256E-s19286321--add3e1ac7ceabce7aa1ed1907895ae527fc095610d1e21127e99814728b24f11.exe/SHA256E-s19286321--add3e1ac7ceabce7aa1ed1907895ae527fc095610d1e21127e99814728b24f11.exe+    \ No newline at end of file+    diff --git a/one/two/git-annex-installer(2).exe b/one/two/git-annex-installer(2).exe+    new file mode 120000+    index 0000000..f89508f+    --- /dev/null+    +++ b/one/two/git-annex-installer(2).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/Zm/6K/SHA256E-s19573485--4f2a22c5b96308cf694c85564940d3cba22b5e8b3b714b242116c91369be75ee.exe/SHA256E-s19573485--4f2a22c5b96308cf694c85564940d3cba22b5e8b3b714b242116c91369be75ee.exe+    \ No newline at end of file+    diff --git a/one/two/three/four/five/git-annex-installer(5).exe b/one/two/three/four/five/git-annex-installer(5).exe+    new file mode 120000+    index 0000000..34565f9+    --- /dev/null+    +++ b/one/two/three/four/five/git-annex-installer(5).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/p3/Xq/SHA256E-s19956630--ec421bfc6cb0b4df2b5195d9229cbcc27a2e5505e0b879bf07e1be38dcc64a42.exe/SHA256E-s19956630--ec421bfc6cb0b4df2b5195d9229cbcc27a2e5505e0b879bf07e1be38dcc64a42.exe+    \ No newline at end of file+    diff --git a/one/two/three/four/five/six/git-annex-installer(6).exe b/one/two/three/four/five/six/git-annex-installer(6).exe+    new file mode 120000+    index 0000000..d6f97d9+    --- /dev/null+    +++ b/one/two/three/four/five/six/git-annex-installer(6).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/9G/5g/SHA256E-s19967171--c9e33dff779a43e76089ec3bee3411299d5b8abfa67ae1b459cee5a812c5194d.exe/SHA256E-s19967171--c9e33dff779a43e76089ec3bee3411299d5b8abfa67ae1b459cee5a812c5194d.exe+    \ No newline at end of file+    diff --git a/one/two/three/four/git-annex-installer(4).exe b/one/two/three/four/git-annex-installer(4).exe+    new file mode 120000+    index 0000000..a4f791c+    --- /dev/null+    +++ b/one/two/three/four/git-annex-installer(4).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/8J/pM/SHA256E-s19959961--7e4521036f891bba97f4c04527946e26ef43b14576d874c666e73dee405c18cf.exe/SHA256E-s19959961--7e4521036f891bba97f4c04527946e26ef43b14576d874c666e73dee405c18cf.exe+    \ No newline at end of file+    diff --git a/one/two/three/git-annex-installer(3).exe b/one/two/three/git-annex-installer(3).exe+    new file mode 120000+    index 0000000..dda7284+    --- /dev/null+    +++ b/one/two/three/git-annex-installer(3).exe+    @@ -0,0 +1 @@+    +.git/annex/objects/5X/qQ/SHA256E-s19915186--c6dc288ec8a77404c0ebc22cbe9b4ec911103fd022c3ca74eec582604dff80a7.exe/SHA256E-s19915186--c6dc288ec8a77404c0ebc22cbe9b4ec911103fd022c3ca74eec582604dff80a7.exe+    \ No newline at end of file++> [[fixed|done]] -- I didn't notice this before because it happened to do+> the right thing if you cd'd into the subdir before adding the file there.+>+> WRT the slow down issue, I don't see how it could matter to git-annex on+> Windows whether the symlinks point to the right place. It only looks at+> the basename of the symlink target to get the key. If you have a+> repository that behaves poorly, you can probably use --debug to see if+> git-annex is calling some expensive series of git commands somehow.+> --[[Joey]]
doc/bugs/Repository_in_manual_mode_does_not_hold_files.mdwn view
@@ -295,3 +295,11 @@ To ssh://fabian@git-annex-Eifel.fritz.box-fabian_.2Fmnt.2Fraid.2FMedia/mnt/raid/Media/    1eda3be..4c70ad2  git-annex -> synced/git-annex """]]++> The only way a repository can become "unwanted" is if you+> tell git-annex to start deleting it (or perhaps set its group to unwanted+> manually). This will cause git-annex to try to move all files away from+> that repository. +> +> So, AFAICS, this must have been a case of operator error. [[done]]+> --[[Joey]]
doc/bugs/assistant_on_windows_adding_remote_containing_linux_paths.mdwn view
@@ -6,9 +6,18 @@  ### What steps will reproduce the problem? -create a transfer repository on a usb drive (from windows) merge it with a repository on linux, try to merge it on another target windows machine+create a transfer repository on a usb drive (from windows) merge it with a+repository on linux, try to merge it on another target windows machine  ### What version of git-annex are you using? On what operating system?  git-annex version 5.20140128-g29aea74 +> I'm not able to follow the steps to reproduce this, but I think +> I see what the problem is. `isAbsolute` on windows does not think that+> unix-style path is absolute. Such a path can appear in a remote of a git+> repository, particularly if part of that repository was set up on a+> non-Windows system. While the remote won't be usable on Windows with a+> path like that, git-annex should not choke on the path either.+> I have fixed the code to deal with this.+> [[done]] --[[Joey]] 
+ doc/bugs/detected_bad_bare_repository_with___60__SCREECH__62___files.mdwn view
@@ -0,0 +1,73 @@+### Please describe the problem.++Fun one: I have a backup repository created with the assistant. For some reason it's a bare repository, not sure why. It makes my hard drive scream with pain.++### What steps will reproduce the problem?++When I tried `git annex copy --to backup`, I saw this:++[[!format sh """+[2014-01-29 23:46:03 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","show-ref","git-annex"]+[2014-01-29 23:46:04 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","show-ref","--hash","refs/heads/g+[2014-01-29 23:46:11 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..ac42+[2014-01-29 23:46:12 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..9ab4+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..5795+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..8006+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..320e+[2014-01-29 23:46:22 EST] chat: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","cat-file","--batch"]+[2014-01-29 23:46:22 EST] read: git ["config","--null","--list"]+[2014-01-29 23:46:22 EST] call: git ["--git-dir=/media/c7a29cf9-ad3e-42a8-8dd5-0f5618c218ee/mp3/.git","--work-tree=/med+[2014-01-29 23:46:22 EST] read: git ["config","--null","--list"]+[2014-01-29 23:46:22 EST] Detected bad bare repository with+"""]]++Then this stopped and my hard drive started scratching. It makes this horrible screeching sound because it's quite old, hence the bug title.++It seems that this debug message tries to list all the objects in the filesystem, which in this case is quite large:++[[!format haskell """+fixBadBare :: Annex ()+fixBadBare = whenM checkBadBare $ do+        ks <- getKeysPresent+        liftIO $ debugM "Init" $ unwords+                [ "Detected bad bare repository with"+                , show (length ks)+                , "objects; fixing"+                ]+"""]]++Maybe this could be skipped? It takes forever (7 minutes) to compute that length (21353 objects)...++### What version of git-annex are you using? On what operating system?++5.20140102-gd93f946, provided by joeyh as part of [[bugs/assistant_eats_all_CPU/]].++### Please provide any additional information below.++Here's the complete transcript of that copy:++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log++[2014-01-29 23:46:03 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","show-ref","git-annex"]+[2014-01-29 23:46:04 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","show-ref","--hash","refs/heads/g+[2014-01-29 23:46:11 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..ac42+[2014-01-29 23:46:12 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..9ab4+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..5795+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..8006+[2014-01-29 23:46:22 EST] read: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","log","refs/heads/git-annex..320e+[2014-01-29 23:46:22 EST] chat: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","cat-file","--batch"]+[2014-01-29 23:46:22 EST] read: git ["config","--null","--list"]+[2014-01-29 23:46:22 EST] call: git ["--git-dir=/media/c7a29cf9-ad3e-42a8-8dd5-0f5618c218ee/mp3/.git","--work-tree=/med+[2014-01-29 23:46:22 EST] read: git ["config","--null","--list"]+[2014-01-29 23:46:22 EST] Detected bad bare repository with 21353 objects; fixing+[2014-01-29 23:53:06 EST] call: git ["--git-dir=/media/c7a29cf9-ad3e-42a8-8dd5-0f5618c218ee/mp3","config","core.bare","true"]+[2014-01-29 23:53:06 EST] read: git ["config","--null","--list"]+[2014-01-29 23:53:06 EST] chat: git ["--git-dir=/media/c7a29cf9-ad3e-42a8-8dd5-0f5618c218ee/mp3","cat-file","--batch"]+[2014-01-29 23:57:22 EST] call: git ["--git-dir=/srv/mp3/.git","--work-tree=/srv/mp3","config","remote..annex-uuid","c32322fa-8873-4635-8d4c-1dc27977eb6f"]+[2014-01-29 23:57:22 EST] read: git ["config","--null","--list"]+# End of transcript or log.+"""]]++> [[done]] per my comment --[[Joey]]
+ doc/bugs/git-annex_sucking_up_all_available_RAM_after_startup.mdwn view
@@ -0,0 +1,47 @@+Hi.++trying to manage my collection of digital music files using git-annex. The collection (113 gigs of flac files ripped from my CDs) should be stored on my three different machines and updated on all of them, if I add or change a file on only one of the machines.++### Please describe the problem.++Added a new external USB disk for sneaker transfer via web app, yesterday.++Now for no apparent reason, after startup/login, git-annex would start and quickly suck up all available RAM. This is on a fairly well equipped machine (16G physical RAM, i5-2400), yet "top" tells me that there is one git process that sucks up more than 20G and climbing. It looked like this:++    git --git-dir=/home/user/Sync/Audio/.git --work-tree=/home/user/Sync/Audio -c core.bare=false log refs/heads git-annex..13d365f16ffdb5a393f66362b840d3f21bb4c59c --oneline -n1++The computer then slows down, grinds to halt, becomes unresponsive and it's difficult to even login on the console.++Then, the OOM killer kicks in and kicks the git process, but git-annex quickly starts another which does the same.++### What steps will reproduce the problem?++I don't know what caused it. The symptoms remained after a reboot, "git annex watch --stop" didn't help either, since I'm a dumb web app user, I'm not sure if that's the right command to use anyway.++For now, I have removed git-annex from the system.++### What version of git-annex are you using? On what operating system?++Last installed version: git-annex 5.20140127.1 on Ubuntu 13.10, amd64.++### Please provide any additional information below.++I'm fairly unsure where to look for the cause and what logs to provide you with to help fix this. Just guessing that it could be a symptom, but the daemon.log is full of entries like this:++[[!format sh """+# If you can, paste a complete transcript of the problem occurring here.+# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log++("race detected",ca2cbdb84bcbd4aab895284b16fc72f693fbba90,[4a2e7c1d7d286a4da9e816b20368ce2f9b4177c4],"committing",(ca2cbdb84bcbd4aab895284b16fc72f693fbba90,[ca2cbdb84bcbd4aab895284b16fc72f693fbba90]))+(Recording state in git...)+("race detected",28c835634e65ced0e532c1a0e4f34dd0344193bc,[19597be0f49fb859fafa51e006459d5a95e3d005],"committing",(28c835634e65ced0e532c1a0e4f34dd0344193bc,[28c835634e65ced0e532c1a0e4f34dd0344193bc]))+(Recording state in git...)+("race detected",1f2b06c7001be38bd9595eb2205c91454597edaa,[398660279436246a698d6bd55eb06998999ed64f],"committing",(1f2b06c7001be38bd9595eb2205c91454597edaa,[1f2b06c7001be38bd9595eb2205c91454597edaa]))+(Recording state in git...)+("race detected",4c1510c3db41ff400526d5753c03bddc48f5c37e,[1989177cf24ec9151058ed99f05117e48c239001],"committing",(4c1510c3db41ff400526d5753c03bddc48f5c37e,[4c1510c3db41ff400526d5753c03bddc48f5c37e]))+(Recording state in git...)+("race detected",b82f41fcbf24c43fe9f1f9d6fb54ba5ef9ff8de0,[799e4434447b18be63bd097120e1fbf56eac48ce],"committing",(b82f41fcbf24c43fe9f1f9d6fb54ba5ef9ff8de0,[b82f41fcbf24c43fe9f1f9d6fb54ba5ef9ff8de0]))+(Recording state in git...)++# End of transcript or log.+"""]]
+ doc/bugs/ran_once_then_stopped_running_opensuse_13.1.mdwn view
@@ -0,0 +1,12 @@+Installed stand-alone tarball amd64.+I was able to launch webapp. (on laptop)+Created a repository to local home directory.+Then ceated another repository to invite local desktop pc.(this one had all the files i wanted to sync) +Went to dektop and accepted invitation.  But both machines never stopped synching?  and nothing really happened.+so I removed repository on laptop to start fresh.+But now webapp does nothing.  I removed and re-installed a few times but still nothing.+Only as superuser will the webapp attempt to load but fails because it is super user running.+As far as version of git-annex...  it prompted to upgrade and i think i saw a 5 in there somewhere.++and since it won't load anymore i guess there is no log.+
doc/bugs/sync_--content_tries_to_copy_content_to_metadata_only_repos.mdwn view
@@ -25,3 +25,10 @@   rsync failed -- run git annex again to resume file transfer failed """]]++> From the error message, I can see that your origin repository+> has an annex.uuid set (to "03ac7aa9-d14c-4b60-adae-02e4a5ec0fa8").+> So, I assume that, if you don't want git-annex sync to use it,+> you must have remote.origin.annex-ignore set to true. So, I think I fixed+> this a day or two ago when I made sync --content honor the annex-ignore+> setting. [[done]] --[[Joey]] 
doc/bugs/test_failures_on_window_for_5.20131118.mdwn view
@@ -18,3 +18,5 @@ windows 7, NTFS = 2 FAILs  see attachment for full log of git annex test output++> Reproduced and [[fixed|done]]. --[[Joey]]
doc/bugs/tweaks_to_directory_special_remote_doco.mdwn view
@@ -72,3 +72,9 @@   # End of transcript or log.++> Largely applied (except example at the end). I agree these+> changes make it much clearer, especially adding the missing documentation+> of the directory parameter. So, [[done]]. Note that this website is a+> wiki and users like you are welcome to edit pages directly to improve the+> documentation. --[[Joey]]
doc/design/assistant/polls/prioritizing_special_remotes.mdwn view
@@ -6,7 +6,7 @@ Help me prioritize my work: What special remote would you most like to use with the git-annex assistant? -[[!poll open=yes 16 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 9 "Box.com (done)" 71 "My phone (or MP3 player)" 23 "Tahoe-LAFS" 10 "OpenStack SWIFT" 31 "Google Drive"]]+[[!poll open=yes 16 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 9 "Box.com (done)" 71 "My phone (or MP3 player)" 24 "Tahoe-LAFS" 10 "OpenStack SWIFT" 31 "Google Drive"]]  This poll is ordered with the options I consider easiest to build listed first. Mostly because git-annex already supports them and they
doc/design/roadmap.mdwn view
@@ -8,8 +8,8 @@ * Month 2 [[!traillink assistant/disaster_recovery]] * Month 3 user-driven features and polishing [[todo/direct_mode_guard]] [[assistant/upgrading]] * Month 4 [[Windows_webapp|assistant/Windows]], Linux arm, [[todo/support_for_writing_external_special_remotes]]-* **Month 5 user-driven features and polishing**-* Month 6 get [[assistant/Android]] and Windows out of beta+* Month 5 user-driven features and polishing+* **Month 6 get [[assistant/Android]] and Windows out of beta** * Month 7 user-driven features and polishing * Month 8 [[!traillink assistant/telehash]] * Month 9 [[!traillink assistant/gpgkeys]] [[!traillink assistant/sshpassword]]
+ doc/devblog/day_106__catching_up.mdwn view
@@ -0,0 +1,5 @@+While I've not been blogging over what amounted to a long weekend, looking+over the changelog, there were quite a few things done. Mostly various+improvements and fixes to `git annex sync --content`.++Today, got the test suite to pass on Windows 100% again.
+ doc/devblog/day_107__TDD.mdwn view
@@ -0,0 +1,10 @@+A more test driven day than usual. Yesterday I noticed a test case was+failing on Windows in a way not related to what it was intended to test,+and fixed the test case to not fail.. But knew I'd need to get to the+bottom of what broke it eventually.++Digging into that today, I eventually (after rather a long time stuck)+determined the bug involved automatic conflict resolution, but only+happened on systems without symlink support. This let me reproduce it on+FAT outside Windows and do some fast TDD iterations in a much less+unwieldly environment and fix the bug.
+ doc/devblog/day_108__new_use_for_location_tracking.mdwn view
@@ -0,0 +1,20 @@+Added a new feature that started out with me wanting a way to undo a+`git-annex drop`, but turned into something rather more powerful. The `--in`+option can now be told to match files that were in a repository at some+point in the past. For example, `git annex get --in=here@{yesterday}` will+get any files that have been dropped over the past day.++While git-annex's location tracking info is stored in git and so versioned,+very little of it makes use of past versions of the location tracking info+(only `git annex log`). I'm happy to have finally found a use for it!++OB Windows porting: Fixed a bug in the symlink calculation code.+Sounds simple; took 2 hours!++Also various bug triage; updated git version on OSX; forwarded bug about+DAV-0.6 being broken upstream; fixed a bug with initremote in +encryption=pubkey mode. Backlog is 65 messages.++---++Today's work was sponsored by Brock Spratlen.
+ doc/devblog/day_109__elimintating_absNormPath.mdwn view
@@ -0,0 +1,18 @@+git-annex has been using MissingH's `absNormPath` forever, but that's+not very maintained and doesn't work on Windows. I've been+wanting to get rid of it for some time, and finally did today, writing a+`simplifyPath` that does the things git-annex needs and will work with all+the Windows filename craziness, and takes advantage of the more modern+System.FilePath to be quite a simple peice of code. A QuickCheck test found+no important divergences from absNormPath. A good first step to making+git-annex not depend on MissingH at all. ++That fixed one last Windows bug that was disabled in the test suite:+`git annex add ..\subdir\file` will now work.++I am re-installing the Android autobuilder for 2 reasons: I noticed I had+accidentially lost a patch to make a library use the Android SSL cert directory,+and also a new version of GHC is very near to release and so it makes sense+to update.++Down to 38 messages in the backlog.
+ doc/devblog/day_110__release_prep.mdwn view
@@ -0,0 +1,25 @@+Last night I tracked down and fixed a bug in the DAV library that has been+affecting WebDAV remotes. I've been deploying the fix for that today,+including to the android and arm autobuilders. While I finished a clean+reinstall of the android autobuilder, I ran into problems getting a clean+reinstall of the arm autobuilder (some type mismatch error building+yesod-core), so manually fixed its DAV for now.++The WebDAV fix and other recent fixes makes me want to make a release soon,+probably Monday.++ObWindows: Fixed git-annex to not crash when run on Windows+in a git repository that has a remote with a unix-style path +like "/foo/bar". Seems that not everything aggrees on whether such a path+is absolute; even sometimes different parts of the same library disagree!++[[!format haskell """+import System.FilePath.Windows++prop_windows_is_sane :: Bool+prop_windows_is_sane = isAbsolute upath || ("C:\\STUFF" </> upath /= upath)+  where upath = "/foo/bar"+"""]]++Perhaps more interestingly, I've been helping dxtrish port git-annex to+OpenBSD and it seems most of the way there.
+ doc/forum/Can_not_Drop_Unused_Files_With_Spaces.mdwn view
@@ -0,0 +1,20 @@+I have a repository at rsync.net, even though following files are shown as unused I can not drop them.++Running unused,++    git annex unused --from cloud                                            +    unused cloud (checking for unused data...) (checking annex/direct/master...) +      Some annexed data on cloud is not used by any files:+        NUMBER  KEY+        1       SHA256E-s4189547--43aef42540e7f50fc454ab3a2ce4aa28a13b57cccff725359cea0470eb88704b. Bir.mp3+        2       SHA256E-s853765--c0964d3af493d78b7b8393a2aefdd8c290390a03c8cb5cccdcac4647c0fc52a0. 1.jpg+        3       SHA256E-s8706267--e34988b70048a512ad0f431a2a91fa7dd553f96c2bd6caca0bcef928bdfafb93. 3.mp3+      (To see where data was previously used, try: git log --stat -S'KEY')+      +      To remove unwanted data: git-annex dropunused --from cloud NUMBER++show these then running,++    git annex dropunused 1-3 --force++reports ok for each drop operation but rerunning git annex unused --from cloud still shows these three files as unused. I am using git-annex on mac os x (current dmg) on a direct repo. I have similar problems dropping files on the current repo even though I drop unused they still show up as unused.
+ doc/forum/How_does_one_change_the_number_of_simultaneous_uploads.mdwn view
@@ -0,0 +1,3 @@+I want to upload and download more than one file at a time to and from the various remotes.++How do I do that?
+ doc/forum/Remote_server_only_for_the_git_repository.mdwn view
@@ -0,0 +1,3 @@+Hi, I'm using git-annex 5.2014012 with the webapp and I've added two repositories: a remote server and a box.com account. When I add a file it is uploaded properly to both remotes as you would expect.++The problem is that I would like the files to only be uploaded to box.com, and the remote server only store the git repository. Is there any way of saying to git-annex to not sync files to a remote server?
+ doc/forum/alternativeto.net___34__Like__34__.mdwn view
@@ -0,0 +1,3 @@+When I went to alternativeto.net I noticed that SpiderOak is a featured application. I decided to search git-annex and see how "Like"-ed it is in comparison... there were 0 "Like"-s.++I suggest going to http://alternativeto.net/software/git-annex/ and "Like" git-annex.
doc/git-annex.mdwn view
@@ -792,10 +792,6 @@   This can be used to drop content for arbitrary keys, which do not need   to have a file in the git repository pointing at them. -  Example:--        	git annex dropkey SHA1-s10-7da006579dd64330eb2456001fd01948430572f2- * `transferkey`    This plumbing-level command is used to request a single key be@@ -1005,6 +1001,19 @@   or the UUID or description of a repository. For the current repository,   use `--in=here` +* `--in=repository@{date}`++  Matches files currently in the work tree whose content was present in+  the repository on the given date.++  The date is specified in the same syntax documented in+  gitrevisions(7). Note that this uses the reflog, so dates far in the+  past cannot be queried.++  For example, you might need to run `git annex drop .` to temporarily+  free up disk space. The next day, you can get back the files you dropped+  using `git annex get . --in=here@{yesterday}`+ * `--copies=number`    Matches only files that git-annex believes to have the specified number@@ -1214,7 +1223,8 @@  * `annex.sshcaching` -  By default, git-annex caches ssh connections+  By default, git-annex caches ssh connections using ssh's+  ControlMaster and ControlPersist settings   (if built using a new enough ssh). To disable this, set to `false`.  * `annex.alwayscommit`@@ -1379,6 +1389,21 @@   to or from this remote. For example, to force ipv6, and limit   the bandwidth to 100Kbyte/s, set it to `-6 --bwlimit 100` +* `remote.<name>.annex-rsync-upload-options`++  Options to use when using rsync to upload a file to a remote.++  These options are passed after other applicable rsync options,+  so can be used to override them. For example, to limit upload bandwidth+  to 10Kbye/s, set `--bwlimit 10`.++* `remote.<name>.annex-rsync-download-options`++  Options to use when using rsync to download a file from a remote.++  These options are passed after other applicable rsync options,+  so can be used to override them.+ * `remote.<name>.annex-rsync-transport`    The remote shell to use to connect to the rsync remote. Possible@@ -1402,11 +1427,12 @@   precedence over the default GnuPG configuration, which is otherwise   used.) -* `annex.ssh-options`, `annex.rsync-options`, `annex.bup-split-options`,-  `annex.gnupg-options`+* `annex.ssh-options`, `annex.rsync-options`,+  `annex.rsync-upload-options`, `annex.rsync-download-options`,+  `annex.bup-split-options`, `annex.gnupg-options` -  Default ssh, rsync, wget/curl, bup, and GnuPG options to use if a-  remote does not have specific options.+  Default options to use if a remote does not have more specific options+  as described above.  * `annex.web-options` 
doc/how_it_works.mdwn view
@@ -6,13 +6,14 @@  Still reading? Ok. Git's man page calls it "a stupid content tracker". With git-annex, git is instead "a stupid filename and metadata"-tracker. The contents of large files are not stored in git, only the+tracker. The contents of annexed files are not stored in git, only the names of the files and some other metadata remain there.  The contents of the files are kept by git-annex in a distributed key/value store consisting of every clone of a given git repository. That's a fancy way to say that git-annex stores the actual file content somewhere under-`.git/annex/`. (See [[internals]] for details.)+`.git/annex/`. (See [[internals]] for details and note that in+[[direct_mode]] the file contents are left in the work tree.)  That was the values; what about the keys? Well, a key is calculated for a given file when it's first added into git-annex. Normally this uses a hash
+ doc/how_it_works/comment_2_2a8ce5859040d815e6234fc18f5f1961._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawm4cjowB3PaZP00vEr255d1GdUBikE9Qdg"+ nickname="Matthew"+ subject="clarification about what is moved / stored and where"+ date="2014-02-10T12:53:44Z"+ content="""+Just to support Nigel's comment; it's good to be precise and clear about what happens to the files from the start.+I've sent a similar suggestion to the mailing list.++"""]]
doc/install/Windows.mdwn view
@@ -1,18 +1,18 @@-git-annex has recently been ported to Windows!+git-annex now does Windows!  * First, [install git](http://git-scm.com/downloads) * Then, [install git-annex](https://downloads.kitenet.net/git-annex/windows/current/) -This port is in an early state. While it works well enough to use-git-annex, many things will not work. See [[todo/windows_support]] for-current status.+This port is now in reasonably good shape for command-line use of+git-annex. The assistant and webapp are still in an early state.+See [[todo/windows_support]] for current status.  The autobuilder is not currently able to run the test suite, so testing git-annex on Windows is up to you! To check that the build of git-annex works in your Windows system, you are encouraged to run the test suite before using git-annex on real data. After installation, run `git annex test`. There will be a lot of output; the important thing is that it-should end with "All tests ok".+should end with "All tests passed".  ## autobuilds 
+ doc/internals/hashing/comment_1_9153e4f4f9335e524cf1b96a51bef41f._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnlotDRSLW2JVXY3SLSwhrcHteqUHhTtoY"+ nickname="Péter"+ subject="comment 1"+ date="2014-01-31T00:45:47Z"+ content="""+The correct old hash value for the empty file SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is pX/ZJ .++The text describes the old hash value computation incorrectly, because it doesn't mention that 1 bit is skipped between each group of 5 bits. See the sample implementation in display_32bits_as_dir in https://github.com/joeyh/git-annex/blob/master/Locations.hs+"""]]
− doc/news/version_5.20131230.mdwn
@@ -1,20 +0,0 @@-git-annex 5.20131230 released with [[!toggle text="these changes"]]-[[!toggleable text="""-   * Added new external special remote interface.-   * importfeed: Support youtube playlists.-   * Add tasty to build-depends, so that test suite builds again.-     (tasty was stuck in incoming.)-   * Fix typo in test suite.-   * Fix bug in Linux standalone build's shimming that broke git-annex-shell.-   * Include git-receive-pack, git-upload-pack, git, and git-shell wrappers-     in the Linux standalone build, and OSX app, so they will be available-     when it's added to PATH.-   * addurl, importfeed: Sanitize | and some other symbols and special-     characters.-   * Auto-upgrade v3 indirect repos to v5 with no changes.-     This also fixes a problem when a direct mode repo was somehow set to v3-     rather than v4, and so the automatic direct mode upgrade to v5 was not-     done.-   * Android: Avoid trying to use Android's own ionice, which does not-     allow specifying a command to run. Fixes transferring files to/from-     android and probably a few other things."""]]
− doc/news/version_5.20140107.mdwn
@@ -1,26 +0,0 @@-git-annex 5.20140107 released with [[!toggle text="these changes"]]-[[!toggleable text="""-   * mirror: Support --all (and --unused).-   * external special remote protocol: Added GETUUID, GETWANTED, SETWANTED,-     SETSTATE, GETSTATE, DEBUG.-   * Windows: Fix bug in direct mode merge code that could cause files-     in subdirectories to go missing.-   * Windows: Avoid eating stdin when running ssh to add a authorized key,-     since this is used for password prompting.-   * Avoid looping if long-running git cat-file or git hash-object crashes-     and keeps crashing when restarted.-   * Assistant: Remove stale MERGE\_HEAD files in lockfile cleanup.-   * Remotes can now be made read-only, by setting remote.&lt;name&gt;.annex-readonly-   * wanted, schedule: Avoid printing "ok" after requested value.-   * assistant: Ensure that .ssh/config and .ssh/authorized\_keys are not-     group or world writable when writing to those files, as that can make-     ssh refuse to use them, if it allows another user to write to them.-   * addurl, importfeed: Honor annex.diskreserve as long as the size of the-     url can be checked.-   * add: Fix rollback when disk is completely full.-   * assistant: Fixed several minor memory leaks that manifested when-     adding a large number of files.-   * assistant: Start a new git-annex transferkeys process-     after a network connection change, so that remotes that use a persistent-     network connection are restarted.-   * Adjust Debian build deps to match current state of sparc, mipsel."""]]
+ doc/news/version_5.20140210.mdwn view
@@ -0,0 +1,42 @@+git-annex 5.20140210 released with [[!toggle text="these changes"]]+[[!toggleable text="""+   * --in can now refer to files that were located in a repository at+     some past date. For example, --in="here@{yesterday}"+   * Fixed direct mode annexed content locking code, which is used to+     guard against recursive file drops.+   * This is the first beta-level release of the Windows port with important+     fixes (see below).+     (The webapp and assistant are still alpha-level on Windows.)+   * sync --content: Honor annex-ignore configuration.+   * sync: Don't try to sync with xmpp remotes, which are only currently+     supported when using the assistant.+   * sync --content: Re-pull from remotes after downloading content,+     since that can take a while and other changes may be pushed in the+     meantime.+   * sync --content: Reuse smart copy code from copy command, including+     handling and repairing out of date location tracking info.+     Closes: #[737480](http://bugs.debian.org/737480)+   * sync --content: Drop files from remotes that don't want them after+     getting them.+   * sync: Fix bug in automatic merge conflict resolution code when used+     on a filesystem not supporting symlinks, which resulted in it losing+     track of the symlink bit of annexed files.+   * Added ways to configure rsync options to be used only when uploading+     or downloading from a remote. Useful to eg limit upload bandwidth.+   * Fix initremote with encryption=pubkey to work with S3, glacier, webdav,+     and external special remotes.+   * Avoid building with DAV 0.6 which is badly broken (see #737902).+   * Fix dropping of unused keys with spaces in their name.+   * Fix build on platforms not supporting the webapp.+   * Document in man page that sshcaching uses ssh ControlMaster.+     Closes: #[737476](http://bugs.debian.org/737476)+   * Windows: It's now safe to run multiple git-annex processes concurrently+     on Windows; the lock files have been sorted out.+   * Windows: Avoid using unix-compat's rename, which refuses to rename+     directories.+   * Windows: Fix deletion of repositories by test suite and webapp.+   * Windows: Test suite 100% passes again.+   * Windows: Fix bug in symlink calculation code.+   * Windows: Fix handling of absolute unix-style git repository paths.+   * Android: Avoid crashing when unable to set file mode for ssh config file+     due to Android filesystem horribleness."""]]
+ doc/not/comment_12_a0ef1a045257659f0f8722e4987e0ccc._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawkRtPz8CAz_1sBR0Rf-b8OlQQ49v9JxOIE"+ nickname="John"+ subject="re: Not an backup"+ date="2014-02-05T10:45:45Z"+ content="""+@joeyh.name But if I set numcopies=2 it won't let me drop the file right? I don't think we are mean to directly modify the archive; but if we do would git-annex detect the corruption and discourage us from dropping the other file?+"""]]
+ doc/not/comment_13_c5c20576388f18daba3af913b44fb001._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="206.74.132.139"+ subject="comment 13"+ date="2014-02-06T17:00:59Z"+ content="""+Yes, git-annex ensures your configured [[numcopies|copies]] is met before dropping a file.+"""]]
doc/special_remotes/directory.mdwn view
@@ -1,10 +1,12 @@ This special remote type stores file contents in directory.  One use case for this would be if you have a removable drive that-you want to use it to sneakernet files between systems (possibly with+you want to use to sneakernet files between systems (possibly with [[encrypted|encryption]] contents). Just set up both systems to use the drive's mountpoint as a directory remote. +Note that directory remotes have a special directory structure+(by design, the same as the \[[rsync|rsync]] remote). If you just want two copies of your repository with the files "visible" in the tree in both, the directory special remote is not what you want. Instead, you should use a regular `git clone` of your git-annex repository.@@ -13,6 +15,10 @@  These parameters can be passed to `git annex initremote` to configure the remote:++* `directory` - The path to the directory where the files should be stored+  for the remote. The directory must already exist. Typically this will+  be an empty directory, or a directory already used as a directory remote.  * `encryption` - One of "none", "hybrid", "shared", or "pubkey".   See [[encryption]].
doc/sync.mdwn view
@@ -36,3 +36,9 @@ * Run `git annex sync` to save the changes. * Next time you're working on a different clone of that repository,   run `git annex sync` to update it.++Note that by default, `git annex sync` only synchronises the git+repositories, but does not transfer the content of annexed files. If you+want to fully synchronise two repositories content,+you can use `git annex sync --content`. You can also configure+[[preferred_content]] settings to make only some content be synced.
doc/tips/migrating_two_seperate_disconnected_directories_to_git_annex.mdwn view
@@ -18,7 +18,7 @@     git init     git annex init     git annex add .-    git commit -m"git annex yay"+    git commit -m "git annex yay"  This will checksum all files and add them to the `git-annex` branch of the git repository. Wait for this process to complete. 
+ doc/todo/openwrt_package.txt view
@@ -0,0 +1,6 @@+hi++recently i have installed openwrt on my mikrotik routerboard. i am verry suprised how well it works. it lacks git-annex package. openwrt has git and i can install it.++how can i build one on a mips arch ?+is it possible to build multiple architecture standalone binaries ?
+ doc/todo/openwrt_package/comment_1_100d76109e04bc43979775d71b4152ac._comment view
@@ -0,0 +1,12 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="206.74.132.139"+ subject="comment 1"+ date="2014-02-06T17:26:58Z"+ content="""+I would be quite happy if someone took care of adding git-annex to openwrt.++I don't have time to personally handle packaging for different linux distributions myself. What I could do is add mips builds of git-annex to the existing standalone linux builds. These would need to be built the same way the arm builds are done, using a Debian chroot and qemu to run tools from it. This is rather a lot of work for me to set up, and I don't know if I'd have to do it for both little and big endian mips.++Also, it seems that Debian does not currently have a working haskell toolchain for mips. Which may well mean that ghc is not in a working state on mips at all.+"""]]
doc/todo/separate_rsync_bwlimit_options_for_upload_and_download.mdwn view
@@ -1,2 +1,4 @@ The bandwidth for upload and download are often different.  It would be useful to have different settings for upload and download limits. As it is, I have to keep changing annex-rsync-options options between uploads and downloads.++> [[done]] --[[Joey]]
doc/todo/windows_support.mdwn view
@@ -6,7 +6,10 @@ * Does not work with Cygwin's build of git (that git does not consistently   support use of DOS style paths, which git-annex uses on Windows).    Must use Msysgit.-* rsync special remotes are known buggy.+* rsync special remotes with a rsyncurl of a local directory are known+			let r = if inr1 then r1 else r2+  buggy. (git-annex tells rsync C:foo and it thinks it means a remote host+  named C...) * Ssh connection caching does not work on Windows, so `git annex get`   has to connect twice to the remote system over ssh per file, which   is much slower than on systems supporting connection caching.
doc/walkthrough.mdwn view
@@ -15,6 +15,7 @@ 	walkthrough/modifying_annexed_files 	walkthrough/using_ssh_remotes 	walkthrough/moving_file_content_between_repositories+	walkthrough/quiet_please:_When_git-annex_seems_to_skip_files 	walkthrough/using_tags_and_branches 	walkthrough/unused_data 	walkthrough/fsck:_verifying_your_data
doc/walkthrough/adding_files.mdwn view
@@ -7,5 +7,6 @@ 	# git commit -a -m added  When you add a file to the annex and commit it, only a symlink to-the annexed content is committed. The content itself is stored in-git-annex's backend.+the content is committed to git. The content itself is stored in+git-annex's backend, `.git/annex/` (or in [[direct_mode]] the file+is left as-is).
+ doc/walkthrough/quiet_please:_When_git-annex_seems_to_skip_files.mdwn view
@@ -0,0 +1,27 @@+One behavior of git-annex is sometimes confusing at first, but it turns out+to be useful once you get to know it.++	# git annex drop *+	# ++Why didn't git-annex seem to do anything despite being asked to drop all the+files? Because it checked them all, and none of them are present.++Most git-annex commands will behave this way when they're able to quickly+check that nothing needs to be done about a file.++Running a git-annex command without specifying any file name will+make git-annex look for files in the current directory and its+subdirectories. So, we can add all new files to the annex easily:++	# echo hi > subdir/subsubdir/newfile+	# git annex add+	add subdir/subsubdir/newfile ok++When doing this kind of thing, having nothing shown for files+that it doesn't need to act on is useful because it prevents swamping+you with output. You only see the files it finds it does need to act on.++So remember: If git-annex seems to not do anything when you tell it to, it's+not being lazy -- It's checked that nothing needs to be done to get to the+state you asked for!
doc/walkthrough/syncing.mdwn view
@@ -15,13 +15,13 @@ 	push laptop 	ok -After you run sync, the repository will be updated with all changes made to-its remotes, and any changes in the repository will be pushed out to its-remotes, where a sync will get them. This is especially useful when using-git in a distributed fashion, without a -[[central bare repository|tips/centralized_git_repository_tutorial]]. See-[[sync]] for details.+After you run sync, the git repository will be updated with all changes+made to its remotes, and any changes in the git repository will be pushed+out to its remotes, where a sync will get them. This is especially useful+when using git in a distributed fashion, without a [[central bare+repository|tips/centralized_git_repository_tutorial]]. See [[sync]] for+details. -Note that syncing only syncs the metadata about your files that is stored-in git. It does not sync the contents of files, that are managed by-git-annex.+By default `git annex sync` only syncs the metadata about your+files that is stored in git. It does not sync the contents of files, that+are managed by git-annex. To do that, you can use `git annex sync --content`
git-annex.1 view
@@ -729,10 +729,6 @@ This can be used to drop content for arbitrary keys, which do not need to have a file in the git repository pointing at them. .IP-Example:-.IP- git annex dropkey SHA1\-s10\-7da006579dd64330eb2456001fd01948430572f2-.IP .IP "\fBtransferkey\fP" This plumbing\-level command is used to request a single key be transferred. Either the \-\-from or the \-\-to option can be used to specify@@ -912,6 +908,18 @@ or the UUID or description of a repository. For the current repository, use \fB\-\-in=here\fP .IP+.IP "\fB\-\-in=repository@{date}\fP"+Matches files currently in the work tree whose content was present in+the repository on the given date.+.IP+The date is specified in the same syntax documented in+gitrevisions(7). Note that this uses the reflog, so dates far in the+past cannot be queried.+.IP+For example, you might need to run \fBgit annex drop .\fP to temporarily+free up disk space. The next day, you can get back the files you dropped+using \fBgit annex get . \-\-in=here@{yesterday}\fP+.IP .IP "\fB\-\-copies=number\fP" Matches only files that git\-annex believes to have the specified number of copies, or more. Note that it does not check remotes to verify that@@ -1094,7 +1102,8 @@ run \fBgit annex info\fP for memory usage numbers. .IP .IP "\fBannex.sshcaching\fP"-By default, git\-annex caches ssh connections+By default, git\-annex caches ssh connections using ssh's+ControlMaster and ControlPersist settings (if built using a new enough ssh). To disable this, set to \fBfalse\fP. .IP .IP "\fBannex.alwayscommit\fP"@@ -1235,6 +1244,19 @@ to or from this remote. For example, to force ipv6, and limit the bandwidth to 100Kbyte/s, set it to \fB\-6 \-\-bwlimit 100\fP .IP+.IP "\fBremote.<name>.annex\-rsync\-upload\-options\fP"+Options to use when using rsync to upload a file to a remote.+.IP+These options are passed after other applicable rsync options,+so can be used to override them. For example, to limit upload bandwidth+to 10Kbye/s, set \fB\-\-bwlimit 10\fP.+.IP+.IP "\fBremote.<name>.annex\-rsync\-download\-options\fP"+Options to use when using rsync to download a file from a remote.+.IP+These options are passed after other applicable rsync options,+so can be used to override them.+.IP .IP "\fBremote.<name>.annex\-rsync\-transport\fP" The remote shell to use to connect to the rsync remote. Possible values are \fBssh\fP (the default) and \fBrsh\fP, together with their@@ -1255,11 +1277,12 @@ precedence over the default GnuPG configuration, which is otherwise used.) .IP-.IP "\fBannex.ssh\-options\fP, \fBannex.rsync\-options\fP, \fBannex.bup\-split\-options\fP,"-\fBannex.gnupg\-options\fP+.IP "\fBannex.ssh\-options\fP, \fBannex.rsync\-options\fP,"+\fBannex.rsync\-upload\-options\fP, \fBannex.rsync\-download\-options\fP,+\fBannex.bup\-split\-options\fP, \fBannex.gnupg\-options\fP .IP-Default ssh, rsync, wget/curl, bup, and GnuPG options to use if a-remote does not have specific options.+Default options to use if a remote does not have more specific options+as described above. .IP .IP "\fBannex.web\-options\fP" Options to use when using wget or curl to download a file from the web.
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 5.20140129+Version: 5.20140210 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess <joey@kitenet.net>@@ -131,7 +131,8 @@     CPP-Options: -DWITH_S3    if flag(WebDAV)-    Build-Depends: DAV (>= 0.3), http-conduit, xml-conduit, http-types+    Build-Depends: DAV ((>= 0.3 && < 0.6) || > 0.6),+     http-conduit, xml-conduit, http-types     CPP-Options: -DWITH_WEBDAV    if flag(Assistant) && ! os(solaris)
− standalone/android/haskell-patches/gnuidn_fix-build-with-new-base.patch
@@ -1,50 +0,0 @@-From afdec6c9e66211a0ac8419fffe191b059d1fd00c Mon Sep 17 00:00:00 2001-From: foo <foo@bar>-Date: Sun, 22 Sep 2013 17:24:33 +0000-Subject: [PATCH] fix build with new base------ Data/Text/IDN/IDNA.chs       |    1 +- Data/Text/IDN/Punycode.chs   |    1 +- Data/Text/IDN/StringPrep.chs |    1 +- 3 files changed, 3 insertions(+)--diff --git a/Data/Text/IDN/IDNA.chs b/Data/Text/IDN/IDNA.chs-index ed29ee4..dbb4ba5 100644---- a/Data/Text/IDN/IDNA.chs-+++ b/Data/Text/IDN/IDNA.chs-@@ -31,6 +31,7 @@ import Foreign- import Foreign.C- - import Data.Text.IDN.Internal-+import System.IO.Unsafe- - #include <idna.h>- #include <idn-free.h>-diff --git a/Data/Text/IDN/Punycode.chs b/Data/Text/IDN/Punycode.chs-index 24b5fa6..4e62555 100644---- a/Data/Text/IDN/Punycode.chs-+++ b/Data/Text/IDN/Punycode.chs-@@ -32,6 +32,7 @@ import Data.List (unfoldr)- import qualified Data.ByteString as B- import qualified Data.Text as T- -+import System.IO.Unsafe- import Foreign- import Foreign.C- -diff --git a/Data/Text/IDN/StringPrep.chs b/Data/Text/IDN/StringPrep.chs-index 752dc9e..5e9fd84 100644---- a/Data/Text/IDN/StringPrep.chs-+++ b/Data/Text/IDN/StringPrep.chs-@@ -39,6 +39,7 @@ import qualified Data.ByteString as B- import qualified Data.Text as T- import qualified Data.Text.Encoding as TE- -+import System.IO.Unsafe- import Foreign- import Foreign.C- --- -1.7.10.4-
+ standalone/android/haskell-patches/libxml-sax_text-dep.patch view
@@ -0,0 +1,25 @@+From d4c861dbdee34cb2434085b9ece62c416d4cad79 Mon Sep 17 00:00:00 2001+From: androidbuilder <androidbuilder@example.com>+Date: Sat, 8 Feb 2014 17:19:37 +0000+Subject: [PATCH] text dependency++---+ libxml-sax.cabal |    2 +-+ 1 file changed, 1 insertion(+), 1 deletion(-)++diff --git a/libxml-sax.cabal b/libxml-sax.cabal+index 60dba81..d6883bd 100644+--- a/libxml-sax.cabal++++ b/libxml-sax.cabal+@@ -35,7 +35,7 @@ library+   build-depends:+       base >= 4.1 && < 5.0+     , bytestring >= 0.9+-    , text >= 0.7 && < 0.12++    , text+     , xml-types >= 0.3 && < 0.4+ +   exposed-modules:+-- +1.7.10.4+
+ standalone/android/haskell-patches/system-filepath_cross-build.patch view
@@ -0,0 +1,25 @@+From 9345a1ad95cc263f99ef124c7a386fb5aaa5405b Mon Sep 17 00:00:00 2001+From: androidbuilder <androidbuilder@example.com>+Date: Fri, 7 Feb 2014 22:18:12 +0000+Subject: [PATCH] fix++---+ system-filepath.cabal |    2 +-+ 1 file changed, 1 insertion(+), 1 deletion(-)++diff --git a/system-filepath.cabal b/system-filepath.cabal+index d5fbbdd..efdf9ca 100644+--- a/system-filepath.cabal++++ b/system-filepath.cabal+@@ -6,7 +6,7 @@ license-file: license.txt+ author: John Millikin <jmillikin@gmail.com>+ maintainer: John Millikin <jmillikin@gmail.com>+ copyright: John Millikin 2010-2012+-build-type: Custom++build-type: Simple+ cabal-version: >= 1.6+ category: System+ stability: experimental+-- +1.7.10.4+
standalone/android/install-haskell-packages view
@@ -27,8 +27,12 @@  patched () { 	pkg=$1-	shift 1-	cabal unpack $pkg+	ver=$2+	if [ -z "$ver" ]; then+		cabal unpack $pkg+	else+		cabal unpack $pkg-$ver+	fi 	cd $pkg* 	git init 	git config user.name dummy@@ -45,7 +49,7 @@ 			fi 		fi 	done-	cabalinstall "$@"+	cabalinstall 	rm -rf $pkg* 	cd .. }@@ -81,7 +85,9 @@ 	patched profunctors 	patched skein 	patched lens+	patched certificate 	patched persistent-template+	patched system-filepath 	patched wai-app-static 	patched shakespeare 	patched shakespeare-css@@ -95,12 +101,13 @@ 	patched yesod 	patched shakespeare-text 	patched process-conduit-	patched gnuidn 	patched DAV 	patched yesod-static 	patched uuid 	patched dns 	patched gnutls+	patched libxml-sax+	patched network-protocol-xmpp  	cd .. 
standalone/no-th/haskell-patches/DAV_build-without-TH.patch view
@@ -1,27 +1,22 @@-From 67e5fc4eb21fe801f7ab4c01b98c02912c5cb43f Mon Sep 17 00:00:00 2001-From: Joey Hess <joey@kitenet.net>-Date: Wed, 18 Dec 2013 05:44:10 +0000+From a908cec3ae1644d72d04ccc7657433d8335665bc Mon Sep 17 00:00:00 2001+From: dummy <dummy@example.com>+Date: Sat, 8 Feb 2014 17:11:05 +0000 Subject: [PATCH] expand TH -plus manual fixups ---- DAV.cabal                       |  22 +---- Network/Protocol/HTTP/DAV.hs    |  96 +++++++++++++----- Network/Protocol/HTTP/DAV/TH.hs | 232 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 307 insertions(+), 43 deletions(-)+ DAV.cabal                       |   24 +---+ Network/Protocol/HTTP/DAV.hs    |   96 ++++++++++++----+ Network/Protocol/HTTP/DAV/TH.hs |  232 ++++++++++++++++++++++++++++++++++++++-+ 3 files changed, 307 insertions(+), 45 deletions(-)  diff --git a/DAV.cabal b/DAV.cabal-index 1f1eb1f..ea117ff 100644+index 3a755bb..748b0e1 100644 --- a/DAV.cabal +++ b/DAV.cabal-@@ -36,27 +36,7 @@ library-                      , lifted-base >= 0.1-                      , monad-control-                      , mtl >= 2.1--                     , transformers >= 0.3--                     , transformers-base--                     , xml-conduit >= 1.0          && <= 1.2--                     , xml-hamlet >= 0.4           && <= 0.5+@@ -42,29 +42,7 @@ library+                      , transformers-base+                      , xml-conduit >= 1.0          && <= 1.2+                      , xml-hamlet >= 0.4           && <= 0.5 -executable hdav -  main-is:           hdav.hs -  ghc-options:       -Wall@@ -30,24 +25,30 @@ -                     , bytestring -                     , case-insensitive >= 0.4 -                     , containers+-                     , either >= 4.1+-                     , errors -                     , http-client >= 0.2 -                     , http-client-tls >= 0.2 -                     , http-types >= 0.7 -                     , lens >= 3.0 -                     , lifted-base >= 0.1--                     , monad-control+-                     , monad-control >= 0.3.2 -                     , mtl >= 2.1 -                     , network >= 2.3--                     , optparse-applicative+-                     , optparse-applicative >= 0.5.0+-                     , transformers >= 0.3+-                     , transformers-base+-                     , xml-conduit >= 1.0          && <= 1.2+-                     , xml-hamlet >= 0.4           && <= 0.5 +                     , text-                      , transformers >= 0.3-                      , transformers-base-                      , xml-conduit >= 1.0          && <= 1.2+ + source-repository head+   type:     git diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs-index 9d8c070..5993fca 100644+index 94d21bc..c48618f 100644 --- a/Network/Protocol/HTTP/DAV.hs +++ b/Network/Protocol/HTTP/DAV.hs-@@ -77,7 +77,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho+@@ -78,7 +78,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho    import qualified Text.XML as XML  import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName)@@ -56,7 +57,7 @@    import Data.CaseInsensitive (mk)  -@@ -335,28 +335,84 @@ makeCollection url username password = choke $ evalDAVT url $ do+@@ -336,28 +336,84 @@ makeCollection url username password = choke $ evalDAVT url $ do  propname :: XML.Document  propname = XML.Document (XML.Prologue [] Nothing []) root []      where@@ -410,5 +411,5 @@ +     Data.Functor.<$> (_f_a2R5 __userAgent'_a2Re)) +{-# INLINE userAgent #-} -- -1.8.5.1+1.7.10.4 
standalone/no-th/haskell-patches/lens_no-TH.patch view
@@ -1,52 +1,58 @@-From 2b5fa1851a84f58b43e7c4224bd5695a32a80de9 Mon Sep 17 00:00:00 2001+From b9b3cd52735f9ede1a83960968dc1f0e91e061d6 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com>-Date: Wed, 18 Dec 2013 03:27:54 +0000+Date: Fri, 7 Feb 2014 21:49:11 +0000 Subject: [PATCH] avoid TH  ---- lens.cabal                             | 13 +------------- src/Control/Lens.hs                    |  4 ++--- src/Control/Lens/Internal/Exception.hs | 30 ------------------------------- src/Control/Lens/Prism.hs              |  2 --- 4 files changed, 3 insertions(+), 46 deletions(-)+ lens.cabal                              |   14 +-------------+ src/Control/Lens.hs                     |    6 ++----+ src/Control/Lens/Cons.hs                |    2 --+ src/Control/Lens/Internal/Fold.hs       |    2 --+ src/Control/Lens/Internal/Reflection.hs |    2 --+ src/Control/Lens/Prism.hs               |    2 --+ src/Control/Monad/Primitive/Lens.hs     |    1 -+ 7 files changed, 3 insertions(+), 26 deletions(-)  diff --git a/lens.cabal b/lens.cabal-index 8477892..a6ac7a5 100644+index cee2da7..1e467c4 100644 --- a/lens.cabal +++ b/lens.cabal @@ -10,7 +10,7 @@ stability:     provisional  homepage:      http://github.com/ekmett/lens/  bug-reports:   http://github.com/ekmett/lens/issues- copyright:     Copyright (C) 2012-2013 Edward A. Kmett+ copyright:     Copyright (C) 2012-2014 Edward A. Kmett -build-type:    Custom +build-type:    Simple+ -- build-tools:   cpphs  tested-with:   GHC == 7.6.3  synopsis:      Lenses, Folds and Traversals- description:-@@ -173,7 +173,6 @@ library-     containers                >= 0.4.0    && < 0.6,-     distributive              >= 0.3      && < 1,-     filepath                  >= 1.2.0.0  && < 1.4,--    generic-deriving          >= 1.4      && < 1.7,-     ghc-prim,-     hashable                  >= 1.1.2.3  && < 1.3,-     MonadCatchIO-transformers >= 0.3      && < 0.4,-@@ -235,14 +234,12 @@ library+@@ -216,7 +216,6 @@ library+     Control.Exception.Lens+     Control.Lens+     Control.Lens.Action+-    Control.Lens.At+     Control.Lens.Combinators+     Control.Lens.Cons+     Control.Lens.Each+@@ -256,17 +255,14 @@ library+     Control.Lens.Reified      Control.Lens.Review      Control.Lens.Setter-     Control.Lens.Simple -    Control.Lens.TH      Control.Lens.Traversal      Control.Lens.Tuple      Control.Lens.Type      Control.Lens.Wrapped-     Control.Lens.Zipper      Control.Lens.Zoom -    Control.Monad.Error.Lens+     Control.Monad.Primitive.Lens      Control.Parallel.Strategies.Lens      Control.Seq.Lens+-    Data.Aeson.Lens      Data.Array.Lens-@@ -266,12 +263,8 @@ library+     Data.Bits.Lens+     Data.ByteString.Lens+@@ -289,12 +285,8 @@ library      Data.Typeable.Lens      Data.Vector.Lens      Data.Vector.Generic.Lens@@ -58,8 +64,8 @@ -    Language.Haskell.TH.Lens      Numeric.Lens  -   if flag(safe)-@@ -370,7 +363,6 @@ test-suite doctests+   other-modules:+@@ -394,7 +386,6 @@ test-suite doctests        deepseq,        doctest        >= 0.9.1,        filepath,@@ -67,7 +73,7 @@        mtl,        nats,        parallel,-@@ -396,7 +388,6 @@ benchmark plated+@@ -432,7 +423,6 @@ benchmark plated      comonad,      criterion,      deepseq,@@ -75,7 +81,7 @@      lens,      transformers  -@@ -431,7 +422,6 @@ benchmark unsafe+@@ -467,7 +457,6 @@ benchmark unsafe      comonads-fd,      criterion,      deepseq,@@ -83,7 +89,7 @@      lens,      transformers  -@@ -448,6 +438,5 @@ benchmark zipper+@@ -484,6 +473,5 @@ benchmark zipper      comonads-fd,      criterion,      deepseq,@@ -91,77 +97,87 @@      lens,      transformers diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs-index f7c6548..125153e 100644+index 7e15267..bb4d87b 100644 --- a/src/Control/Lens.hs +++ b/src/Control/Lens.hs-@@ -59,7 +59,7 @@ module Control.Lens+@@ -41,7 +41,6 @@+ ----------------------------------------------------------------------------+ module Control.Lens+   ( module Control.Lens.Action+-  , module Control.Lens.At+   , module Control.Lens.Cons+   , module Control.Lens.Each+   , module Control.Lens.Empty+@@ -58,7 +57,7 @@ module Control.Lens+   , module Control.Lens.Reified    , module Control.Lens.Review    , module Control.Lens.Setter-   , module Control.Lens.Simple -#ifndef DISABLE_TEMPLATE_HASKELL +#if 0    , module Control.Lens.TH  #endif    , module Control.Lens.Traversal-@@ -89,7 +89,7 @@ import Control.Lens.Reified+@@ -69,7 +68,6 @@ module Control.Lens+   ) where+ + import Control.Lens.Action+-import Control.Lens.At+ import Control.Lens.Cons+ import Control.Lens.Each+ import Control.Lens.Empty+@@ -86,7 +84,7 @@ import Control.Lens.Prism+ import Control.Lens.Reified  import Control.Lens.Review  import Control.Lens.Setter- import Control.Lens.Simple -#ifndef DISABLE_TEMPLATE_HASKELL +#if 0  import Control.Lens.TH  #endif  import Control.Lens.Traversal-diff --git a/src/Control/Lens/Internal/Exception.hs b/src/Control/Lens/Internal/Exception.hs-index 387203e..bb1ca10 100644---- a/src/Control/Lens/Internal/Exception.hs-+++ b/src/Control/Lens/Internal/Exception.hs-@@ -128,18 +128,6 @@ class Handleable e (m :: * -> *) (h :: * -> *) | h -> e m where-   handler_ l = handler l . const-   {-# INLINE handler_ #-}+diff --git a/src/Control/Lens/Cons.hs b/src/Control/Lens/Cons.hs+index a80e9c8..7d27b80 100644+--- a/src/Control/Lens/Cons.hs++++ b/src/Control/Lens/Cons.hs+@@ -55,8 +55,6 @@ import           Data.Vector.Unboxed (Unbox)+ import qualified Data.Vector.Unboxed as Unbox+ import           Data.Word  --instance Handleable SomeException IO Exception.Handler where--  handler = handlerIO----instance Handleable SomeException m (CatchIO.Handler m) where--  handler = handlerCatchIO----handlerIO :: forall a r. Getting (First a) SomeException a -> (a -> IO r) -> Exception.Handler r--handlerIO l f = reify (preview l) $ \ (_ :: Proxy s) -> Exception.Handler (\(Handling a :: Handling a s IO) -> f a)+-{-# ANN module "HLint: ignore Eta reduce" #-} ---handlerCatchIO :: forall m a r. Getting (First a) SomeException a -> (a -> m r) -> CatchIO.Handler m r--handlerCatchIO l f = reify (preview l) $ \ (_ :: Proxy s) -> CatchIO.Handler (\(Handling a :: Handling a s m) -> f a)+ -- $setup+ -- >>> :set -XNoOverloadedStrings+ -- >>> import Control.Lens+diff --git a/src/Control/Lens/Internal/Fold.hs b/src/Control/Lens/Internal/Fold.hs+index 00e4b66..03c9cd2 100644+--- a/src/Control/Lens/Internal/Fold.hs++++ b/src/Control/Lens/Internal/Fold.hs+@@ -37,8 +37,6 @@ import Data.Maybe+ import Data.Semigroup hiding (Min, getMin, Max, getMax)+ import Data.Reflection+ +-{-# ANN module "HLint: ignore Avoid lambda" #-} -  ------------------------------------------------------------------------------- -- Helpers+ -- Folding  -------------------------------------------------------------------------------@@ -159,21 +147,3 @@ supply = unsafePerformIO $ newIORef 0- -- | This permits the construction of an \"impossible\" 'Control.Exception.Handler' that matches only if some function does.- newtype Handling a s (m :: * -> *) = Handling a+diff --git a/src/Control/Lens/Internal/Reflection.hs b/src/Control/Lens/Internal/Reflection.hs+index bf09f2c..c9e112f 100644+--- a/src/Control/Lens/Internal/Reflection.hs++++ b/src/Control/Lens/Internal/Reflection.hs+@@ -64,8 +64,6 @@ import Data.Word+ import Data.Typeable+ import Data.Reflection  ---- the m parameter exists simply to break the Typeable1 pattern, so we can provide this without overlap.---- here we simply generate a fresh TypeRep so we'll fail to compare as equal to any other TypeRep.--instance Typeable (Handling a s m) where--  typeOf _ = unsafePerformIO $ do--    i <- atomicModifyIORef supply $ \a -> let a' = a + 1 in a' `seq` (a', a)--    return $ mkTyConApp (mkTyCon3 "lens" "Control.Lens.Internal.Exception" ("Handling" ++ show i)) []--  {-# INLINE typeOf #-}------ The @Handling@ wrapper is uninteresting, and should never be thrown, so you won't get much benefit here.--instance Show (Handling a s m) where--  showsPrec d _ = showParen (d > 10) $ showString "Handling ..."--  {-# INLINE showsPrec #-}+-{-# ANN module "HLint: ignore Avoid lambda" #-} ---instance Reifies s (SomeException -> Maybe a) => Exception (Handling a s m) where--  toException _ = SomeException HandlingException--  {-# INLINE toException #-}--  fromException = fmap Handling . reflect (Proxy :: Proxy s)--  {-# INLINE fromException #-}+ class Typeable s => B s where+   reflectByte :: proxy s -> IntPtr+  diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs-index 45b5cfe..88c7ff9 100644+index 9e0bec7..0cf6737 100644 --- a/src/Control/Lens/Prism.hs +++ b/src/Control/Lens/Prism.hs-@@ -53,8 +53,6 @@ import Unsafe.Coerce+@@ -59,8 +59,6 @@ import Unsafe.Coerce  import Data.Profunctor.Unsafe  #endif  @@ -170,6 +186,18 @@  -- $setup  -- >>> :set -XNoOverloadedStrings  -- >>> import Control.Lens+diff --git a/src/Control/Monad/Primitive/Lens.hs b/src/Control/Monad/Primitive/Lens.hs+index ee942c6..2f37134 100644+--- a/src/Control/Monad/Primitive/Lens.hs++++ b/src/Control/Monad/Primitive/Lens.hs+@@ -20,7 +20,6 @@ import Control.Lens+ import Control.Monad.Primitive (PrimMonad(..))+ import GHC.Prim (State#)+ +-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}+ + prim :: (PrimMonad m) => Iso' (m a) (State# (PrimState m) -> (# State# (PrimState m), a #))+ prim = iso internal primitive -- -1.8.5.1+1.7.10.4 
standalone/no-th/haskell-patches/yesod-core_expand_TH.patch view
@@ -1,17 +1,17 @@-From 08cc43788c16fb91f63bc0bd520eeccdcdab477a Mon Sep 17 00:00:00 2001+From 5f30a68faaa379ac3fe9f0b016dd1a20969d548f Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com>-Date: Tue, 17 Dec 2013 17:15:33 +0000+Date: Fri, 7 Feb 2014 23:04:06 +0000 Subject: [PATCH] remove and expand TH  ---- Yesod/Core.hs              |  30 +++---- Yesod/Core/Class/Yesod.hs  | 249 +++++++++++++++++++++++++++++++--------------- Yesod/Core/Dispatch.hs     |  27 ++---- Yesod/Core/Handler.hs      |  25 ++---- Yesod/Core/Internal/Run.hs |   4 +-- Yesod/Core/Internal/TH.hs  | 111 --------------------- Yesod/Core/Widget.hs       |  32 +------ 7 files changed, 209 insertions(+), 269 deletions(-)+ Yesod/Core.hs              |   30 +++---+ Yesod/Core/Class/Yesod.hs  |  248 ++++++++++++++++++++++++++++++--------------+ Yesod/Core/Dispatch.hs     |   37 ++-----+ Yesod/Core/Handler.hs      |   25 ++---+ Yesod/Core/Internal/Run.hs |    4 +-+ Yesod/Core/Internal/TH.hs  |  111 --------------------+ Yesod/Core/Widget.hs       |   32 +-----+ 7 files changed, 209 insertions(+), 278 deletions(-)  diff --git a/Yesod/Core.hs b/Yesod/Core.hs index 12e59d5..2817a69 100644@@ -67,7 +67,7 @@      , renderCssUrl      ) where diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs-index a64d6eb..5dffbfa 100644+index 140600b..6c718e2 100644 --- a/Yesod/Core/Class/Yesod.hs +++ b/Yesod/Core/Class/Yesod.hs @@ -5,11 +5,15 @@@@ -127,7 +127,7 @@        -- | Override the rendering function for a particular URL. One use case for      -- this is to offload static hosting to a different domain name to avoid-@@ -370,45 +383,103 @@ widgetToPageContent w = do+@@ -374,45 +387,103 @@ widgetToPageContent w = do      -- modernizr should be at the end of the <head> http://www.modernizr.com/docs/#installing      -- the asynchronous loader means your page doesn't have to wait for all the js to load      let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc@@ -270,7 +270,7 @@        return $ PageContent title headAll $          case jsLoader master of-@@ -438,10 +509,13 @@ defaultErrorHandler NotFound = selectRep $ do+@@ -442,10 +513,13 @@ defaultErrorHandler NotFound = selectRep $ do          r <- waiRequest          let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r          setTitle "Not Found"@@ -288,7 +288,7 @@      provideRep $ return $ object ["message" .= ("Not Found" :: Text)]    -- For API requests.-@@ -451,10 +525,11 @@ defaultErrorHandler NotFound = selectRep $ do+@@ -455,10 +529,11 @@ defaultErrorHandler NotFound = selectRep $ do  defaultErrorHandler NotAuthenticated = selectRep $ do      provideRep $ defaultLayout $ do          setTitle "Not logged in"@@ -304,7 +304,7 @@        provideRep $ do          -- 401 *MUST* include a WWW-Authenticate header-@@ -476,10 +551,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do+@@ -480,10 +555,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do  defaultErrorHandler (PermissionDenied msg) = selectRep $ do      provideRep $ defaultLayout $ do          setTitle "Permission Denied"@@ -322,7 +322,7 @@      provideRep $          return $ object $ [            "message" .= ("Permission Denied. " <> msg)-@@ -488,30 +566,43 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do+@@ -492,30 +570,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do  defaultErrorHandler (InvalidArgs ia) = selectRep $ do      provideRep $ defaultLayout $ do          setTitle "Invalid Arguments"@@ -377,15 +377,19 @@ +                  id +                    ((Text.Blaze.Internal.preEscapedText . T.pack) +                       "</code> not supported</p>") }-+-     provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= m]+     provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= TE.decodeUtf8With TEE.lenientDecode m]    asyncHelper :: (url -> [x] -> Text) diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs-index df822e2..5583495 100644+index e6f489d..3ff37c1 100644 --- a/Yesod/Core/Dispatch.hs +++ b/Yesod/Core/Dispatch.hs-@@ -6,18 +6,18 @@+@@ -1,4 +1,3 @@+-{-# LANGUAGE TemplateHaskell #-}+ {-# LANGUAGE OverloadedStrings #-}+ {-# LANGUAGE TypeFamilies #-}+ {-# LANGUAGE FlexibleInstances #-}+@@ -6,18 +5,18 @@  {-# LANGUAGE CPP #-}  module Yesod.Core.Dispatch      ( -- * Quasi-quoted routing@@ -414,7 +418,7 @@      , PathMultiPiece (..)      , Texts        -- * Convert to WAI-@@ -124,13 +124,6 @@ toWaiApp site = do+@@ -128,13 +127,6 @@ toWaiAppLogger logger site = do                  , yreSite = site                  , yreSessionBackend = sb                  }@@ -428,8 +432,31 @@      middleware <- mkDefaultMiddlewares logger      return $ middleware $ toWaiAppYre yre  +@@ -163,13 +155,7 @@ warp port site = do+                 ]+             -}+             , Network.Wai.Handler.Warp.settingsOnException = const $ \e ->+-                messageLoggerSource+-                    site+-                    logger+-                    $(qLocation >>= liftLoc)+-                    "yesod-core"+-                    LevelError+-                    (toLogStr $ "Exception from Warp: " ++ show e)++		error (show e)+             }+ + -- | A default set of middlewares.+@@ -194,7 +180,6 @@ mkDefaultMiddlewares logger = do+ -- | Deprecated synonym for 'warp'.+ warpDebug :: YesodDispatch site => Int -> site -> IO ()+ warpDebug = warp+-{-# DEPRECATED warpDebug "Please use warp instead" #-}+ + -- | Runs your application using default middlewares (i.e., via 'toWaiApp'). It+ -- reads port information from the PORT environment variable, as used by tools diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs-index 3581dbc..908256e 100644+index 7c561c5..847d475 100644 --- a/Yesod/Core/Handler.hs +++ b/Yesod/Core/Handler.hs @@ -164,7 +164,7 @@ import           Data.Text.Encoding            (decodeUtf8With, encodeUtf8)@@ -449,7 +476,7 @@    get :: MonadHandler m => m GHState  get = liftHandlerT $ HandlerT $ I.readIORef . handlerState-@@ -743,19 +744,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)+@@ -748,19 +749,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)                 -> m a  redirectToPost url = do      urlText <- toTextUrl url@@ -479,10 +506,10 @@  -- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.  hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html diff --git a/Yesod/Core/Internal/Run.hs b/Yesod/Core/Internal/Run.hs-index 25f51f1..d04d2cd 100644+index 10871a2..6ed631e 100644 --- a/Yesod/Core/Internal/Run.hs +++ b/Yesod/Core/Internal/Run.hs-@@ -15,7 +15,7 @@ import           Control.Exception.Lifted     (catch)+@@ -16,7 +16,7 @@ import           Control.Exception.Lifted     (catch)  import           Control.Monad.IO.Class       (MonadIO)  import           Control.Monad.IO.Class       (liftIO)  import           Control.Monad.Logger         (LogLevel (LevelError), LogSource,@@ -491,7 +518,7 @@  import           Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState)  import qualified Data.ByteString              as S  import qualified Data.ByteString.Char8        as S8-@@ -128,8 +128,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())+@@ -131,8 +131,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())         -> ErrorResponse         -> YesodApp  safeEh log' er req = do@@ -680,5 +707,5 @@  ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message)                   => HtmlUrlI18n message (Route (HandlerSite m)) -- -1.8.5.1+1.7.10.4 
standalone/no-th/haskell-patches/yesod-form_spliced-TH.patch view
@@ -1,19 +1,19 @@-From fbd8f048c239e34625e438a24213534f6f68c3e8 Mon Sep 17 00:00:00 2001+From 9f62992414f900fcafa00a838925e24c4365c50f Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com>-Date: Tue, 17 Dec 2013 18:34:25 +0000-Subject: [PATCH] spliced TH+Date: Fri, 7 Feb 2014 23:11:31 +0000+Subject: [PATCH] splice TH  ---- Yesod/Form/Fields.hs    | 771 ++++++++++++++++++++++++++++++++++++------------- Yesod/Form/Functions.hs | 239 ++++++++++++---- Yesod/Form/Jquery.hs    | 129 ++++++--- Yesod/Form/MassInput.hs | 233 ++++++++++++---- Yesod/Form/Nic.hs       |  65 +++-- yesod-form.cabal        |   1 ++ Yesod/Form/Fields.hs    |  771 +++++++++++++++++++++++++++++++++++------------+ Yesod/Form/Functions.hs |  239 ++++++++++++---+ Yesod/Form/Jquery.hs    |  129 ++++++--+ Yesod/Form/MassInput.hs |  233 +++++++++++---+ Yesod/Form/Nic.hs       |   65 +++-+ yesod-form.cabal        |    1 +  6 files changed, 1127 insertions(+), 311 deletions(-)  diff --git a/Yesod/Form/Fields.hs b/Yesod/Form/Fields.hs-index b2a47c6..016c98b 100644+index 97d0034..016c98b 100644 --- a/Yesod/Form/Fields.hs +++ b/Yesod/Form/Fields.hs @@ -1,4 +1,3 @@@@ -74,7 +74,7 @@   -    , fieldView = \theId name attrs val isReq -> toWidget [hamlet| -$newline never--<input id="#{theId}" name="#{name}" *{attrs} type="number" :isReq:required="" value="#{showVal val}">+-<input id="#{theId}" name="#{name}" *{attrs} type="number" step=1 :isReq:required="" value="#{showVal val}"> -|] +    , fieldView = \theId name attrs val isReq -> toWidget  $     \ _render_arOn +      -> do { id@@ -103,7 +103,7 @@   -    , fieldView = \theId name attrs val isReq -> toWidget [hamlet| -$newline never--<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required="" value="#{showVal val}">+-<input id="#{theId}" name="#{name}" *{attrs} type="number" step=any :isReq:required="" value="#{showVal val}"> -|] +    , fieldView = \theId name attrs val isReq -> toWidget  $     \ _render_arOz +      -> do { id@@ -1789,7 +1789,7 @@      }    where diff --git a/yesod-form.cabal b/yesod-form.cabal-index 9e0c710..a39f71f 100644+index 1f6e0e1..4667861 100644 --- a/yesod-form.cabal +++ b/yesod-form.cabal @@ -19,6 +19,7 @@ library@@ -1798,8 +1798,8 @@                     , shakespeare-css       >= 1.0      && < 1.1 +                   , shakespeare                     , shakespeare-js        >= 1.0.2    && < 1.3-                    , persistent            >= 1.2      && < 1.3+                    , persistent            >= 1.2      && < 1.4                     , template-haskell -- -1.8.5.1+1.7.10.4 
standalone/no-th/haskell-patches/yesod_hack-TH.patch view
@@ -1,12 +1,13 @@-From e3d1ead4f02c2c45e64a1ccad5b461cc6fdabbd2 Mon Sep 17 00:00:00 2001+From 69398345ff1e63bcc6a23fce18e42390328b78d2 Mon Sep 17 00:00:00 2001 From: dummy <dummy@example.com> Date: Tue, 17 Dec 2013 18:48:56 +0000 Subject: [PATCH] hack for TH  ---- Yesod.hs              | 19 ++++++++++++--- Yesod/Default/Util.hs | 69 ++-------------------------------------------------- 2 files changed, 19 insertions(+), 69 deletions(-)+ Yesod.hs              |   19 ++++++++++++--+ Yesod/Default/Main.hs |   23 -----------------+ Yesod/Default/Util.hs |   69 ++-----------------------------------------------+ 3 files changed, 19 insertions(+), 92 deletions(-)  diff --git a/Yesod.hs b/Yesod.hs index b367144..fbe309c 100644@@ -39,6 +40,49 @@ +delete = undefined +insert = undefined ++diff --git a/Yesod/Default/Main.hs b/Yesod/Default/Main.hs+index 0780539..2c73800 100644+--- a/Yesod/Default/Main.hs++++ b/Yesod/Default/Main.hs+@@ -1,10 +1,8 @@+ {-# LANGUAGE CPP                #-}+ {-# LANGUAGE DeriveDataTypeable #-}+ {-# LANGUAGE OverloadedStrings  #-}+-{-# LANGUAGE TemplateHaskell    #-}+ module Yesod.Default.Main+     ( defaultMain+-    , defaultMainLog+     , defaultRunner+     , defaultDevelApp+     , LogFunc+@@ -54,27 +52,6 @@ defaultMain load getApp = do+ + type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()+ +--- | Same as @defaultMain@, but gets a logging function back as well as an+--- @Application@ to install Warp exception handlers.+---+--- Since 1.2.5+-defaultMainLog :: (Show env, Read env)+-               => IO (AppConfig env extra)+-               -> (AppConfig env extra -> IO (Application, LogFunc))+-               -> IO ()+-defaultMainLog load getApp = do+-    config <- load+-    (app, logFunc) <- getApp config+-    runSettings defaultSettings+-        { settingsPort = appPort config+-        , settingsHost = appHost config+-        , settingsOnException = const $ \e -> logFunc+-            $(qLocation >>= liftLoc)+-            "yesod"+-            LevelError+-            (toLogStr $ "Exception from Warp: " ++ show e)+-        } app+-+ -- | Run your application continously, listening for SIGINT and exiting+ --   when received+ -- diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs index a10358e..0547424 100644 --- a/Yesod/Default/Util.hs@@ -136,5 +180,5 @@ -                else return $ Just ex -        else return Nothing -- -1.8.5.1+1.7.10.4 
templates/configurators/ssh/error.hamlet view
@@ -8,5 +8,4 @@     <pre>       #{msg}   <p>-    <a .btn .btn-primary href="#">-     Retry+    To retry setting up the repository, reload this page.