git-annex 3.20130114 → 3.20130124
raw patch · 98 files changed
+1141/−151 lines, 98 filesbinary-added
Files
- Annex/Content/Direct.hs +32/−12
- Annex/Direct.hs +3/−2
- Assistant.hs +33/−20
- Assistant/Alert.hs +6/−0
- Assistant/DaemonStatus.hs +3/−1
- Assistant/Threads/Watcher.hs +1/−0
- Assistant/Types/NamedThread.hs +14/−3
- Assistant/WebApp/Configurators/Edit.hs +2/−1
- Assistant/WebApp/Configurators/Local.hs +3/−3
- Assistant/WebApp/Control.hs +8/−0
- Assistant/WebApp/Notifications.hs +1/−1
- Assistant/WebApp/Utility.hs +1/−1
- Assistant/WebApp/routes +1/−0
- CHANGELOG +31/−0
- CONTRIBUTING +0/−7
- Command/Drop.hs +8/−7
- Command/Fsck.hs +14/−0
- Command/PreCommit.hs +1/−1
- Command/Sync.hs +6/−1
- Command/WebApp.hs +23/−21
- Git/UnionMerge.hs +9/−3
- Messages.hs +11/−3
- Option.hs +1/−10
- Types/StandardGroups.hs +16/−1
- Utility/Daemon.hs +12/−6
- Utility/Gpg.hs +4/−1
- Utility/LogFile.hs +13/−2
- Utility/WebApp.hs +4/−8
- debian/changelog +31/−0
- debian/control +1/−1
- doc/assistant/logs.png binary
- doc/assistant/release_notes.mdwn +6/−2
- doc/bugs/Annex_thinks_file_exists_afer_being_dropped.mdwn +27/−0
- doc/bugs/Error_creating_remote_repository_using_ssh_on_OSX.mdwn +35/−0
- doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn +4/−0
- doc/bugs/OSX_app_issues/comment_10_54d8f3e429df9a9958370635c890abf0._comment +11/−0
- doc/bugs/OSX_app_issues/comment_11_bb2ceb95a844449795addee6986d0763._comment +26/−0
- doc/bugs/OSX_app_issues/comment_9_2e6dfca0fd8df04066769653724eae28._comment +17/−0
- doc/bugs/S3_upload_not_using_multipart.mdwn +53/−0
- doc/bugs/With_S3__44___GPG_ask_for_a_new_passphrase.mdwn +21/−0
- doc/bugs/encryption_given_a_gpg_keyid_still_uses_symmetric_encryption.mdwn +8/−0
- doc/bugs/fsck_should_double-check_when_a_content-check_fails.mdwn +2/−0
- doc/bugs/get_failed__44___but_remote_has_the_file.mdwn +35/−0
- doc/bugs/git-annex:_Not_in_a_git_repository._.mdwn +19/−0
- doc/bugs/internal_server_error_creating_repo_on_ssh_server.mdwn +24/−0
- doc/bugs/uninit_does_not_abort_when_hard_link_creation_fails.mdwn +41/−0
- doc/bugs/webapp_requires_reload_for_notification_bubbles.mdwn +5/−1
- doc/contributing.mdwn +0/−7
- doc/design/assistant/blog/day_171__logs.mdwn +23/−0
- doc/design/assistant/blog/day_172__short_day.mdwn +22/−0
- doc/design/assistant/blog/day_173__snow_day.mdwn +22/−0
- doc/design/assistant/blog/day_174__last_weekend_before_AU.mdwn +25/−0
- doc/design/assistant/blog/day_175__pacific_features.mdwn +15/−0
- doc/design/assistant/more_cloud_providers.mdwn +1/−0
- doc/design/assistant/polls/prioritizing_special_remotes.mdwn +1/−1
- doc/design/assistant/webapp.mdwn +0/−2
- doc/direct_mode.mdwn +20/−9
- doc/forum/Building_a_Debian_package_of_git-annex.mdwn +27/−0
- doc/forum/How_to_delete_a_remote__63__.mdwn +1/−0
- doc/forum/How_to_prevent_the_assistant_from_downloading_all_data__63__.mdwn +9/−0
- doc/forum/How_to_rename_a_remote__63__.mdwn +1/−0
- doc/forum/No_SSL_traffic_for_S3__63__.mdwn +8/−0
- doc/forum/Running_assistant_on_a_server___40__no_X_available__41__.mdwn +2/−0
- doc/forum/one_or_many_annexes__63__.mdwn +7/−0
- doc/forum/switching_to__47__from_direct_mode_while_assistant_is_running.mdwn +2/−0
- doc/index.mdwn +1/−0
- doc/install/OSX.mdwn +1/−1
- doc/install/OSX/comment_10_cd2120552ef894a37933b328136fa4cc._comment +8/−0
- doc/install/OSX/comment_3_47a77a03040fe628109bd54f82f9ad7a._comment +17/−0
- doc/install/OSX/comment_4_25cac8bcd84a5210fc0a5243260b8cc7._comment +18/−0
- doc/install/OSX/comment_5_39b4b748b4586bf32b37edfefef84bba._comment +8/−0
- doc/install/OSX/comment_6_1a9c91ef43edc4148947f202ff604114._comment +8/−0
- doc/install/OSX/comment_7_892f7e65f95f43697164267c4b71c0d5._comment +8/−0
- doc/install/OSX/comment_8_38d9c2eea1090674de2361274eab5b0e._comment +29/−0
- doc/install/OSX/comment_9_35bf3812db6f3ef25da9b3bc84f147c5._comment +8/−0
- doc/install/Ubuntu.mdwn +3/−0
- doc/news/version_3.20130124.mdwn +28/−0
- doc/preferred_content.mdwn +23/−0
- doc/related_software.mdwn +11/−0
- doc/special_remotes/S3/comment_7_6af9781004d982d8e6b20a83ad29eead._comment +8/−0
- doc/special_remotes/S3/comment_8_0fa68d584ee7f6b5c9058fba7e911a11._comment +12/−0
- doc/special_remotes/bup.mdwn +1/−1
- doc/special_remotes/comment_1_961276c18e9353ca8e25cad53e7ec51f._comment +8/−0
- doc/special_remotes/comment_2_97543acfa7434e332ebea5672e446317._comment +8/−0
- doc/special_remotes/comment_3_9229776623c234204c8b164edff95da0._comment +8/−0
- doc/special_remotes/comment_4_3bbda479d13f6bf393dcd59ed94ddeaa._comment +10/−0
- doc/special_remotes/comment_5_f7000975d38077828ab11a99095b39eb._comment +8/−0
- doc/todo/add_an_icon_for_the_.desktop_file.mdwn +1/−0
- doc/todo/wishlist:_Option_to_specify_max_transfer_rate.mdwn +3/−0
- doc/todo/wishlist:_disable_automatic_commits.mdwn +22/−4
- doc/todo/wishlist:_special_remote_mega.co.nz.mdwn +1/−0
- git-annex.cabal +1/−1
- templates/control/log.hamlet +6/−0
- templates/controlmenu.hamlet +2/−0
- templates/documentation/repogroup.hamlet +11/−1
- templates/error.hamlet +3/−0
- templates/notifications/longpolling.julius +1/−1
- test.hs +43/−4
Annex/Content/Direct.hs view
@@ -29,7 +29,7 @@ import System.Posix.Types -{- Files in the tree that are associated with a key. -}+{- Absolute FilePaths of Files in the tree that are associated with a key. -} associatedFiles :: Key -> Annex [FilePath] associatedFiles key = do files <- associatedFilesRelative key@@ -41,33 +41,53 @@ associatedFilesRelative :: Key -> Annex [FilePath] associatedFilesRelative key = do mapping <- inRepo $ gitAnnexMapping key- liftIO $ catchDefaultIO [] $ lines <$> readFile mapping+ liftIO $ catchDefaultIO [] $ do+ h <- openFile mapping ReadMode+ fileEncoding h+ lines <$> hGetContents h {- Changes the associated files information for a key, applying a- - transformation to the list. Returns a copy of the new info. -}+ - transformation to the list. Returns new associatedFiles value. -} changeAssociatedFiles :: Key -> ([FilePath] -> [FilePath]) -> Annex [FilePath] changeAssociatedFiles key transform = do mapping <- inRepo $ gitAnnexMapping key files <- associatedFilesRelative key let files' = transform files when (files /= files') $- liftIO $ viaTmp writeFile mapping $ unlines files'- return files'+ liftIO $ viaTmp write 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 an associated file. Returns new associatedFiles value. -} removeAssociatedFile :: Key -> FilePath -> Annex [FilePath] removeAssociatedFile key file = do- fs <- changeAssociatedFiles key $ filter (/= normalise file)+ file' <- normaliseAssociatedFile file+ fs <- changeAssociatedFiles key $ filter (/= file') when (null fs) $ logStatus key InfoMissing return fs +{- Adds an associated file. Returns new associatedFiles value. -} addAssociatedFile :: Key -> FilePath -> Annex [FilePath]-addAssociatedFile key file = changeAssociatedFiles key $ \files ->- if file' `elem` files- then files- else file':files- where- file' = normalise file+addAssociatedFile key file = do+ file' <- normaliseAssociatedFile file+ changeAssociatedFiles key $ \files -> do+ if file' `elem` files+ then files+ else file':files++{- Associated files are always stored relative to the top of the repository.+ - The input FilePath is relative to the CWD. -}+normaliseAssociatedFile :: FilePath -> Annex FilePath+normaliseAssociatedFile file = do+ top <- fromRepo Git.repoPath+ liftIO $ relPathDirToFile top <$> absPath file {- Checks if a file in the tree, associated with a key, has not been modified. -
Annex/Direct.hs view
@@ -172,7 +172,8 @@ toDirectGen k f = do loc <- inRepo $ gitAnnexLocation k createContentDir loc -- thaws directory too- locs <- filter (/= normalise f) <$> addAssociatedFile k f+ absf <- liftIO $ absPath f+ locs <- filter (/= absf) <$> addAssociatedFile k f case locs of [] -> ifM (liftIO $ doesFileExist loc) ( return $ Just $ do@@ -182,7 +183,7 @@ liftIO $ replaceFile f $ moveFile loc , return Nothing )- (loc':_) -> ifM (liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc')+ (loc':_) -> ifM (liftIO $ catchBoolIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc') {- Another direct file has the content; copy it. -} ( return $ Just $ do liftIO $ replaceFile f $
Assistant.hs view
@@ -163,28 +163,40 @@ stopDaemon :: Annex () stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile -startDaemon :: Bool -> Bool -> Maybe (String -> FilePath -> IO ()) -> Annex ()-startDaemon assistant foreground webappwaiter- | foreground = do- showStart (if assistant then "assistant" else "watch") "."- liftIO . Utility.Daemon.lockPidFile =<< fromRepo gitAnnexPidFile- go id- | otherwise = do- logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile- pidfile <- fromRepo gitAnnexPidFile- go $ Utility.Daemon.daemonize logfd (Just pidfile) False+{- Starts the daemon. If the daemon is run in the foreground, once it's+ - running, can start the browser.+ -+ - startbrowser is passed the url and html shim file, as well as the original+ - stdout and stderr descriptors. -}+startDaemon :: Bool -> Bool -> Maybe (Maybe Handle -> Maybe Handle -> String -> FilePath -> IO ()) -> Annex ()+startDaemon assistant foreground startbrowser = do+ pidfile <- fromRepo gitAnnexPidFile+ logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile+ if foreground+ then do+ liftIO $ Utility.Daemon.lockPidFile pidfile+ origout <- liftIO $ catchMaybeIO $ + fdToHandle =<< dup stdOutput+ origerr <- liftIO $ catchMaybeIO $ + fdToHandle =<< dup stdError+ liftIO $ Utility.Daemon.redirLog logfd+ showStart (if assistant then "assistant" else "watch") "."+ start id $ + case startbrowser of+ Nothing -> Nothing+ Just a -> Just $ a origout origerr+ else+ start (Utility.Daemon.daemonize logfd (Just pidfile) False) Nothing where- go d = startAssistant assistant d webappwaiter+ start daemonize webappwaiter = withThreadState $ \st -> do+ checkCanWatch+ when assistant $ checkEnvironment+ dstatus <- startDaemonStatus+ liftIO $ daemonize $+ flip runAssistant (go webappwaiter) + =<< newAssistantData st dstatus -startAssistant :: Bool -> (IO () -> IO ()) -> Maybe (String -> FilePath -> IO ()) -> Annex ()-startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do- checkCanWatch- when assistant $ checkEnvironment- dstatus <- startDaemonStatus- liftIO $ daemonize $- flip runAssistant go =<< newAssistantData st dstatus- where- go = do+ go webappwaiter = do d <- getAssistant id #ifdef WITH_WEBAPP urlrenderer <- liftIO newUrlRenderer@@ -216,6 +228,7 @@ , assist $ glacierThread , watch $ watchThread ]+ liftIO waitForTermination watch a = (True, a)
Assistant/Alert.hs view
@@ -120,6 +120,12 @@ renderAlertMessage alert = renderTense (alertTense alert) $ (alertMessageRender alert) (alertData alert) +showAlert :: Alert -> String+showAlert alert = T.unpack $ T.unwords $ catMaybes+ [ renderAlertHeader alert+ , Just $ renderAlertMessage alert+ ]+ alertTense :: Alert -> Tense alertTense alert | alertClass alert == Activity = Present
Assistant/DaemonStatus.hs view
@@ -186,7 +186,9 @@ {- Returns the alert's identifier, which can be used to remove it. -} addAlert :: Alert -> Assistant AlertId-addAlert alert = notifyAlert `after` modifyDaemonStatus add+addAlert alert = do+ notice [showAlert alert]+ notifyAlert `after` modifyDaemonStatus add where add s = (s { lastAlertId = i, alertMap = m }, i) where
Assistant/Threads/Watcher.hs view
@@ -97,6 +97,7 @@ void $ liftIO $ cleanup liftAnnex $ showAction "started"+ liftIO $ putStrLn "" modifyDaemonStatus_ $ \s -> s { scanComplete = True }
Assistant/Types/NamedThread.hs view
@@ -5,7 +5,12 @@ - Licensed under the GNU GPL version 3 or higher. -} -module Assistant.Types.NamedThread where+module Assistant.Types.NamedThread (+ ThreadName,+ NamedThread(..),+ debug,+ notice,+) where import Common.Annex import Assistant.Monad@@ -16,6 +21,12 @@ data NamedThread = NamedThread ThreadName (Assistant ()) debug :: [String] -> Assistant ()-debug ws = do+debug = logaction debugM++notice :: [String] -> Assistant ()+notice = logaction noticeM++logaction :: (String -> String -> IO ()) -> [String] -> Assistant ()+logaction a ws = do name <- getAssistant threadName- liftIO $ debugM name $ unwords $ (name ++ ":") : ws+ liftIO $ a name $ unwords $ (name ++ ":") : ws
Assistant/WebApp/Configurators/Edit.hs view
@@ -24,6 +24,7 @@ import qualified Git import qualified Git.Command import qualified Git.Config+import Git.Remote import qualified Data.Text as T import qualified Data.Map as M@@ -64,7 +65,7 @@ RepoGroupCustom s -> groupSet uuid $ S.fromList $ words s when (repoSyncable oldc /= repoSyncable newc) $ changeSyncable mremote (repoSyncable newc)- when (isJust mremote && repoName oldc /= repoName newc) $ do+ when (isJust mremote && makeLegalName (T.unpack $ repoName oldc) /= makeLegalName (T.unpack $ repoName newc)) $ do runAnnex undefined $ do name <- fromRepo $ uniqueRemoteName (T.unpack $ repoName newc) 0 {- git remote rename expects there to be a
Assistant/WebApp/Configurators/Local.hs view
@@ -199,10 +199,10 @@ {- The repo may already exist, when adding removable media - that has already been used elsewhere. -} makerepo dir = liftIO $ do- r <- E.try (inDir dir $ return True) :: IO (Either E.SomeException Bool)+ r <- E.try (inDir dir $ getUUID) :: IO (Either E.SomeException UUID) case r of- Right _ -> noop- Left _e -> do+ Right u | u /= NoUUID -> noop+ _ -> do createDirectoryIfMissing True dir makeRepo dir True {- Each repository is made a remote of the other. -}
Assistant/WebApp/Control.hs view
@@ -11,6 +11,7 @@ import Assistant.WebApp.Common import Locations.UserConfig+import Utility.LogFile import Control.Concurrent import System.Posix (getProcessID, signalProcess, sigTERM)@@ -40,3 +41,10 @@ where restartcommand program = program ++ " assistant --stop; " ++ program ++ " webapp"++getLogR :: Handler RepHtml+getLogR = page "Logs" Nothing $ do+ logfile <- lift $ runAnnex undefined $ fromRepo gitAnnexLogFile+ logs <- liftIO $ listLogs logfile+ logcontent <- liftIO $ concat <$> mapM readFile logs+ $(widgetFile "control/log")
Assistant/WebApp/Notifications.hs view
@@ -39,7 +39,7 @@ #ifdef WITH_OLD_YESOD let delay = show ms_delay let startdelay = show ms_startdelay- let ident = tident+ let ident = "'" ++ T.unpack tident ++ "'" #else let delay = Aeson.String (T.pack (show ms_delay)) let startdelay = Aeson.String (T.pack (show ms_startdelay))
Assistant/WebApp/Utility.hs view
@@ -88,7 +88,7 @@ | otherwise = killThread tid {- In order to stop helper processes like rsync, - kill the whole process group of the process running the transfer. -}- killproc pid = do+ killproc pid = void $ catchMaybeIO $ do g <- getProcessGroupIDOf pid void $ tryIO $ signalProcessGroup sigTERM g threadDelay 50000 -- 0.05 second grace period
Assistant/WebApp/routes view
@@ -8,6 +8,7 @@ /shutdown ShutdownR GET /shutdown/confirm ShutdownConfirmedR GET /restart RestartR GET+/log LogR GET /config ConfigurationR GET /config/repository RepositoriesR GET
CHANGELOG view
@@ -1,3 +1,34 @@+git-annex (3.20130124) unstable; urgency=low++ * Added source repository group, that only retains files until they've+ been transferred to another repository. Useful for things like+ repositories on cameras.+ * Added manual repository group. Use to prevent the assistant from+ downloading any file contents to keep things in sync. Instead+ `git annex get`, `git annex drop` etc can be used manually as desired.+ * webapp: More adjustments to longpoll code to deal with changes in+ variable quoting in different versions of shakespeare-js.+ * webapp: Avoid an error if a transfer is stopped just as it finishes.+ Closes: #698184 + * webapp: Now always logs to .git/annex/daemon.log+ * webapp: Has a page to view the log, accessed from the control menu.+ * webapp: Fix crash adding removable drive that has an annex directory+ in it that is not a git repository.+ * Deal with incompatability in gpg2, which caused prompts for encryption+ passphrases rather than using the supplied --passphrase-fd.+ * bugfix: Union merges involving two or more repositories could sometimes+ result in data from one repository getting lost. This could result+ in the location log data becoming wrong, and fsck being needed to fix it.+ * sync: Automatic merge conflict resolution now stages deleted files.+ * Depend on git 1.7.7.6 for --no-edit. Closes: #698399+ * Fix direct mode mapping code to always store direct mode filenames+ relative to the top of the repository, even when operating inside a+ subdirectory.+ * fsck: Detect and fix consistency errors in direct mode mapping files.+ * Avoid filename encoding errors when writing direct mode mappings.++ -- Joey Hess <joeyh@debian.org> Tue, 22 Jan 2013 07:11:59 +1100+ git-annex (3.20130114) unstable; urgency=low * Now handles the case where a file that's being transferred to a remote
− CONTRIBUTING
@@ -1,7 +0,0 @@-## Style--This project uses tabs for indentation and the code looks fine with-any tab width. If you are using Emacs, and have it configured to use-spaces for indentation, then you can add a `./.dir-locals.el` to use-tabs for files in this project. See-<http://www.emacswiki.org/emacs/DirectoryVariables>.
Command/Drop.hs view
@@ -108,21 +108,22 @@ findCopies key need skip have check findCopies :: Key -> Int -> [UUID] -> [UUID] -> [Remote] -> Annex Bool-findCopies key need skip = helper []+findCopies key need skip = helper [] [] where- helper bad have []+ helper bad missing have [] | length have >= need = return True- | otherwise = notEnoughCopies key need have skip bad- helper bad have (r:rs)+ | otherwise = notEnoughCopies key need have (skip++missing) bad+ helper bad missing have (r:rs) | length have >= need = return True | otherwise = do let u = Remote.uuid r let duplicate = u `elem` have haskey <- Remote.hasKey r key case (duplicate, haskey) of- (False, Right True) -> helper bad (u:have) rs- (False, Left _) -> helper (r:bad) have rs- _ -> helper bad have rs+ (False, Right True) -> helper bad missing (u:have) rs+ (False, Left _) -> helper (r:bad) missing have rs+ (False, Right False) -> helper bad (u:missing) have rs+ _ -> helper bad missing have rs notEnoughCopies :: Key -> Int -> [UUID] -> [UUID] -> [Remote] -> Annex Bool notEnoughCopies key need have skip bad = do
Command/Fsck.hs view
@@ -110,6 +110,7 @@ -- order matters [ fixLink key file , verifyLocationLog key file+ , verifyDirectMapping key file , checkKeySize key , checkBackend backend key , checkKeyNumCopies key file numcopies@@ -257,6 +258,19 @@ fix s = do showNote "fixing location log" bad s++{- Ensures the direct mode mapping file is consistent. Each file+ - it lists for the key should exist, and the specified file should be+ - included in it.+ -}+verifyDirectMapping :: Key -> FilePath -> Annex Bool+verifyDirectMapping key file = do+ whenM isDirect $ do+ fs <- addAssociatedFile key file+ forM_ fs $ \f -> + unlessM (liftIO $ doesFileExist f) $+ void $ removeAssociatedFile key f+ return True {- The size of the data for a key is checked against the size encoded in - the key's metadata, if available.
Command/PreCommit.hs view
@@ -20,7 +20,7 @@ seek :: [CommandSeek] seek = [ whenNotDirect $ withFilesToBeCommitted $ whenAnnexed $ Command.Fix.start- , withFilesUnlockedToBeCommitted start]+ , whenNotDirect $ withFilesUnlockedToBeCommitted start] start :: FilePath -> CommandStart start file = next $ perform file
Command/Sync.hs view
@@ -223,11 +223,16 @@ top <- fromRepo Git.repoPath (fs, cleanup) <- inRepo (LsFiles.unmerged [top]) merged <- all id <$> mapM resolveMerge' fs+ void $ liftIO cleanup++ (deleted, cleanup2) <- inRepo (LsFiles.deleted [top])+ Annex.Queue.addCommand "rm" [Params "--quiet -f --"] deleted+ void $ liftIO cleanup2+ when merged $ do Annex.Queue.flush void $ inRepo $ Git.Command.runBool "commit" [Param "-m", Param "git-annex automatic merge conflict fix"]- void $ liftIO cleanup return merged resolveMerge' :: LsFiles.Unmerged -> Annex Bool
Command/WebApp.hs view
@@ -16,7 +16,7 @@ import Assistant.WebApp import Assistant.Install import Utility.WebApp-import Utility.Daemon (checkDaemon, lockPidFile)+import Utility.Daemon (checkDaemon) import Init import qualified Git import qualified Git.Config@@ -27,6 +27,7 @@ import System.Posix.Directory import Control.Concurrent import Control.Concurrent.STM+import System.Process (env, std_out, std_err) def :: [Command] def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $ notBareRepo $@@ -48,9 +49,10 @@ browser <- fromRepo webBrowser f <- liftIO . absPath =<< fromRepo gitAnnexHtmlShim ifM (checkpid <&&> checkshim f)- ( liftIO $ openBrowser browser f - , startDaemon True True $ Just $- const $ openBrowser browser+ ( liftIO $ openBrowser browser f Nothing Nothing+ , startDaemon True True $ Just $ + \origout origerr _url htmlshim ->+ openBrowser browser htmlshim origout origerr ) auto | allowauto = liftIO startNoRepo@@ -117,30 +119,30 @@ takeMVar v mainthread v _url htmlshim = do browser <- maybe Nothing webBrowser <$> Git.Config.global- openBrowser browser htmlshim+ openBrowser browser htmlshim Nothing Nothing _wait <- takeMVar v state <- Annex.new =<< Git.CurrentRepo.get- Annex.eval state $ do- dummydaemonize- startAssistant True id $ Just $ sendurlback v- sendurlback v url _htmlshim = putMVar v url-- {- Set up the pid file in the new repo. -}- dummydaemonize = liftIO . lockPidFile =<< fromRepo gitAnnexPidFile+ Annex.eval state $+ startDaemon True True $ Just $ sendurlback v+ sendurlback v _origout _origerr url _htmlshim = putMVar v url -openBrowser :: Maybe FilePath -> FilePath -> IO ()-openBrowser cmd htmlshim = go $ maybe runBrowser runCustomBrowser cmd+openBrowser :: Maybe FilePath -> FilePath -> Maybe Handle -> Maybe Handle -> IO ()+openBrowser cmd htmlshim outh errh = do+ hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url+ environ <- cleanEnvironment+ (_, _, _, pid) <- createProcess p+ { env = environ+ , std_out = maybe Inherit UseHandle outh+ , std_err = maybe Inherit UseHandle errh+ }+ exitcode <- waitForProcess pid+ unless (exitcode == ExitSuccess) $+ hPutStrLn (fromMaybe stderr errh) "failed to start web browser" where url = fileUrl htmlshim- go a = do- putStrLn ""- putStrLn $ "Launching web browser on " ++ url- env <- cleanEnvironment- unlessM (a url env) $- error $ "failed to start web browser"- runCustomBrowser c u = boolSystemEnv c [Param u]+ p = proc (fromMaybe browserCommand cmd) [htmlshim] {- web.browser is a generic git config setting for a web browser program -} webBrowser :: Git.Repo -> Maybe FilePath
Git/UnionMerge.hs view
@@ -38,10 +38,16 @@ catFileStop h {- Merges a list of branches into the index. Previously staged changes in- - the index are preserved (and participate in the merge). -}+ - the index are preserved (and participate in the merge).+ -+ - update-index is run once per ref in turn, so that each ref is merged on+ - top of the merge for the previous ref. It would be more efficient, but+ - harder to calculate a single union merge involving all the refs, as well+ - as the index.+ -} mergeIndex :: CatFileHandle -> Repo -> [Ref] -> IO ()-mergeIndex h repo bs =- streamUpdateIndex repo $ map (\b -> mergeTreeIndex b h repo) bs+mergeIndex h repo bs = forM_ bs $ \b ->+ streamUpdateIndex repo [mergeTreeIndex b h repo] {- For merging two trees. -} mergeTrees :: Ref -> Ref -> CatFileHandle -> Repo -> Streamer
Messages.hs view
@@ -38,6 +38,10 @@ import Data.Progress.Meter import Data.Progress.Tracker import Data.Quantity+import System.Log.Logger+import System.Log.Formatter+import System.Log.Handler (setFormatter, LogHandler)+import System.Log.Handler.Simple import Common import Types@@ -197,11 +201,15 @@ showRaw :: String -> Annex () showRaw s = handle q $ putStrLn s -{- This avoids ghc's output layer crashing on invalid encoded characters in- - filenames when printing them out.- -} setupConsole :: IO () setupConsole = do+ s <- setFormatter+ <$> streamHandler stderr DEBUG+ <*> pure (simpleLogFormatter "[$time] $msg")+ updateGlobalLogger rootLoggerName (setLevel NOTICE . setHandlers [s])+ {- This avoids ghc's output layer crashing on+ - invalid encoded characters in+ - filenames when printing them out. -} fileEncoding stdout fileEncoding stderr
Option.hs view
@@ -17,9 +17,6 @@ import System.Console.GetOpt import System.Log.Logger-import System.Log.Formatter-import System.Log.Handler (setFormatter, LogHandler)-import System.Log.Handler.Simple import Common.Annex import qualified Annex@@ -51,13 +48,7 @@ setfast v = Annex.changeState $ \s -> s { Annex.fast = v } setauto v = Annex.changeState $ \s -> s { Annex.auto = v } setforcebackend v = Annex.changeState $ \s -> s { Annex.forcebackend = Just v }- setdebug = liftIO $ do- s <- simpledebug- updateGlobalLogger rootLoggerName- (setLevel DEBUG . setHandlers [s])- simpledebug = setFormatter- <$> streamHandler stderr DEBUG- <*> pure (simpleLogFormatter "[$time] $msg")+ setdebug = liftIO $ updateGlobalLogger rootLoggerName $ setLevel DEBUG matcher :: [Option] matcher =
Types/StandardGroups.hs view
@@ -7,7 +7,14 @@ module Types.StandardGroups where -data StandardGroup = ClientGroup | TransferGroup | BackupGroup | SmallArchiveGroup | FullArchiveGroup+data StandardGroup+ = ClientGroup+ | TransferGroup+ | BackupGroup+ | SmallArchiveGroup+ | FullArchiveGroup+ | SourceGroup+ | ManualGroup deriving (Eq, Ord, Enum, Bounded, Show) fromStandardGroup :: StandardGroup -> String@@ -16,6 +23,8 @@ fromStandardGroup BackupGroup = "backup" fromStandardGroup SmallArchiveGroup = "smallarchive" fromStandardGroup FullArchiveGroup = "archive"+fromStandardGroup SourceGroup = "source"+fromStandardGroup ManualGroup = "manual" toStandardGroup :: String -> Maybe StandardGroup toStandardGroup "client" = Just ClientGroup@@ -23,6 +32,8 @@ toStandardGroup "backup" = Just BackupGroup toStandardGroup "smallarchive" = Just SmallArchiveGroup toStandardGroup "archive" = Just FullArchiveGroup+toStandardGroup "source" = Just SourceGroup+toStandardGroup "manual" = Just ManualGroup toStandardGroup _ = Nothing descStandardGroup :: StandardGroup -> String@@ -31,6 +42,8 @@ descStandardGroup BackupGroup = "backup: backs up all files" descStandardGroup SmallArchiveGroup = "small archive: archives files located in \"archive\" directories" descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere"+descStandardGroup SourceGroup = "file source: moves files on to other repositories"+descStandardGroup ManualGroup = "manual mode: only stores files you manually choose" {- See doc/preferred_content.mdwn for explanations of these expressions. -} preferredContent :: StandardGroup -> String@@ -39,3 +52,5 @@ preferredContent BackupGroup = "include=*" preferredContent SmallArchiveGroup = "(include=*/archive/* or include=archive/*) and " ++ preferredContent FullArchiveGroup preferredContent FullArchiveGroup = "not (copies=archive:1 or copies=smallarchive:1)"+preferredContent SourceGroup = "not (copies=1)"+preferredContent ManualGroup = "present and exclude=*/archive/* and exclude=archive/*"
Utility/Daemon.hs view
@@ -34,15 +34,21 @@ when changedirectory $ setCurrentDirectory "/" nullfd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags- _ <- redir nullfd stdInput- mapM_ (redir logfd) [stdOutput, stdError]- closeFd logfd+ redir nullfd stdInput+ redirLog logfd a out- redir newh h = do- closeFd h- dupTo newh h out = exitImmediately ExitSuccess++redirLog :: Fd -> IO ()+redirLog logfd = do+ mapM_ (redir logfd) [stdOutput, stdError]+ closeFd logfd++redir :: Fd -> Fd -> IO ()+redir newh h = do+ closeFd h+ void $ dupTo newh h {- Locks the pid file, with an exclusive, non-blocking lock. - Writes the pid to the file, fully atomically.
Utility/Gpg.hs view
@@ -58,6 +58,9 @@ - should write to it all the data to input to gpg. Finally, runs - a reader action that is passed a handle to gpg's output. -+ - Runs gpg in batch mode; this is necessary to avoid gpg 2.x prompting for+ - the passphrase.+ - - Note that to avoid deadlock with the cleanup stage, - the reader must fully consume gpg's input before returning. -} feedRead :: [CommandParam] -> String -> (Handle -> IO ()) -> (Handle -> IO a) -> IO a@@ -71,7 +74,7 @@ let Fd pfd = frompipe let passphrasefd = [Param "--passphrase-fd", Param $ show pfd] - params' <- stdParams $ passphrasefd ++ params+ params' <- stdParams $ [Param "--batch"] ++ passphrasefd ++ params closeFd frompipe `after` withBothHandles createProcessSuccess (proc "gpg" params') go where
Utility/LogFile.hs view
@@ -19,7 +19,7 @@ rotateLog :: FilePath -> Int -> IO () rotateLog logfile num- | num >= 10 = return ()+ | num > maxLogs = return () | otherwise = whenM (doesFileExist currfile) $ do rotateLog logfile (num + 1) renameFile currfile nextfile@@ -28,4 +28,15 @@ nextfile = filename (num + 1) filename n | n == 0 = logfile- | otherwise = logfile ++ "." ++ show n+ | otherwise = rotatedLog logfile n++rotatedLog :: FilePath -> Int -> FilePath+rotatedLog logfile n = logfile ++ "." ++ show n++{- Lists most recent logs last. -}+listLogs :: FilePath -> IO [FilePath]+listLogs logfile = filterM doesFileExist $ reverse $ + logfile : map (rotatedLog logfile) [1..maxLogs]++maxLogs :: Int+maxLogs = 9
Utility/WebApp.hs view
@@ -40,16 +40,12 @@ localhost :: String localhost = "localhost" -{- Runs a web browser on a given url.- -- - Note: The url *will* be visible to an attacker. -}-runBrowser :: String -> (Maybe [(String, String)]) -> IO Bool-runBrowser url env = boolSystemEnv cmd [Param url] env- where+{- Command to use to run a web browser. -}+browserCommand :: FilePath #ifdef darwin_HOST_OS- cmd = "open"+browserCommand = "open" #else- cmd = "xdg-open"+browserCommand = "xdg-open" #endif {- Binds to a socket on localhost, and runs a webapp on it.
debian/changelog view
@@ -1,3 +1,34 @@+git-annex (3.20130124) unstable; urgency=low++ * Added source repository group, that only retains files until they've+ been transferred to another repository. Useful for things like+ repositories on cameras.+ * Added manual repository group. Use to prevent the assistant from+ downloading any file contents to keep things in sync. Instead+ `git annex get`, `git annex drop` etc can be used manually as desired.+ * webapp: More adjustments to longpoll code to deal with changes in+ variable quoting in different versions of shakespeare-js.+ * webapp: Avoid an error if a transfer is stopped just as it finishes.+ Closes: #698184 + * webapp: Now always logs to .git/annex/daemon.log+ * webapp: Has a page to view the log, accessed from the control menu.+ * webapp: Fix crash adding removable drive that has an annex directory+ in it that is not a git repository.+ * Deal with incompatability in gpg2, which caused prompts for encryption+ passphrases rather than using the supplied --passphrase-fd.+ * bugfix: Union merges involving two or more repositories could sometimes+ result in data from one repository getting lost. This could result+ in the location log data becoming wrong, and fsck being needed to fix it.+ * sync: Automatic merge conflict resolution now stages deleted files.+ * Depend on git 1.7.7.6 for --no-edit. Closes: #698399+ * Fix direct mode mapping code to always store direct mode filenames+ relative to the top of the repository, even when operating inside a+ subdirectory.+ * fsck: Detect and fix consistency errors in direct mode mapping files.+ * Avoid filename encoding errors when writing direct mode mappings.++ -- Joey Hess <joeyh@debian.org> Tue, 22 Jan 2013 07:11:59 +1100+ git-annex (3.20130114) unstable; urgency=low * Now handles the case where a file that's being transferred to a remote
debian/control view
@@ -59,7 +59,7 @@ Architecture: any Section: utils Depends: ${misc:Depends}, ${shlibs:Depends},- git (>= 1:1.7.7),+ git (>= 1:1.7.7.6), uuid, rsync, wget | curl,
+ doc/assistant/logs.png view
binary file changed (absent → 33631 bytes)
doc/assistant/release_notes.mdwn view
@@ -1,6 +1,10 @@-## version 3.20130107+## 3.20130124 -This is a bugfix release.+This is primarily a bugfix release.++## version 3.20130107, 3.20130114++These are bugfix releases. ## version 3.20130102
+ doc/bugs/Annex_thinks_file_exists_afer_being_dropped.mdwn view
@@ -0,0 +1,27 @@+#### What steps will reproduce the problem?++I've posted some code here:+ https://gist.github.com/4552036+++#### What is the expected output? What do you see instead?++I think I've found three bugs. If they aren't bugs then there is a usage issue that could do with some documentation improvements.++Problem 1 - With 3 local annexes git-annex doesn't seem to search properly for them (See code)++Problem 2 - Even after a sync an annex thinks another (local) annex has a file, even after it has been dropped (See code)++SCARY bug - `whereis` seems to think that a locally dropped file still exists (See code) +++#### What version of git-annex are you using? On what operating system?++git-annex version: 3.20130114++OS: OSX 10.6.8+++#### Please provide any additional information below.++> [[done]]; see comments --[[Joey]]
+ doc/bugs/Error_creating_remote_repository_using_ssh_on_OSX.mdwn view
@@ -0,0 +1,35 @@+What steps will reproduce the problem?++1. Click "Remote server: Set up a repository on a remote server using ssh." +2. Enter hostname and different username than currently logged in user+3. Click check this server+++What is the expected output? ++> I expected to see the next step in the remote repo creration process.++What do you see instead?+++> Failed to ssh to the server. Transcript: ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied (publickey,password). +++What version of git-annex are you using? ++> git-annex: Version: 3.20130114 +++On what operating system?++> OSX: 10.8.2++++Please provide any additional information below.++> I mentioned "with a different username" because the assistant will allow me to create a remote repository on the same target machine when I use my normal username. I think this is most likely because I have a ssh-key setup for the account on the remote machine. However I do not want to assume anything and send you down the wrong OSX rabbit hole. ++> After a little research it seems that OSX does not have a ssh-askpass++
doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn view
@@ -19,3 +19,7 @@ Please provide any additional information below. Maybe something to do with the drive name having spaces? "/Volumes/git-annex" worked fine.++> Good thought in the comment. I was able to reproduce the failure+> if the removable drive already had an "annex" directory that was not+> a git repo. I've made it handle this case. [[done]] --[[Joey]]
+ doc/bugs/OSX_app_issues/comment_10_54d8f3e429df9a9958370635c890abf0._comment view
@@ -0,0 +1,11 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.3.194"+ subject="comment 10"+ date="2013-01-19T16:13:20Z"+ content="""+The app uses the version of git included in it, because using the system's installed version if there is one is likely to run into other version incompatabilities. ++You can either install git-annex using cabal and homebrew, as documented, or you could go in and delete+all the git programs out of the app, and then it'd use the system's git stuff instead.+"""]]
+ doc/bugs/OSX_app_issues/comment_11_bb2ceb95a844449795addee6986d0763._comment view
@@ -0,0 +1,26 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawlYy4BrJyV1PdfqzevCVziXRp89iUH6Xzw"+ nickname="Christopher"+ subject="Code signing errors in log on starting git-annex.app"+ date="2013-01-19T22:30:32Z"+ content="""+When I run via the App and set up a fresh repo, i get some Console.app spam (looks like one per file added to the repo dir... or maybe one per git command?):++ 2013-01-19 2:44:55.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x1008b4000): p=73995[git] clearing CS_VALID+ 2013-01-19 2:44:55.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x10f99e000): p=73996[git] clearing CS_VALID+ 2013-01-19 2:44:55.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x102b44000): p=73997[git] clearing CS_VALID+ 2013-01-19 2:44:55.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x1029f4000): p=73998[git] clearing CS_VALID+ ...++and nothing seems to work. The page address and the pid increment steadily with each line. I'm using 10.8.2 (12C60) on a Mac Pro, and grabbed:++ /git-annex/OSX/current/10.8.2_Mountain_Lion/git-annex.dmg.bz2 ++(published 14-Jan-2013 15:19)++It seems to be a code signing issue, perhaps with the vendored git binaries. While things are sort-of working, the web app shows the files flying by really fast. ++Using a fresh repo via `git annex webapp` works great (I built that after much teeth-knashing, brew install/link cycles, and then cabal install git-annex). ++I am very excited for this to work, this is exactly what I've been waiting for to replace dropbox. Came very close to writing it myself a few times (and in Haskell no less!!). +"""]]
+ doc/bugs/OSX_app_issues/comment_9_2e6dfca0fd8df04066769653724eae28._comment view
@@ -0,0 +1,17 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmRFKwny4rArBaz-36xTcsJYqKIgdDaw5Q"+ nickname="Andrew"+ subject="Prefer the system/path git binaries if they're a newer version"+ date="2013-01-19T06:20:38Z"+ content="""+I have used homebrew to install git v1.8.0.2 but git-annex.app packages git v1.7.10.2. git 1.7 crashes due to some newer directives in my global git config.++ error: Malformed value for push.default: simple+ error: Must be one of nothing, matching, tracking or current.+ fatal: bad config file line 38 in /Users/akraut/.gitconfig+ + git-annex: fd:13: hGetLine: end of file+ failed+ git-annex: webapp: 1 failed++"""]]
+ doc/bugs/S3_upload_not_using_multipart.mdwn view
@@ -0,0 +1,53 @@+What steps will reproduce the problem?++> Try to copy/move a file greater than 5G to S3.++ git annex copy large_file.tgz --to cloud++What is the expected output? What do you see instead?++> Looks like git-annex may not be using the Multipart Upload API: http://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html++> Expected transfer to succeed, instead this error is output:++ copy large-file.tgz (gpg) (checking cloud...) (to cloud...) Reading passphrase from file descriptor 12 +++ Your proposed upload exceeds the maximum allowed size+ failed+ git-annex: copy: 1 failed++What version of git-annex are you using? On what operating system?++> OSX 10.8.2++Please provide any additional information below.++ annex [master●] % git annex status+ supported backends: SHA256E SHA1E SHA512E SHA224E SHA384E SHA256 SHA1 SHA512 SHA224 SHA384 WORM URL+ supported remote types: git S3 bup directory rsync web webdav glacier hook+ repository mode: indirect+ trusted repositories: 0+ semitrusted repositories: 3+ 00000000-0000-0000-0000-000000000001 -- web+ BE1D8EC7-C64B-47DE-AD4E-2A50437532B4 -- cloud+ E84568BA-6A4B-4AA1-B622-605B9248EDB1 -- here (eric laptop)+ untrusted repositories: 0+ dead repositories: 0+ transfers in progress: none+ available local disk space: 169 gigabytes (+1 megabyte reserved)+ temporary directory size: 218 megabytes (clean up with git-annex unused)+ local annex keys: 24+ local annex size: 8 gigabytes+ known annex keys: 25+ known annex size: 8 gigabytes+ bloom filter size: 16 mebibytes (0% full)+ backend usage: + SHA256E: 49+ annex [master●] % git annex version+ git-annex version: 3.20130114+ local repository version: 3+ default repository version: 3+ supported repository versions: 3+ upgrade supported from repository versions: 0 1 2+
+ doc/bugs/With_S3__44___GPG_ask_for_a_new_passphrase.mdwn view
@@ -0,0 +1,21 @@+I'm using S3 special remote that I initialized like this:++ git annex initremote s3 type=S3 encryption=EEF2B390 datacenter="EU" storageclass="REDUCED_REDUNDANCY"++Instead of asking me my key passphrase (I have gpg-agent running), it ask me a new passphase an then repeat it. So it's not my passphrase because if I kill gpg-agent, it will ask me three passphrase for each file: one mine and two for the new one. If i don't put anything there it says:++ copy GOPR1672.JPG (checking s3...) (to s3...) gpg: error creating passphrase: Invalid passphrase+ gpg: symmetric encryption of `[stdin]' failed: Invalid passphrase+ failed+ git-annex: fd:13: hPutBuf: resource vanished (Broken pipe)+ copy GOPR1673.JPG (checking s3...) (to s3...) ++So I create a new passphrase (two times) for each file I tried to upload. The problem is that I have more than 12000 files to upload!++What's this new passphrase for?++BTW: git-annex version: 3.20130102 same precompiled binary on Arch Linux.++> I've reproduced this with gpg 2.0.19. It is a documented incompatability+> between gpg 1.x and 2.x; the latter needs --batch included in its+> parameters. I've put in a fix. [[done]]
doc/bugs/encryption_given_a_gpg_keyid_still_uses_symmetric_encryption.mdwn view
@@ -36,3 +36,11 @@ Please provide any additional information below. +> Symmetric encryption is used as described in [[design/encryption]],+> with the symmetric key stored encrypted using your gpg key.+> +> The extra prompting described in the comments in the bug.+> +> I've reproduced this with gpg 2.0.19. It is a documented incompatability+> between gpg 1.x and 2.x; the latter needs --batch included in its+> parameters. I've put in a fix. [[done]]
doc/bugs/fsck_should_double-check_when_a_content-check_fails.mdwn view
@@ -1,1 +1,3 @@ git annex fsck marks files as bad when the checksumming fails. But this could also be due to a read error when the actual data stored is correct. So, fsck should check twice when a checksum fails.++> [[done]]; apparently problem was caused by bad RAM. --[[Joey]]
+ doc/bugs/get_failed__44___but_remote_has_the_file.mdwn view
@@ -0,0 +1,35 @@+Not sure what caused this, but I have a file that exists on two remotes, but I can only get it from one of them. If I try to get it from the other, it fails immediately (without even connecting):++ pilot:~/vid/tv/Show$ git annex whereis Show\ -\ S03E08.mp4+ whereis Show - S03E08.mp4 (2 copies) + 09c0b436-f8de-11e0-842f-b7644539d57f -- psychosis+ 82814942-f8e0-11e0-b053-e70a61e98e19 -- bucket+ ok++ pilot:~/vid/tv/Show$ git annex fsck Show\ -\ S03E08.mp4+ fsck Show - S03E08.mp4 ok++ pilot:~/vid/tv/Show$ git annex get --from bucket Show\ -\ S03E08.mp4+ get Show - S03E08.mp4 failed+ git-annex: get: 1 failed++ pilot:~/vid/tv/Show$ git annex get --debug --from bucket Show\ -\ S03E08.mp4+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","show-ref","git-annex"]+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","show-ref","--hash","refs/heads/git-annex"]+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","log","refs/heads/git-annex..e41c3b1ee9127129f2c9fc3fa5d4771afcb5ffd7","--oneline","-n1"]+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","log","refs/heads/git-annex..a7ae08bccede282f46c2073f6c3e52685a593482","--oneline","-n1"]+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","log","refs/heads/git-annex..ae0f84e906423f4da465e3d3df9d46545684d3f5","--oneline","-n1"]+ [2013-01-17 19:05:13 EST] chat: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","cat-file","--batch"]+ [2013-01-17 19:05:13 EST] read: git ["--git-dir=/home/jim/vid/.git","--work-tree=/home/jim/vid","ls-files","--cached","-z","--","Show - S03E08.mp4"]+ get Show - S03E08.mp4 failed+ git-annex: get: 1 failed++Same `git annex version` on both `pilot` and `bucket`, and I ran `git annex sync` on both.++ git-annex version: 3.20130114+ local repository version: 3+ default repository version: 3+ supported repository versions: 3+ upgrade supported from repository versions: 0 1 2++How should I debug this?
+ doc/bugs/git-annex:_Not_in_a_git_repository._.mdwn view
@@ -0,0 +1,19 @@+What steps will reproduce the problem?++As a default user i want to start git-annex assistent with++`$ git-annex webapp`++`git-annex: Not in a git repository.`++What is the expected output? What do you see instead?++I would expect the assistent to popup in a opened browser window.++What version of git-annex are you using? On what operating system?++Debian wheezy with git-annex version: 3.20130114++Please provide any additional information below.++Its working if i start `git-annex webapp` as root. I had the same error on previous version.
+ doc/bugs/internal_server_error_creating_repo_on_ssh_server.mdwn view
@@ -0,0 +1,24 @@+What steps will reproduce the problem?++I downloaded the os x assistant today.++I'd previously installed it but hadn't linked it to another repo.++I tried to create a remote repo on an ssh server using the assistant.++What is the expected output? What do you see instead?++Creating a remote repo or giving an understandable error message.++What version of git-annex are you using? On what operating system?++3.20121212+OS X 10.8.2 (Mountain Lion)++The remote machine is running debian stable.++Please provide any additional information below.++Internal Server Error+user error (gpg ["--quiet","--trust-model","always","--gen-random","--armor","1","512"] exited 127)+git-annex version 3.20121212
+ doc/bugs/uninit_does_not_abort_when_hard_link_creation_fails.mdwn view
@@ -0,0 +1,41 @@+> What steps will reproduce the problem?++Issue the following commands on a file system where hard links are disabled:++ $ touch foo+ + $ ln foo bar # just to check that hard links are disabled+ ln: failed to create hard link `bar' => `foo': Operation not permitted+ + $ git init && git annex init+ + $ git annex add .+ + $ git annex uninit+ unannex foo + git-annex: [...]: createLink: permission denied (Operation not permitted)+ failed+ Deleted branch git-annex [...].++ $ echo $? # exit status of last command+ 0+ + $ ls foo+ ls: cannot access foo: No such file or directory+++> What is the expected output? What do you see instead?++`git annex uninit` should abort and exit with a non-`0` return code. Instead, `git annex uninit` cleans up git-annex objects and exits with return code `0`.+++> What version of git-annex are you using? On what operating system?++3.20120406 on Ubuntu 12.04.1.+++> Please provide any additional information below.++git-annex should probably not be used on a file system where hard links are disabled.++However, if Bob is not aware that he's using git-annex on such a filesystem, he will accidently deletes his annexed files by issuing a `git annex uninit` command.
doc/bugs/webapp_requires_reload_for_notification_bubbles.mdwn view
@@ -34,4 +34,8 @@ > before now. > > I've fixed this bug in git. Your testing with tomorrow's-> autobuild would be appreciated. [[done]] --[[Joey]]+> autobuild would be appreciated. --[[Joey]]++>> There was a second issue as noted. I fixed that last week,+>> and the fix is in the autobuilds if you'd like to test before+>> the next release. [[done]] again --[[Joey]]
− doc/contributing.mdwn
@@ -1,7 +0,0 @@-## Style--This project uses tabs for indentation and the code looks fine with-any tab width. If you are using Emacs, and have it configured to use-spaces for indentation, then you can add a `./.dir-locals.el` to use-tabs for files in this project. See-<http://www.emacswiki.org/emacs/DirectoryVariables>.
+ doc/design/assistant/blog/day_171__logs.mdwn view
@@ -0,0 +1,23 @@+I've noticed people have some problems getting me logs when there'a a bug,+so I worked on improving the logging of the assistant.++While the assistant logged to `.git/annex/daemon.log` when started as a+daemon, when the webapp ran it didn't log there. It's somewhat tricky to+make the webapp redirect messages to the log, because it may start a web+browser that wants to write to the console. Took some file descriptor+juggling, but I made this work. Now the log is even used when the assistant+is started for the first time in a newly created repository. So, we have+total log coverage.++Next, I made a simple page in the webapp to display the accumulated logs.+It does not currently refresh as new things are logged. But it's easier+for me to tell users to click on `Current Repository -> View log` than+ask for them to look for the daemon.log file.++Finally, I made all the webapp's alerts also be written to the log.++---++Also did the requisite bug fixes.++[[!img /assistant/logs.png alt="screenshot of logs page"]]
+ doc/design/assistant/blog/day_172__short_day.mdwn view
@@ -0,0 +1,22 @@+Only one bug fix today, but it was a doozie. It seems that gpg2 has an+incompatability with the gpg 1.x that git-annex was written for, that+causes large numbers of excess passphrase prompts, when it's supposed to be+using a remote's symmetric encryption key. Adding the --batch parameter+fixed this.++I also put together a page listing [[related_software]] to git-annex.++I've also updated [[direct_mode]]'s documentation, about when it's safe to+use direct mode. The intuition I've developed about direct mode is that if+you don't need full versioning of files (with the ability to get back old+versions), direct mode is fine and safe to use. If you want full+versioning, it's best to not use direct mode. Or a reasonable compromise is+to `git annex untrust` the direct mode repository and set up a backup remote.+With this compromise, only if you edit a file twice in a row might the old+version get lost before it can be backed up.++Of course, it would be possible to make direct mode fully version+preserving, but it'd have to back up every file in the repository locally+to do so. Going back to two local copies of every file, which is part of+git that git-annex happily avoids. Hmm, it might be possible to only back+up a file locally until it reaches the backup remote..
+ doc/design/assistant/blog/day_173__snow_day.mdwn view
@@ -0,0 +1,22 @@+When I wasn't dealing with the snowstorm today, I was fixing more bugs.+Rather serious bugs.++One actually involved corruption to git-annex's location tracking info, due+to a busted three-way merge. Takes an unusual set of circumstances for that+bug to be triggered, which is why it was not noticed before now. Also,+since git-annex is designed to not trust its location tracking info, and+recover from it becoming inconsistent, someone could have experienced the+bug and not really noticed it. Still it's a serious problem and I'm in debt+to user a-or-b for developing a good test case that let me reproduce it and+fix it. (Also added to the test suite.)+[[This is how to make a perfect bug report|bugs/Annex_thinks_file_exists_afer_being_dropped]]++Another bug made `git add; git commit` cause data loss in direct mode.+I was able to make that not lose data, although it still does something+that's unlikely to be desired, unless the goal is to move a file from an+annexed direct mode file to having its entire contents stored in git.++Also found a bug with sync's automatic resolution of git conflicts. It+failed when two repositories both renamed a file to different names.+I had neglected to explicitly `git rm` the old file name, which is+necessary to resolve such a conflict.
+ doc/design/assistant/blog/day_174__last_weekend_before_AU.mdwn view
@@ -0,0 +1,25 @@+On Friday, worked on several bugs in direct mode mapping code. Fixed it+to not crash on invalid unicode in filenames. Dealt with some bugs when+mappings were updated in subdirectories of the repository.++Those bugs could result in inconsistent mapping files, so today I+made `fsck` check mapping files for consistency.++Leaving for Australia tomorrow, but I also hope to get another bugfix+release out before my flight leaves. Then will be on vacation for several+days, more or less. Then at Linux Conf Australia, where there will+be a git-annex presentation on February 1st.++----++BTW, I've lined up my Android development hardware for next month. I will+be using an [Asus Transformer](http://en.wikipedia.org/wiki/ASUS_Eee_Pad_Transformer),+kindly lent to me by Mark H. This has the advantage+of having a real keyboard, and running the (currently) second most widely used+version of Android, 4.0.x. I have already experienced frustration getting photos+off the thing and into my photo annex; the file manager is the worst I've+seen since the 80's. I understand why so many want an Android port!++Interestingly, its main user filesystem is a FUSE mount point on `/sdcard`+backed by an ext4 filesystem on `/data` that a regular user is not allowed+to access. Whatever craziness this entails does not support symlinks.
+ doc/design/assistant/blog/day_175__pacific_features.mdwn view
@@ -0,0 +1,15 @@+15 hours in a plane with in-seat power. Ok, time for some new features!++Added two new repository groups. ++"manual" can be used to avoid the assistant downloading any file contents+on its own. It'll still upload and otherwise sync data. To download files,+you can use `git annex get` while the assistant is running. You can also+drop files using the command line.++"source" is for repositories that are the source of new files, but don't+need to retain a copy once the file has been moved to another repository.+A camera would be a good example.++Ok, those were easy features to code; I suck at being productive on planes.+Release coming up with those, once I find enough bandwidth here in AU.
doc/design/assistant/more_cloud_providers.mdwn view
@@ -12,5 +12,6 @@ * [[Amazon Glacier|todo/special_remote_for_amazon_glacier]] **done** * [nimbus.io](https://nimbus.io/) Fairly low prices ($0.06/GB); REST API; free software+* Mediafire provides 50gb free and has a REST API. See poll at [[polls/prioritizing_special_remotes]].
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 15 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 9 "Box.com (done)" 66 "My phone (or MP3 player)" 18 "Tahoe-LAFS" 6 "OpenStack SWIFT" 23 "Google Drive"]]+[[!poll open=yes 15 "Amazon S3 (done)" 12 "Amazon Glacier (done)" 9 "Box.com (done)" 67 "My phone (or MP3 player)" 18 "Tahoe-LAFS" 6 "OpenStack SWIFT" 25 "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/assistant/webapp.mdwn view
@@ -8,8 +8,6 @@ This is quite likely because of how the div containing transfers is refereshed. If instead javascript was used to update the progress bar etc for transfers with json data, the buttons would work better.-* Some forms display a modal message when submitted and also have required- fields. This does not interact well. ## interface
doc/direct_mode.mdwn view
@@ -24,27 +24,38 @@ git annex indirect +## safety of using direct mode+ With direct mode, you're operating without large swathes of git-annex's-carefully constructed safety net. So you're strongly encouraged to tell-git-annex that your direct mode repository cannot be trusted to retain-the content of a file (because any file can be deleted or modified at-any time). To do so:+carefully constructed safety net, which ensures that past versions of+files are preserved and can be accessed (until you dropunused them). +With direct mode, any file can be edited directly, or deleted at any time,+and there's no guarantee that the old version is backed up somewhere else. +So if you care about preserving the history of files, you're strongly+encouraged to tell git-annex that your direct mode repository cannot be+trusted to retain the content of a file. To do so:+ git annex untrust . +On the other hand, if you only care about the current versions of files,+and are using git-annex with direct mode to keep files synchronised between+computers, and manage your files, this should not be a concern for you.+ ## use a direct mode repository You can use most git-annex commands as usual in a direct mode repository.-A few commands don't work in direct mode, and will refuse to do anything.+A very few commands don't work in direct mode, and will refuse to do anything. Direct mode also works well with the git-annex assistant. -You can use `git commit --staged`. But not `git commit -a` .. It'll-commit whole large files into git!+You can use `git commit --staged`, or plain `git commit`.+But not `git commit -a`, or `git commit <file>` ..+that'd commit whole large files into git! ## what doesn't work in direct mode -`git annex status` show incomplete information. A few other commands,+`git annex status` shows incomplete information. A few other commands, like `git annex unlock` don't make sense in direct mode and will refuse to run. @@ -54,6 +65,6 @@ your repository with broken symlinks. If that file was the only copy you had of something, it'll be lost. -This is one reason it's wise to make git-annex untrust your direct mode+This is one more reason it's wise to make git-annex untrust your direct mode repositories. Still, you can lose data using these sort of git commands, so use extreme caution.
+ doc/forum/Building_a_Debian_package_of_git-annex.mdwn view
@@ -0,0 +1,27 @@+I'd like to have a Debian/Ubuntu package of the latest git-annex (f.e. to have it installed systemwide). In the source I can find the debian/ folder with all needed information to build the package. But it looks like I don't have all needed dependencies on my Ubuntu 12.10:++ user@laptop(pc) ~/src/git/git-annex (git)-[master] % debuild -us -uc+ dpkg-buildpackage -rfakeroot -D -us -uc+ dpkg-buildpackage: source package git-annex+ dpkg-buildpackage: source version 3.20130115+ dpkg-buildpackage: source changed by Joey Hess <joeyh@debian.org>+ dpkg-source --before-build git-annex+ dpkg-buildpackage: host architecture amd64+ dpkg-checkbuilddeps: Unmet build dependencies: libghc-dav-dev (>= 0.3) libghc-dbus-dev (>= 0.10.3) libghc-yesod-dev libghc-yesod-static-dev libghc-yesod-default-dev libghc-hamlet-dev libghc-clientsession-dev libghc-warp-dev libghc-wai-dev libghc-wai-logger-dev libghc-case-insensitive-dev libghc-http-types-dev libghc-blaze-builder-dev libghc-crypto-api-dev libghc-network-multicast-dev libghc-network-info-dev libghc-safesemaphore-dev libghc-network-protocol-xmpp-dev (>= 0.4.3-1+b1) libghc-gnutls-dev (>= 0.1.4) libghc-xml-types-dev+ dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting+ dpkg-buildpackage: warning: (Use -d flag to override.)+ debuild: fatal error at line 1357:+ dpkg-buildpackage -rfakeroot -D -us -uc failed+ user@laptop(pc) ~/src/git/git-annex (git)-[master] % apt-get install libghc-dav-dev libghc-dbus-dev libghc-yesod-dev libghc-yesod-static-dev libghc-yesod- default-dev libghc-hamlet-dev libghc-clientsession-dev libghc-warp-dev libghc-wai-dev libghc-wai-logger-dev libghc-case-insensitive-dev libghc-http-types-dev libghc-blaze-builder-dev libghc-crypto-api-dev libghc-network-multicast-dev libghc-network-info-dev libghc-safesemaphore-dev libghc-network-protocol-xmpp-dev libghc-gnutls-dev libghc-xml-types-dev+ Reading package lists... Done+ Building dependency tree + Reading state information... Done+ E: Unable to locate package libghc-dav-dev+ E: Unable to locate package libghc-network-multicast-dev+ E: Unable to locate package libghc-network-info-dev+ E: Unable to locate package libghc-safesemaphore-dev++How can I build the package? Or would it be possible for you to build the package and add it to the "Install" page (like the prebuilt linux tarball)? That would be great!++Cheers and thanks for the hard work,+Tobias
+ doc/forum/How_to_delete_a_remote__63__.mdwn view
@@ -0,0 +1,1 @@+I have a repository with an S3 remote named `cloud`. I now no longer want to use that remote. I've dropped all the data from it (`git annex drop . --from cloud`). How do I tell my repository to forget about the remote?
+ doc/forum/How_to_prevent_the_assistant_from_downloading_all_data__63__.mdwn view
@@ -0,0 +1,9 @@+I have a repository on my laptop with a single remote on a USB drive. Both were created without the assistant.++The remote holds all the content. My understanding is that this would be a "backup" repository, using the group definitions.++The local repository generally holds no content. When I want a file, I make sure the remote is available, and then I `git annex get` it.++This works fine in git annex, but I'm now experimenting with the assistant. As soon as I fire up the assistant, it starts downloading all of the data from the remote. I don't ever want it to automatically get any content from the remote. If it sees new content in the repository, I would like it to push that out to the remote. But never get anything from the remote, and never drop anything that is in the repository.++How can I setup this behaviour in the assistant? I have set the remote's repository group to "backup". The local repository is not in any group, since none of the groups fit my model for this repo.
+ doc/forum/How_to_rename_a_remote__63__.mdwn view
@@ -0,0 +1,1 @@+I recently created WebDAV remote to my annex which I assumed to be just for testing purposes at the time, so I gave it a strange and long-wided name. It turned out, though, that the remote is stable, works fine, and that I'm going to keep it. Now, I would like to give it a snappier and more descriptive name than the one I originally chose. Is that possible somehow?
+ doc/forum/No_SSL_traffic_for_S3__63__.mdwn view
@@ -0,0 +1,8 @@+As far I can tell, the encryption mentioned on the wiki for S3 [1] refers to file-level encryption. That is, it encrypts files with GPG before storing them (or after retrieving them) from S3. However, even if I have GPG encryption off, I still want S3 requests to use SSL encryption. As far as I can tell, HTTPS isn't used with S3 remotes. Is there any way to enable it (if so, it should be the default)?++I am using git-annex version: 3.20120406++Cheers,+--acrefoot++[1] http://git-annex.branchable.com/special_remotes/S3/
+ doc/forum/Running_assistant_on_a_server___40__no_X_available__41__.mdwn view
@@ -0,0 +1,2 @@+How can I run the assistant on a server and access the webinterface over the network from my client pc?+The use case I have in mind is that the server can automatically synchronize files, pushed over XMPP.
+ doc/forum/one_or_many_annexes__63__.mdwn view
@@ -0,0 +1,7 @@+Just a question about other peoples' annex usage. I've got one uber-annex (in ~/annex of course) where I keep ALL THE THINGS, movies, music, pictures, whatever.++It's very big, of course. And I worry about doing anything unusual with it (like trying out direct mode) because, hey, that's all my stuff.++Like, just now, I tried flipping it into direct mode, and a handful of files stayed symlinks, which weirded me out. (Maybe because I had the assistant running while I switched it, and that caused chaos?) Then I flipped it back to indirect, and a bunch of files were left un-tracked, as real files rather than links! I kind of freaked out, and did a big "git annex add" to add them all back. I haven't left a bug report because it's not something I want to try again experimentally to reproduce, I just want my repo back, you know?++Anyways, this kind of thing might not happen if I kept multiple small repos. I was wondering if anybody else worked that way, and what advantages/disadvantages you've found compared to having one super-repo.
+ doc/forum/switching_to__47__from_direct_mode_while_assistant_is_running.mdwn view
@@ -0,0 +1,2 @@+Is that really unsafe? Because I did that and the switch to direct mode seemed to leave a lot of files still as links, and when I panicked and switched back to indirect mode, a whole lot of stuff seemed to have become unannexed and I reannexed it.+
doc/index.mdwn view
@@ -53,6 +53,7 @@ * [[internals]] * [[scalability]] * [[design]]+* [[related_software]] * [[what git annex is not|not]] * [[sitemap]]
doc/install/OSX.mdwn view
@@ -38,7 +38,7 @@ Then execute <pre>-sudo port install git-core ossp-uuid md5sha1sum coreutils pcre+sudo port install git-core ossp-uuid md5sha1sum coreutils pcre gnutls libxml2 libgsasl pkgconfig sudo ln -s /opt/local/include/pcre.h /usr/include/pcre.h # This is hack that allows pcre-light to find pcre
+ doc/install/OSX/comment_10_cd2120552ef894a37933b328136fa4cc._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"+ nickname="Pere"+ subject="Segmentation Fault"+ date="2013-01-19T16:10:08Z"+ content="""+I guess my adventure ends here. :'(+"""]]
+ doc/install/OSX/comment_3_47a77a03040fe628109bd54f82f9ad7a._comment view
@@ -0,0 +1,17 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawlDDW-g2WLLsLpcnCm4LykAquFY_nwbIrU"+ nickname="Daniel"+ subject="comment 3"+ date="2013-01-15T15:22:43Z"+ content="""+Installing via the MacPorts method. I ran into this error.++ \"_locale_charset\", referenced from: _localeEncoding in libHSbase-4.5.1.0.a(PrelIOUtils.o) + ld: symbol(s) not found for architecture x86_64++I was able to solve and get git-annex to build buy providing the --extra-lib-dirs parameter++ cabal install c2hs git-annex --bindir=$HOME/bin --extra-lib-dirs=/usr/lib++Cheers, [Daniel Wozniak](http://woz.io)+"""]]
+ doc/install/OSX/comment_4_25cac8bcd84a5210fc0a5243260b8cc7._comment view
@@ -0,0 +1,18 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"+ nickname="Pere"+ subject="Snow Leopard"+ date="2013-01-18T15:51:48Z"+ content="""+Hi,++Are there plans to provide a git-annex.app that works on Snow Leopard? ++Currently there are only installers for the Lions.++http://downloads.kitenet.net/git-annex/OSX/current/++Thanks :-)+++"""]]
+ doc/install/OSX/comment_5_39b4b748b4586bf32b37edfefef84bba._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.3.194"+ subject="comment 5"+ date="2013-01-18T17:25:36Z"+ content="""+What we need to provide a Snow Leopard or other version build, is access to a box running that version of OSX, or someone with a box that doesn't mind compiling stuff and setting up the autobuilder (not very hard).+"""]]
+ doc/install/OSX/comment_6_1a9c91ef43edc4148947f202ff604114._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"+ nickname="Pere"+ subject="Snow Leopard"+ date="2013-01-18T17:57:40Z"+ content="""+If the process is very automatic I might contribute. I mean, if you tell me, install this and that package and run this script once a week, I might be able to help. I have a MacBook from 2007 with Snow Leopard. I also have macports installed, but I'm not a programmer.+"""]]
+ doc/install/OSX/comment_7_892f7e65f95f43697164267c4b71c0d5._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.3.194"+ subject="comment 7"+ date="2013-01-18T20:16:52Z"+ content="""+If you can get it to build using the instructions for Brew (or MacPorts) on this page, it's easy to get from there to a distributable app.+"""]]
+ doc/install/OSX/comment_8_38d9c2eea1090674de2361274eab5b0e._comment view
@@ -0,0 +1,29 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"+ nickname="Pere"+ subject="I couldn't install it on Snow Leopard"+ date="2013-01-19T15:04:27Z"+ content="""+Bad news, it looks like I'm not able to install git-annex to my machine: When I run++ sudo cabal install c2hs git-annex --bindir=$HOME/bin++I get the following error:++ cabal: Error: some packages failed to install:+ DAV-0.3 failed during the building phase. The exception was:+ ExitFailure 11+ git-annex-3.20130114 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-1.1.7.2 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-auth-1.1.3 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-core-1.1.7.1 failed during the building phase. The exception was:+ ExitFailure 11+ yesod-default-1.1.3 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-form-1.2.0.2 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-json-1.1.2 depends on yesod-core-1.1.7.1 which failed to install.+ yesod-persistent-1.1.0.1 depends on yesod-core-1.1.7.1 which failed to+ install.+ yesod-static-1.1.1.2 depends on yesod-core-1.1.7.1 which failed to install.++What does *ExitFailure 11* mean?+"""]]
+ doc/install/OSX/comment_9_35bf3812db6f3ef25da9b3bc84f147c5._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.3.194"+ subject="comment 9"+ date="2013-01-19T16:02:35Z"+ content="""+sig11 is a Segmentation Fault, probably from a C library used by DAV for HTTP in this case.+"""]]
doc/install/Ubuntu.mdwn view
@@ -4,6 +4,9 @@ Otherwise, see [[manual_installation_instructions|install]]. +There is a PPA with a newer version of git-annex in it, maintained by+Sergio Rubio. <https://launchpad.net/~rubiojr/+archive/git-annex>+ --- Warning: The version of git-annex shipped in Ubuntu Oneiric
+ doc/news/version_3.20130124.mdwn view
@@ -0,0 +1,28 @@+git-annex 3.20130124 released with [[!toggle text="these changes"]]+[[!toggleable text="""+ * Added source repository group, that only retains files until they've+ been transferred to another repository. Useful for things like+ repositories on cameras.+ * Added manual repository group. Use to prevent the assistant from+ downloading any file contents to keep things in sync. Instead+ `git annex get`, `git annex drop` etc can be used manually as desired.+ * webapp: More adjustments to longpoll code to deal with changes in+ variable quoting in different versions of shakespeare-js.+ * webapp: Avoid an error if a transfer is stopped just as it finishes.+ Closes: #[698184](http://bugs.debian.org/698184)+ * webapp: Now always logs to .git/annex/daemon.log+ * webapp: Has a page to view the log, accessed from the control menu.+ * webapp: Fix crash adding removable drive that has an annex directory+ in it that is not a git repository.+ * Deal with incompatability in gpg2, which caused prompts for encryption+ passphrases rather than using the supplied --passphrase-fd.+ * bugfix: Union merges involving two or more repositories could sometimes+ result in data from one repository getting lost. This could result+ in the location log data becoming wrong, and fsck being needed to fix it.+ * sync: Automatic merge conflict resolution now stages deleted files.+ * Depend on git 1.7.7.6 for --no-edit. Closes: #[698399](http://bugs.debian.org/698399)+ * Fix direct mode mapping code to always store direct mode filenames+ relative to the top of the repository, even when operating inside a+ subdirectory.+ * fsck: Detect and fix consistency errors in direct mode mapping files.+ * Avoid filename encoding errors when writing direct mode mappings."""]]
doc/preferred_content.mdwn view
@@ -126,3 +126,26 @@ you should instead configure all your archive repositories with a version of the above preferred content expression with a larger number of copies.++### source++Use for repositories where files are often added, but that do not need to+retain files for local use. For example, a repository on a camera, where+it's desirable to remove photos as soon as they're transferred elsewhere.++The preferred content expression for these causes them to only retain+data until a copy has been sent to some other repository.++`not (copies=1)`++### manual++This gives you full manual control over what content is stored in the+repository. This allows using the [[assistant]] without it trying to keep a+local copy of every file. Instead, you can manually run `git annex get`,+`git annex drop`, etc to manage content.++Only content that is present is preferred. Content in "archive"+directories is never preferred.++`present and exclude=*/archive/* and exclude=archive/*`
@@ -0,0 +1,11 @@+Some folks have built other software on top of git-annex, or that is+designed to interoperate with it.++* The [[git-annex assistant|assistant]] is included in git-annex,+ and extends its use cases into new territory.+* [git-annex-watcher](https://github.com/rubiojr/git-annex-watcher)+ is a status icon for your desktop.+* [[forum/gadu_-_git-annex_disk_usage]] is a du like utility that+ is git-annex aware.+* [sizes](http://hackage.haskell.org/package/sizes) is another du-like+ utility, with a `-A` switch that enables git-annex support.
+ doc/special_remotes/S3/comment_7_6af9781004d982d8e6b20a83ad29eead._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmyFvkaewo432ELwtCoecUGou4v3jCP0Pc"+ nickname="Eric"+ subject="S3 Remote Future Proof?"+ date="2013-01-20T09:21:50Z"+ content="""+Joey, I'm curious to understand how future proof an S3 remote is. Can I restore my files without git-annex?+"""]]
+ doc/special_remotes/S3/comment_8_0fa68d584ee7f6b5c9058fba7e911a11._comment view
@@ -0,0 +1,12 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="68.119.100.5"+ subject="comment 8"+ date="2013-01-20T20:37:09Z"+ content="""+If encryption is not used, the files are stored in S3 as-is, and can be accessed directly. They are stored in a hashed directory structure with the names of their key used, rather than the original filename. To get back to the original filename, a copy of the git repo would also be needed.++With encryption, you need the gpg key used in the encryption, or, for shared encryption, a symmetric key which is stored in the git repo.++See [[future proofing]] for non-S3 specific discussion of this topic.+"""]]
doc/special_remotes/bup.mdwn view
@@ -1,5 +1,5 @@ This special remote type stores file contents in a -[bup](http://github.com/apenwarr/bup) repository. By using git-annex+[bup](http://github.com/bup/bup) repository. By using git-annex in the front-end, and bup as a remote, you get an easy git-style interface to large files, and easy backups of the file contents using git.
+ doc/special_remotes/comment_1_961276c18e9353ca8e25cad53e7ec51f._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawk9nck8WX8-ADF3Fdh5vFo4Qrw1I_bJcR8"+ nickname="Jon Ander"+ subject="MediaFire"+ date="2013-01-17T12:17:54Z"+ content="""+MediaFire offers 50GB of free storage (max size 200MB). It would be great to support it as a new special remote.+"""]]
+ doc/special_remotes/comment_2_97543acfa7434e332ebea5672e446317._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.7.238"+ subject="comment 2"+ date="2013-01-17T16:44:25Z"+ content="""+Mediafire does not appear to offer any kind of API for its storage.+"""]]
+ doc/special_remotes/comment_3_9229776623c234204c8b164edff95da0._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawk9nck8WX8-ADF3Fdh5vFo4Qrw1I_bJcR8"+ nickname="Jon Ander"+ subject="MediaFire REST API"+ date="2013-01-17T16:53:41Z"+ content="""+Wouldn't this be enough? http://developers.mediafire.com/index.php/REST_API+"""]]
+ doc/special_remotes/comment_4_3bbda479d13f6bf393dcd59ed94ddeaa._comment view
@@ -0,0 +1,10 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmRFKwny4rArBaz-36xTcsJYqKIgdDaw5Q"+ nickname="Andrew"+ subject="JABOF special remote"+ date="2013-01-19T08:34:32Z"+ content="""+Similar to a JABOD, this would be Just A Bunch Of Files. I already have a NAS with a file structure conducive to serving media to my TV. However, it's not capable (currently) of running git-annex locally. It would be great to be able to tell annex the path to a file there as a remote much like a web remote from \"git annex addurl\". That way I can safely drop all the files I took with me on my trip, while annex still verifies and counts the file on the NAS as a location.++There are some interesting things to figure out for this to be efficient. For example, SHAs of the files. Maybe store that in a metadata file in the directory of the files? Or perhaps use the WORM backend by default?+"""]]
+ doc/special_remotes/comment_5_f7000975d38077828ab11a99095b39eb._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.3.194"+ subject="comment 5"+ date="2013-01-19T16:05:13Z"+ content="""+The web special remote is recently able to use file:// URL's, so you can just point to files on some arbitrary storage if you want to.+"""]]
+ doc/todo/add_an_icon_for_the_.desktop_file.mdwn view
@@ -0,0 +1,1 @@+Maybe add the icon /usr/share/doc/git-annex/html/logo.svg to the .desktp file.
+ doc/todo/wishlist:_Option_to_specify_max_transfer_rate.mdwn view
@@ -0,0 +1,3 @@+A big part of my online use is done via a low-speed connection over my mobile phone, this is limited to 16KB/sec because I always use up my 500MB quota the very first day of the month. `;-/` So when I need to download big files, I first download them to my online server, then transfer the files to my laptop with git-annex. If I'm connected via GSM, this occupies all the bandwidth and everything else moves like a heavily sedated slug. So if I want to work via VNC or SSH, I have to terminate ongoing transfers with Ctrl-C and then hopefully remember to restart it when I work locally. I know git-annex is robust enough to handle this gracefully, but it would be really nice to have a continuous connection going on in the background, limited to a value I choose.++rsync(1) has a `--bwlimit` (bandwidth limit) where you can specify max download/upload speed in kilobytes/sec. It would be great if a similar option was integrated into git-annex. Thanks in advance.
doc/todo/wishlist:_disable_automatic_commits.mdwn view
@@ -1,13 +1,31 @@-When using the [[/assistant]] on some of my repositories, I would like to retain manual control over the granularity and contents of the commit history. Some motivating reasons:+When using the [[/assistant]] on some of my repositories, I would like to+retain manual control over the granularity and contents of the commit+history. Some motivating reasons: * manually specified commit messages makes the history easier to follow * make a series of minor changes to a file over a period of a few hours would result in a single commit rather than capturing intermediate incomplete edits+ * manual choice of which files to annex (based on predicted usage) could be useful, e.g. a repo might contain a 4MB PDF which you want available in *every* remote even without `git annex get`, and also some 2MB images which are only required in some remotes -Obviously this needs to be configurable at least per repository, and ideally perhaps even per remote, since usage habits can vary from machine to machine (e.g. I could choose to commit manually from my desktop machine which has a nice comfy keyboard and large screen, but this would be too much pain to do from my tiny netbook).+> This particular case is now catered to by the "manual" repository group+> in preferred content settings. --[[Joey]] -In fact, this is vaguely related to [[design/assistant/partial_content]], since the usefulness of the commit history depends on the context of the data being manipulated, which in turn depends on which subdirectories are being touched. So any mechanism for disabling sync per directory could potentially be reused for disabling auto-commit per directory.+Obviously this needs to be configurable at least per repository, and+ideally perhaps even per remote, since usage habits can vary from machine+to machine (e.g. I could choose to commit manually from my desktop machine+which has a nice comfy keyboard and large screen, but this would be too+much pain to do from my tiny netbook). -According to Joey, it should be easy to arrange for the watcher thread not to run, but would need some more work for the assistant to notice manual commits in order to sync them; however the assistant already does some crazy inotify watching of git refs, in order to detect incoming pushes, so detecting manual commits wouldn't be a stretch.+In fact, this is vaguely related to [[design/assistant/partial_content]],+since the usefulness of the commit history depends on the context of the+data being manipulated, which in turn depends on which subdirectories are+being touched. So any mechanism for disabling sync per directory could+potentially be reused for disabling auto-commit per directory.++According to Joey, it should be easy to arrange for the watcher thread not+to run, but would need some more work for the assistant to notice manual+commits in order to sync them; however the assistant already does some+crazy inotify watching of git refs, in order to detect incoming pushes, so+detecting manual commits wouldn't be a stretch. [[!tag design/assistant]]
+ doc/todo/wishlist:_special_remote_mega.co.nz.mdwn view
@@ -0,0 +1,1 @@+mega.co.nz has 50gb for free accounts. They also have an API, so I guess it wouldn't be too hard to use it as a special remote.
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 3.20130114+Version: 3.20130124 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess <joey@kitenet.net>
+ templates/control/log.hamlet view
@@ -0,0 +1,6 @@+<div .span9 .hero-unit>+ <p>+ Here's everything that has been logged by the git-annex assistant, #+ as well as by programs it has run.+ <pre>+ #{logcontent}
@@ -8,3 +8,5 @@ <i .icon-repeat></i> Restart daemon <a href="@{ShutdownR}"> <i .icon-off></i> Shutdown daemon+ <a href="@{LogR}">+ <i .icon-list></i> View log
templates/documentation/repogroup.hamlet view
@@ -32,7 +32,17 @@ When you copy or move a file out of an "archive" folder, it'll be # retrieved from the archive repository. <p>- Finally, the <b>small archive repositories</b> are like other archive #+ The <b>small archive repositories</b> are like other archive # repositories, but smaller. While archive repositories normally accumulate # every file they can, small archive repositories only accumulate files # once you put them in an "archive" directory.+ <p>+ Sometimes useful for devices like cameras are the #+ <b>source repositories</b>. Repositories in this group only retain #+ files until they can be moved to some other repository, like a client #+ or transfer repository.+ <p>+ Finally, repositories can be configured to be <b>manual</b>. This #+ prevents content being automatically synced to the repository, but #+ you can use command-line tools like `git annex get` and `git annex drop` #+ to control what content is present.
templates/error.hamlet view
@@ -11,6 +11,9 @@ <a href="" onclick="history.back(-1);return false"> Go Back <li>+ <a href="@{LogR}">+ View logs+ <li> <a href="http://git-annex.branchable.com/bugs/"> File a Bug <div .container-fluid>
templates/notifications/longpolling.julius view
@@ -1,7 +1,7 @@ $(function() { $.get("@{geturl}", function(url){ var f = function() {- longpoll(url, '#{ident}'+ longpoll(url, #{ident} , function() { setTimeout(f, #{delay}); } , function() { webapp_disconnected(); } );
test.hs view
@@ -149,6 +149,7 @@ , test_status , test_version , test_sync+ , test_sync_regression , test_map , test_uninit , test_upgrade@@ -578,6 +579,35 @@ test_sync = "git-annex sync" ~: intmpclonerepo $ do git_annex "sync" [] @? "sync failed" +{- Regression test for sync merge bug fixed in+ - 0214e0fb175a608a49b812d81b4632c081f63027 -}+test_sync_regression :: Test+test_sync_regression = "git-annex sync_regression" ~:+ {- We need 3 repos to see this bug. -}+ withtmpclonerepo False $ \r1 -> do+ withtmpclonerepo False $ \r2 -> do+ withtmpclonerepo False $ \r3 -> do+ forM_ [r1, r2, r3] $ \r -> indir 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"+ when (r /= r3) $+ boolSystem "git" [Params "remote add r3", File ("../../" ++ r3)] @? "remote add"+ git_annex "get" [annexedfile] @? "get failed"+ boolSystem "git" [Params "remote rm origin"] @? "remote rm"+ forM_ [r3, r2, r1] $ \r -> indir r $+ git_annex "sync" [] @? "sync failed"+ forM_ [r3, r2] $ \r -> indir r $+ git_annex "drop" ["--force", annexedfile] @? "drop failed"+ indir r1 $ do+ git_annex "sync" [] @? "sync failed in r1"+ git_annex_expectoutput "find" ["--in", "r3"] []+ {- This was the bug. The sync+ - mangled location log data and it+ - thought the file was still in r2 -}+ git_annex_expectoutput "find" ["--in", "r2"] []+ test_map :: Test test_map = "git-annex map" ~: intmpclonerepo $ do -- set descriptions, that will be looked for in the map@@ -762,7 +792,9 @@ intmpbareclonerepo a = withtmpclonerepo True $ \r -> indir r a withtmpclonerepo :: Bool -> (FilePath -> Assertion) -> Assertion-withtmpclonerepo bare = bracket (clonerepo mainrepodir tmprepodir bare) cleanup+withtmpclonerepo bare a = do+ dir <- tmprepodir+ bracket (clonerepo mainrepodir dir bare) cleanup a withgitrepo :: (FilePath -> Assertion) -> Assertion withgitrepo = bracket (setuprepo mainrepodir) return@@ -922,11 +954,18 @@ tmpdir :: String tmpdir = ".t" -mainrepodir :: String+mainrepodir :: FilePath mainrepodir = tmpdir ++ "/repo" -tmprepodir :: String-tmprepodir = tmpdir ++ "/tmprepo"+tmprepodir :: IO FilePath+tmprepodir = go (0 :: Int)+ where+ go n = do+ let d = tmpdir ++ "/tmprepo" ++ show n+ ifM (doesDirectoryExist d)+ ( go $ n + 1+ , return d+ ) annexedfile :: String annexedfile = "foo"