git-annex 3.20130107 → 3.20130114
raw patch · 72 files changed
+1160/−187 lines, 72 files
Files
- Annex/Content.hs +51/−37
- Annex/Direct.hs +5/−4
- Assistant/Threads/Committer.hs +5/−3
- Assistant/Threads/MountWatcher.hs +4/−3
- Assistant/Threads/WebApp.hs +9/−9
- Assistant/WebApp/Configurators/AWS.hs +8/−1
- Assistant/WebApp/OtherRepos.hs +3/−2
- CHANGELOG +26/−0
- COPYRIGHT +1/−1
- Command/Add.hs +10/−6
- Command/Drop.hs +1/−0
- Command/Fsck.hs +36/−12
- Command/Get.hs +4/−2
- Command/RecvKey.hs +30/−1
- Command/SendKey.hs +6/−1
- Fields.hs +3/−0
- GitAnnexShell.hs +1/−0
- Remote.hs +3/−3
- Remote/Bup.hs +21/−6
- Remote/Directory.hs +2/−2
- Remote/Git.hs +21/−13
- Remote/Glacier.hs +2/−2
- Remote/Hook.hs +2/−2
- Remote/Rsync.hs +2/−2
- Remote/S3.hs +5/−4
- Remote/WebDAV.hs +8/−6
- Utility/WebApp.hs +3/−3
- debian/changelog +26/−0
- debian/copyright +1/−1
- doc/bugs/Allow_syncing_to_a_specific_directory_on_a_USB_remote.mdwn +9/−0
- doc/bugs/Assistant_uses_obsolete_GDU_volume_monitor.mdwn +26/−0
- doc/bugs/Committer_crashed.mdwn +32/−0
- doc/bugs/Crash_when_adding_jabber_account_.mdwn +30/−0
- doc/bugs/Creating_an_encrypted_S3_does_not_check_for_presence_of_GPG.mdwn +17/−0
- doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn +21/−0
- doc/bugs/No_progress_bars_with_S3.mdwn +21/−0
- doc/bugs/OSX_app_issues/comment_8_f4d5b2645d7f29b80925159efb94a998._comment +8/−0
- doc/bugs/Old_repository_stuck.mdwn +9/−0
- doc/bugs/Switching_from_indirect_mode_to_direct_mode_breaks_duplicates.mdwn +30/−0
- doc/bugs/Update_dependency_on_certificate___62____61___1.3.3.mdwn +64/−0
- doc/bugs/drop_fails_to_see_copies_that_whereis_sees.mdwn +69/−0
- doc/bugs/encryption_given_a_gpg_keyid_still_uses_symmetric_encryption.mdwn +38/−0
- doc/bugs/fsck_should_double-check_when_a_content-check_fails.mdwn +1/−0
- doc/bugs/missing_kde__47__gnome_menu_item..mdwn +29/−0
- doc/bugs/random_files_vanishing_when_assistant_gets_restarted.mdwn +30/−0
- doc/bugs/three_way_sync_via_S3_and_Jabber.mdwn +117/−0
- doc/bugs/webapp_requires_reload_for_notification_bubbles.mdwn +37/−0
- doc/design/assistant/blog/day_165__release_day.mdwn +3/−1
- doc/design/assistant/blog/day_166__a_short_long_day.mdwn +25/−0
- doc/design/assistant/blog/day_167__safe_direct_mode_transfers.mdwn +12/−0
- doc/design/assistant/blog/day_168__back_to_theme.mdwn +18/−0
- doc/design/assistant/blog/day_169__direct_mode_is_safe.mdwn +24/−0
- doc/design/assistant/blog/day_170__bugfixes_and_release.mdwn +8/−0
- doc/design/assistant/desymlink.mdwn +34/−3
- doc/design/assistant/xmpp.mdwn +5/−5
- doc/forum/Assistant_not_syncing_to_Rsync.mdwn +15/−0
- doc/forum/Detached_git_work_tree__63__.mdwn +11/−0
- doc/forum/Syncronisation_of_syncronisation_between_3_repositories__63__.mdwn +11/−0
- doc/git-annex-shell.mdwn +2/−1
- doc/news/version_3.20121127.mdwn +0/−8
- doc/news/version_3.20121211.mdwn +0/−32
- doc/news/version_3.20130114.mdwn +23/−0
- doc/preferred_content/comment_6_b434c0e2aaa132020fd4a01551285376._comment +12/−0
- doc/preferred_content/comment_7_c4acaa237bf1a8512c5e8ea4cdbd11b9._comment +8/−0
- doc/preferred_content/comment_8_ff2a2dc9c566ebd9f570bdfcd7bfc030._comment +27/−0
- doc/sync/comment_3_49560003da47490e4fabd4ab0089f2d7._comment +8/−0
- doc/sync/comment_4_cf29326408e62575085d1f980087c923._comment +8/−0
- doc/todo/windows_support/comment_6_34f1f60b570c389bb1e741b990064a7e._comment +8/−0
- git-annex-shell.1 +2/−1
- git-annex.cabal +1/−1
- templates/documentation/about.hamlet +1/−1
- templates/notifications/longpolling.julius +7/−8
Annex/Content.hs view
@@ -11,11 +11,13 @@ lockContent, calcGitLink, getViaTmp,+ getViaTmpChecked, getViaTmpUnchecked, withTmp, checkDiskSpace, moveAnnex, sendAnnex,+ prepSendAnnex, removeAnnex, fromAnnex, moveBad,@@ -135,7 +137,16 @@ - and if the action succeeds, moves the temp file into - the annex as a key's content. -} getViaTmp :: Key -> (FilePath -> Annex Bool) -> Annex Bool-getViaTmp key action = do+getViaTmp = getViaTmpChecked (return True)++{- Like getViaTmp, but does not check that there is enough disk space+ - for the incoming key. For use when the key content is already on disk+ - and not being copied into place. -}+getViaTmpUnchecked :: Key -> (FilePath -> Annex Bool) -> Annex Bool+getViaTmpUnchecked = finishGetViaTmp (return True)++getViaTmpChecked :: Annex Bool -> Key -> (FilePath -> Annex Bool) -> Annex Bool+getViaTmpChecked check key action = do tmp <- fromRepo $ gitAnnexTmpLocation key -- Check that there is enough free disk space.@@ -148,23 +159,14 @@ ifM (checkDiskSpace Nothing key alreadythere) ( do when e $ thawContent tmp- getViaTmpUnchecked key action+ finishGetViaTmp check key action , return False ) -prepTmp :: Key -> Annex FilePath-prepTmp key = do- tmp <- fromRepo $ gitAnnexTmpLocation key- createAnnexDirectory (parentDir tmp)- return tmp--{- Like getViaTmp, but does not check that there is enough disk space- - for the incoming key. For use when the key content is already on disk- - and not being copied into place. -}-getViaTmpUnchecked :: Key -> (FilePath -> Annex Bool) -> Annex Bool-getViaTmpUnchecked key action = do+finishGetViaTmp :: Annex Bool -> Key -> (FilePath -> Annex Bool) -> Annex Bool+finishGetViaTmp check key action = do tmpfile <- prepTmp key- ifM (action tmpfile)+ ifM (action tmpfile <&&> check) ( do moveAnnex key tmpfile logStatus key InfoPresent@@ -175,6 +177,12 @@ return False ) +prepTmp :: Key -> Annex FilePath+prepTmp key = do+ tmp <- fromRepo $ gitAnnexTmpLocation key+ createAnnexDirectory (parentDir tmp)+ return tmp+ {- Creates a temp file, runs an action on it, and cleans up the temp file. -} withTmp :: Key -> (FilePath -> Annex a) -> Annex a withTmp key action = do@@ -246,7 +254,8 @@ updateCache key src thawContent src liftIO $ replaceFile dest $ moveFile src- liftIO $ forM_ fs $ \f -> replaceFile f $ createLink dest+ liftIO $ forM_ fs $ \f -> replaceFile f $+ void . copyFileExternal dest {- Replaces any existing file with a new version, by running an action. - First, makes sure the file is deleted. Or, if it didn't already exist,@@ -262,34 +271,39 @@ {- Runs an action to transfer an object's content. - - In direct mode, it's possible for the file to change as it's being sent.- - If this happens, returns False. Currently, an arbitrary amount of bad- - data may be sent when this occurs. The send is not retried even if- - another file is known to have the same content; the action may not be- - idempotent.+ - If this happens, runs the rollback action and returns False. The+ - rollback action should remove the data that was transferred.+ -}+sendAnnex :: Key -> (Annex ()) -> (FilePath -> Annex Bool) -> Annex Bool+sendAnnex key rollback sendobject = go =<< prepSendAnnex key+ where+ go Nothing = return False+ go (Just (f, checksuccess)) = do+ r <- sendobject f+ ifM checksuccess+ ( return r+ , do+ rollback+ return False+ )++{- Returns a file that contains an object's content,+ - and an check to run after the transfer is complete. -- - Since objects changing as they're transferred is a somewhat unusual- - situation, and since preventing writes to the file would be expensive,- - annoying or both, we instead detect the situation after the affect,- - and fail. Thus, it's up to the caller to detect a failure and take- - appropriate action. Such as, for example, ensuring that the bad- - data that was sent does not get installed into the annex it's being- - sent to.+ - In direct mode, it's possible for the file to change as it's being sent,+ - and the check detects this case and returns False. -}-sendAnnex :: Key -> (FilePath -> Annex Bool) -> Annex Bool-sendAnnex key a = withObjectLoc key sendobject senddirect+prepSendAnnex :: Key -> Annex (Maybe (FilePath, Annex Bool))+prepSendAnnex key = withObjectLoc key indirect direct where- sendobject = a- senddirect [] = return False- senddirect (f:fs) = do+ indirect f = return $ Just (f, return True)+ direct [] = return Nothing+ direct (f:fs) = do cache <- recordedCache key -- check that we have a good file ifM (compareCache f cache)- ( do- r <- sendobject f- -- see if file changed while it was being sent- ok <- compareCache f cache- return (r && ok)- , senddirect fs+ ( return $ Just (f, compareCache f cache)+ , direct fs ) {- Performs an action, passing it the location to use for a key's content.
Annex/Direct.hs view
@@ -24,6 +24,7 @@ import Types.KeySource import Annex.Content import Annex.Content.Direct+import Utility.CopyFile {- Uses git ls-files to find files that need to be committed, and stages - them into the index. Returns True if some changes were staged. -}@@ -181,11 +182,11 @@ liftIO $ replaceFile f $ moveFile loc , return Nothing )- (loc':_) -> ifM (liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f)- {- Another direct file has the content, so- - hard link to it. -}+ (loc':_) -> ifM (liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc')+ {- Another direct file has the content; copy it. -} ( return $ Just $ do- liftIO $ replaceFile f $ createLink loc'+ liftIO $ replaceFile f $+ void . copyFileExternal loc' , return Nothing )
Assistant/Threads/Committer.hs view
@@ -191,7 +191,7 @@ sanitycheck ks $ do key <- liftAnnex $ do showStart "add" $ keyFilename ks- Command.Add.ingest ks+ Command.Add.ingest $ Just ks done (finishedChange change) (keyFilename ks) key where {- Add errors tend to be transient and will be automatically@@ -241,7 +241,8 @@ maybe noop (liftIO . threadDelaySeconds) delayadd liftAnnex $ do keysources <- mapM Command.Add.lockDown (map changeFile pending)- let inprocess' = map mkinprocess (zip pending keysources)+ let inprocess' = catMaybes $ + map mkinprocess (zip pending keysources) tmpdir <- fromRepo gitAnnexTmpDir openfiles <- S.fromList . map fst3 . filter openwrite <$> liftIO (Lsof.queryDir tmpdir)@@ -260,10 +261,11 @@ | S.member (contentLocation ks) openfiles = Left change check _ change = Right change - mkinprocess (c, ks) = InProcessAddChange+ mkinprocess (c, Just ks) = Just $ InProcessAddChange { changeTime = changeTime c , keySource = ks }+ mkinprocess (_, Nothing) = Nothing canceladd (InProcessAddChange { keySource = ks }) = do warning $ keyFilename ks
Assistant/Threads/MountWatcher.hs view
@@ -96,15 +96,16 @@ ] return True where- startableservices = [gvfs]+ startableservices = [gvfs, gvfsgdu] usableservices = startableservices ++ [kde]- gvfs = "org.gtk.Private.GduVolumeMonitor"+ gvfs = "org.gtk.Private.UDisks2VolumeMonitor"+ gvfsgdu = "org.gtk.Private.GduVolumeMonitor" kde = "org.kde.DeviceNotifications" startOneService :: Client -> [ServiceName] -> Assistant Bool startOneService _ [] = return False startOneService client (x:xs) = do- _ <- liftIO $ callDBus client "StartServiceByName"+ _ <- liftIO $ tryNonAsync $ callDBus client "StartServiceByName" [toVariant x, toVariant (0 :: Word32)] ifM (liftIO $ elem x <$> listServiceNames client) ( do
Assistant/Threads/WebApp.hs view
@@ -35,7 +35,7 @@ import Yesod import Yesod.Static-import Network.Socket (PortNumber)+import Network.Socket (SockAddr) import Data.Text (pack, unpack) thisThread :: String@@ -67,14 +67,14 @@ ( return $ httpDebugLogger app , return app )- runWebApp app' $ \port -> if noannex+ runWebApp app' $ \addr -> if noannex then withTempFile "webapp.html" $ \tmpfile _ ->- go port webapp tmpfile Nothing+ go addr webapp tmpfile Nothing else do let st = threadState assistantdata htmlshim <- runThreadState st $ fromRepo gitAnnexHtmlShim urlfile <- runThreadState st $ fromRepo gitAnnexUrlFile- go port webapp htmlshim (Just urlfile)+ go addr webapp htmlshim (Just urlfile) where thread = NamedThread thisThread getreldir@@ -82,13 +82,13 @@ | otherwise = Just <$> (relHome =<< absPath =<< runThreadState (threadState assistantdata) (fromRepo repoPath))- go port webapp htmlshim urlfile = do- let url = myUrl webapp port+ go addr webapp htmlshim urlfile = do+ let url = myUrl webapp addr maybe noop (`writeFileProtected` url) urlfile writeHtmlShim "Starting webapp..." url htmlshim maybe noop (\a -> a url htmlshim) onstartup -myUrl :: WebApp -> PortNumber -> Url-myUrl webapp port = unpack $ yesodRender webapp urlbase HomeR []+myUrl :: WebApp -> SockAddr -> Url+myUrl webapp addr = unpack $ yesodRender webapp urlbase HomeR [] where- urlbase = pack $ "http://localhost:" ++ show port+ urlbase = pack $ "http://" ++ show addr
Assistant/WebApp/Configurators/AWS.hs view
@@ -25,6 +25,7 @@ import qualified Data.Text as T import qualified Data.Map as M+import Data.Char awsConfigurator :: Widget -> Handler RepHtml awsConfigurator = page "Add an Amazon repository" (Just Configuration)@@ -175,8 +176,14 @@ remotename <- runAnnex name $ fromRepo $ uniqueRemoteName name 0 liftIO $ AWS.setCredsEnv (T.unpack ak, T.unpack sk) r <- liftAssistant $ liftAnnex $ addRemote $ do- makeSpecialRemote name remotetype config+ makeSpecialRemote hostname remotetype config return remotename setup r liftAssistant $ syncNewRemote r redirect $ EditNewCloudRepositoryR $ Remote.uuid r+ where+ {- AWS services use the remote name as the basis for a host+ - name, so filter it to contain valid characters. -}+ hostname = case filter isAlphaNum name of+ [] -> "aws"+ n -> n
Assistant/WebApp/OtherRepos.hs view
@@ -33,8 +33,9 @@ pwd <- getCurrentDirectory dirs <- filter (\d -> not $ d `dirContains` pwd) . nub <$> ifM (doesFileExist f) ( lines <$> readFile f, return [])- names <- mapM relHome dirs- return $ sort $ zip names dirs+ gooddirs <- filterM doesDirectoryExist dirs+ names <- mapM relHome gooddirs+ return $ sort $ zip names gooddirs {- Starts up the assistant in the repository, and waits for it to create - a gitAnnexUrlFile. Waits for the assistant to be up and listening for
CHANGELOG view
@@ -1,3 +1,29 @@+git-annex (3.20130114) unstable; urgency=low++ * Now handles the case where a file that's being transferred to a remote+ is modified in place, which direct mode allows. When this+ happens, the transfer now fails, rather than allow possibly corrupt+ data into the remote.+ * fsck: Better checking of file content in direct mode.+ * drop: Suggest using git annex move when numcopies prevents dropping a file.+ * webapp: Repo switcher filters out repos that do not exist any more+ (or are on a drive that's not mounted).+ * webapp: Use IP address, rather than localhost, since some systems may+ have configuration problems or other issues that prevent web browsers+ from connecting to the right localhost IP for the webapp.+ * webapp: Adjust longpoll code to work with recent versions of+ shakespeare-js.+ * assistant: Support new gvfs dbus names used in Gnome 3.6.+ * In direct mode, files with the same key are no longer hardlinked, as+ that would cause a surprising behavior if modifying one, where the other+ would also change.+ * webapp: Avoid illegal characters in hostname when creating S3 or+ Glacier remote.+ * assistant: Avoid committer crashing if a file is deleted at the wrong+ instant.++ -- Joey Hess <joeyh@debian.org> Mon, 14 Jan 2013 15:25:18 -0400+ git-annex (3.20130107) unstable; urgency=low * webapp: Add UI to stop and restart assistant.
COPYRIGHT view
@@ -2,7 +2,7 @@ Source: native package Files: *-Copyright: © 2010-2012 Joey Hess <joey@kitenet.net>+Copyright: © 2010-2013 Joey Hess <joey@kitenet.net> License: GPL-3+ Files: Assistant/WebApp.hs Assistant/WebApp/* templates/* static/*
Command/Add.hs view
@@ -58,13 +58,16 @@ {- The file that's being added is locked down before a key is generated, - to prevent it from being modified in between. It's hard linked into a - temporary location, and its writable bits are removed. It could still be- - written to by a process that already has it open for writing. -}-lockDown :: FilePath -> Annex KeySource+ - written to by a process that already has it open for writing.+ -+ - Lockdown can fail if a file gets deleted, and Nothing will be returned.+ -}+lockDown :: FilePath -> Annex (Maybe KeySource) lockDown file = do- liftIO $ preventWrite file tmp <- fromRepo gitAnnexTmpDir createAnnexDirectory tmp- liftIO $ do+ liftIO $ catchMaybeIO $ do+ preventWrite file (tmpfile, h) <- openTempFile tmp (takeFileName file) hClose h nukeFile tmpfile@@ -76,8 +79,9 @@ - In direct mode, leaves the file alone, and just updates bookkeeping - information. -}-ingest :: KeySource -> Annex (Maybe Key)-ingest source = do+ingest :: (Maybe KeySource) -> Annex (Maybe Key)+ingest Nothing = return Nothing+ingest (Just source) = do backend <- chooseBackend $ keyFilename source ifM isDirect ( do
Command/Drop.hs view
@@ -133,6 +133,7 @@ " necessary copies" Remote.showTriedRemotes bad Remote.showLocations key (have++skip)+ "Rather than dropping this file, try using: git annex move" hint return False where
Command/Fsck.hs view
@@ -16,6 +16,7 @@ import qualified Types.Key import qualified Backend import Annex.Content+import Annex.Content.Direct import Annex.Perms import Logs.Location import Logs.Trust@@ -301,30 +302,45 @@ {- Runs the backend specific check on a key's content. -- - In direct mode, this is skipped, because files can change at any time. -}+ - In direct mode this is not done if the file has clearly been modified,+ - because modification of direct mode files is allowed. It's still done+ - if the file does not appear modified, to catch disk corruption, etc.+ -} checkBackend :: Backend -> Key -> Annex Bool-checkBackend backend key = ifM isDirect- ( return True- , do- file <- inRepo $ gitAnnexLocation key- checkBackendOr badContent backend key file- )+checkBackend backend key = do+ file <- inRepo $ gitAnnexLocation key+ ifM isDirect+ ( ifM (goodContent key file)+ ( checkBackendOr' (badContentDirect file) backend key file+ (goodContent key file)+ , return True+ )+ , checkBackendOr badContent backend key file+ ) checkBackendRemote :: Backend -> Key -> Remote -> Maybe FilePath -> Annex Bool checkBackendRemote backend key remote = maybe (return True) go where- go = checkBackendOr (badContentRemote remote) backend key+ go file = checkBackendOr (badContentRemote remote) backend key file checkBackendOr :: (Key -> Annex String) -> Backend -> Key -> FilePath -> Annex Bool checkBackendOr bad backend key file =+ checkBackendOr' bad backend key file (return True)++checkBackendOr' :: (Key -> Annex String) -> Backend -> Key -> FilePath -> Annex Bool -> Annex Bool+checkBackendOr' bad backend key file postcheck = case Types.Backend.fsckKey backend of Nothing -> return True Just a -> do ok <- a key file- unless ok $ do- msg <- bad key- warning $ "Bad file content; " ++ msg- return ok+ ifM postcheck+ ( do+ unless ok $ do+ msg <- bad key+ warning $ "Bad file content; " ++ msg+ return ok+ , return True+ ) checkKeyNumCopies :: Key -> FilePath -> Maybe Int -> Annex Bool checkKeyNumCopies key file numcopies = do@@ -359,6 +375,14 @@ badContent key = do dest <- moveBad key return $ "moved to " ++ dest++{- Bad content is left where it is, but we touch the file, so it'll be+ - committed to a new key. -}+badContentDirect :: FilePath -> Key -> Annex String+badContentDirect file key = do+ void $ liftIO $ catchMaybeIO $ touchFile file+ logStatus key InfoMissing+ return $ "left in place for you to examine" badContentRemote :: Remote -> Key -> Annex String badContentRemote remote key = do
Command/Get.hs view
@@ -48,18 +48,20 @@ where dispatch [] = do showNote "not available"- Remote.showLocations key []+ showlocs return False dispatch remotes = trycopy remotes remotes trycopy full [] = do Remote.showTriedRemotes full- Remote.showLocations key []+ showlocs return False trycopy full (r:rs) = ifM (probablyPresent r) ( docopy r (trycopy full rs) , trycopy full rs )+ showlocs = Remote.showLocations key [] $+ "No other repository is known to contain the file." -- This check is to avoid an ugly message if a remote is a -- drive that is not mounted. probablyPresent r
Command/RecvKey.hs view
@@ -14,6 +14,10 @@ import Utility.Rsync import Logs.Transfer import Command.SendKey (fieldTransfer)+import qualified Fields+import qualified Types.Key+import qualified Types.Backend+import qualified Backend def :: [Command] def = [noCommit $ command "recvkey" paramKey seek@@ -26,7 +30,7 @@ start key = ifM (inAnnex key) ( error "key is already present in annex" , fieldTransfer Download key $ \_p -> do- ifM (getViaTmp key $ liftIO . rsyncServerReceive)+ ifM (getViaTmp key go) ( do -- forcibly quit after receiving one key, -- and shutdown cleanly@@ -35,3 +39,28 @@ , return False ) )+ where+ go tmp = ifM (liftIO $ rsyncServerReceive tmp)+ ( ifM (isJust <$> Fields.getField Fields.direct)+ ( directcheck tmp+ , return True+ )+ , return False+ )+ {- If the sending repository uses direct mode, the file+ - it sends could be modified as it's sending it. So check+ - that the right size file was received, and that the key/value+ - Backend is happy with it. -}+ directcheck tmp = do+ oksize <- case Types.Key.keySize key of+ Nothing -> return True+ Just size -> do+ size' <- fromIntegral . fileSize+ <$> liftIO (getFileStatus tmp)+ return $ size == size'+ if oksize+ then case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of+ Nothing -> return False+ Just backend -> maybe (return True) (\a -> a key tmp)+ (Types.Backend.fsckKey backend)+ else return False
Command/SendKey.hs view
@@ -24,11 +24,16 @@ start :: Key -> CommandStart start key = ifM (inAnnex key) ( fieldTransfer Upload key $ \_p ->- sendAnnex key $ liftIO . rsyncServerSend+ sendAnnex key rollback $ liftIO . rsyncServerSend , do warning "requested key is not present" liftIO exitFailure )+ where+ {- No need to do any rollback; when sendAnnex fails, a nonzero+ - exit will be propigated, and the remote will know the transfer+ - failed. -}+ rollback = noop fieldTransfer :: Direction -> Key -> (MeterUpdate -> Annex Bool) -> CommandStart fieldTransfer direction key a = do
Fields.hs view
@@ -30,3 +30,6 @@ associatedFile = Field "associatedfile" $ \f -> -- is the file a safe relative filename? not (isAbsolute f) && not ("../" `isPrefixOf` f)++direct :: Field+direct = Field "direct" $ \f -> f == "1"
GitAnnexShell.hs view
@@ -122,6 +122,7 @@ checkField (field, value) | field == fieldName remoteUUID = fieldCheck remoteUUID value | field == fieldName associatedFile = fieldCheck associatedFile value+ | field == fieldName direct = fieldCheck direct value | otherwise = False failure :: IO ()
Remote.hs view
@@ -199,8 +199,8 @@ return (sort validremotes, validtrusteduuids) {- Displays known locations of a key. -}-showLocations :: Key -> [UUID] -> Annex ()-showLocations key exclude = do+showLocations :: Key -> [UUID] -> String -> Annex ()+showLocations key exclude nolocmsg = do u <- getUUID uuids <- keyLocations key untrusteduuids <- trustGet UnTrusted@@ -211,7 +211,7 @@ showLongNote $ message ppuuidswanted ppuuidsskipped where filteruuids l x = filter (`notElem` x) l- message [] [] = "No other repository is known to contain the file."+ message [] [] = nolocmsg message rs [] = "Try making some of these repositories available:\n" ++ rs message [] us = "Also these untrusted repositories may contain the file:\n" ++ us message rs us = message rs [] ++ message [] us
Remote/Bup.hs view
@@ -121,16 +121,17 @@ (os ++ [Param "-n", Param (bupRef k)] ++ src) store :: Remote -> BupRepo -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool-store r buprepo k _f _p = sendAnnex k $ \src -> do+store r buprepo k _f _p = sendAnnex k (rollback k buprepo) $ \src -> do params <- bupSplitParams r buprepo k [File src] liftIO $ boolSystem "bup" params storeEncrypted :: Remote -> BupRepo -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool-storeEncrypted r buprepo (cipher, enck) k _p = sendAnnex k $ \src -> do- params <- bupSplitParams r buprepo enck []- liftIO $ catchBoolIO $- encrypt cipher (feedFile src) $ \h ->- pipeBup params (Just h) Nothing+storeEncrypted r buprepo (cipher, enck) k _p =+ sendAnnex k (rollback enck buprepo) $ \src -> do+ params <- bupSplitParams r buprepo enck []+ liftIO $ catchBoolIO $+ encrypt cipher (feedFile src) $ \h ->+ pipeBup params (Just h) Nothing retrieve :: BupRepo -> Key -> AssociatedFile -> FilePath -> Annex Bool retrieve buprepo k _f d = do@@ -156,6 +157,20 @@ remove _ = do warning "content cannot be removed from bup remote" return False++{- Cannot revert having stored a key in bup, but at least the data for the+ - key will be used for deltaing data of other keys stored later.+ -+ - We can, however, remove the git branch that bup created for the key.+ -}+rollback :: Key -> BupRepo -> Annex ()+rollback k bupr = go =<< liftIO (bup2GitRemote bupr)+ where+ go r+ | Git.repoIsUrl r = void $ onBupRemote r boolSystem "git" params+ | otherwise = void $ liftIO $ catchMaybeIO $+ boolSystem "git" $ Git.Command.gitCommandLine params r+ params = [ Params "branch -D", Param (bupRef k) ] {- Bup does not provide a way to tell if a given dataset is present - in a bup repository. One way it to check if the git repository has
Remote/Directory.hs view
@@ -111,7 +111,7 @@ withStoredFiles = withCheckedFiles doesFileExist store :: FilePath -> ChunkSize -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool-store d chunksize k _f p = sendAnnex k $ \src ->+store d chunksize k _f p = sendAnnex k (void $ remove d k) $ \src -> metered (Just p) k $ \meterupdate -> storeHelper d chunksize k $ \dests -> case chunksize of@@ -125,7 +125,7 @@ =<< L.readFile src storeEncrypted :: FilePath -> ChunkSize -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool-storeEncrypted d chunksize (cipher, enck) k p = sendAnnex k $ \src -> +storeEncrypted d chunksize (cipher, enck) k p = sendAnnex k (void $ remove d enck) $ \src -> metered (Just p) k $ \meterupdate -> storeHelper d chunksize enck $ \dests -> encrypt cipher (feedFile src) $ readBytes $ \b ->
Remote/Git.hs view
@@ -268,12 +268,16 @@ -- run copy from perspective of remote liftIO $ onLocal (repo r) $ do ensureInitialized- Annex.Content.sendAnnex key $ \object ->- upload u key file noRetry $- rsyncOrCopyFile params object dest+ v <- Annex.Content.prepSendAnnex key+ case v of+ Nothing -> return False+ Just (object, checksuccess) ->+ upload u key file noRetry+ (rsyncOrCopyFile params object dest)+ <&&> checksuccess | Git.repoIsSsh (repo r) = feedprogressback $ \feeder -> rsyncHelper (Just feeder) - =<< rsyncParamsRemote r True key dest file+ =<< rsyncParamsRemote r Download key dest file | Git.repoIsHttp (repo r) = Annex.Content.downloadUrl (keyUrls (repo r) key) dest | otherwise = error "copying from non-ssh, non-http repo not supported" where@@ -331,13 +335,15 @@ copyToRemote :: Remote -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool copyToRemote r key file p | not $ Git.repoIsUrl (repo r) =- guardUsable (repo r) False $ commitOnCleanup r $ copylocal+ guardUsable (repo r) False $ commitOnCleanup r $+ copylocal =<< Annex.Content.prepSendAnnex key | Git.repoIsSsh (repo r) = commitOnCleanup r $- Annex.Content.sendAnnex key $ \object ->- rsyncHelper (Just p) =<< rsyncParamsRemote r False key object file+ Annex.Content.sendAnnex key noop $ \object ->+ rsyncHelper (Just p) =<< rsyncParamsRemote r Upload key object file | otherwise = error "copying to non-ssh repo not supported" where- copylocal = Annex.Content.sendAnnex key $ \object -> do+ copylocal Nothing = return False+ copylocal (Just (object, checksuccess)) = do let params = rsyncParams r u <- getUUID -- run copy from perspective of remote@@ -347,7 +353,7 @@ ensureInitialized download u key file noRetry $ Annex.Content.saveState True `after`- Annex.Content.getViaTmp key+ Annex.Content.getViaTmpChecked checksuccess key (\d -> rsyncOrCopyFile params object d p) ) @@ -389,19 +395,21 @@ {- Generates rsync parameters that ssh to the remote and asks it - to either receive or send the key's content. -}-rsyncParamsRemote :: Remote -> Bool -> Key -> FilePath -> AssociatedFile -> Annex [CommandParam]-rsyncParamsRemote r sending key file afile = do+rsyncParamsRemote :: Remote -> Direction -> Key -> FilePath -> AssociatedFile -> Annex [CommandParam]+rsyncParamsRemote r direction key file afile = do u <- getUUID+ direct <- isDirect let fields = (Fields.remoteUUID, fromUUID u)+ : (Fields.direct, if direct then "1" else "") : maybe [] (\f -> [(Fields.associatedFile, f)]) afile Just (shellcmd, shellparams) <- git_annex_shell (repo r)- (if sending then "sendkey" else "recvkey")+ (if direction == Download then "sendkey" else "recvkey") [ Param $ key2file key ] fields -- Convert the ssh command into rsync command line. let eparam = rsyncShell (Param shellcmd:shellparams) let o = rsyncParams r- if sending+ if direction == Download then return $ o ++ rsyncopts eparam dummy (File file) else return $ o ++ rsyncopts eparam (File file) dummy where
Remote/Glacier.hs view
@@ -85,12 +85,12 @@ | keySize k == Just 0 = do warning "Cannot store empty files in Glacier." return False- | otherwise = sendAnnex k $ \src ->+ | otherwise = sendAnnex k (void $ remove r k) $ \src -> metered (Just m) k $ \meterupdate -> storeHelper r k $ streamMeteredFile src meterupdate storeEncrypted :: Remote -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool-storeEncrypted r (cipher, enck) k m = sendAnnex k $ \src -> do+storeEncrypted r (cipher, enck) k m = sendAnnex k (void $ remove r enck) $ \src -> do metered (Just m) k $ \meterupdate -> storeHelper r enck $ \h -> encrypt cipher (feedFile src)
Remote/Hook.hs view
@@ -103,12 +103,12 @@ ) store :: String -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool-store h k _f _p = sendAnnex k $ \src ->+store h k _f _p = sendAnnex k (void $ remove h k) $ \src -> runHook h "store" k (Just src) $ return True storeEncrypted :: String -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool storeEncrypted h (cipher, enck) k _p = withTmp enck $ \tmp ->- sendAnnex k $ \src -> do+ sendAnnex k (void $ remove h enck) $ \src -> do liftIO $ encrypt cipher (feedFile src) $ readBytes $ L.writeFile tmp runHook h "store" enck (Just tmp) $ return True
Remote/Rsync.hs view
@@ -101,11 +101,11 @@ f = keyFile k store :: RsyncOpts -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool-store o k _f p = sendAnnex k $ rsyncSend o p k+store o k _f p = sendAnnex k (void $ remove o k) $ rsyncSend o p k storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool storeEncrypted o (cipher, enck) k p = withTmp enck $ \tmp ->- sendAnnex k $ \src -> do+ sendAnnex k (void $ remove o enck) $ \src -> do liftIO $ encrypt cipher (feedFile src) $ readBytes $ L.writeFile tmp rsyncSend o p enck tmp
Remote/S3.hs view
@@ -112,15 +112,16 @@ M.delete "bucket" defaults store :: Remote -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool-store r k _f p = s3Action r False $ \(conn, bucket) -> sendAnnex k $ \src -> do- res <- storeHelper (conn, bucket) r k p src- s3Bool res+store r k _f p = s3Action r False $ \(conn, bucket) -> + sendAnnex k (void $ remove r k) $ \src -> do+ res <- storeHelper (conn, bucket) r k p src+ s3Bool res storeEncrypted :: Remote -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool storeEncrypted r (cipher, enck) k p = s3Action r False $ \(conn, bucket) -> -- To get file size of the encrypted content, have to use a temp file. -- (An alternative would be chunking to to a constant size.)- withTmp enck $ \tmp -> sendAnnex k $ \src -> do+ withTmp enck $ \tmp -> sendAnnex k (void $ remove r enck) $ \src -> do liftIO $ encrypt cipher (feedFile src) $ readBytes $ L.writeFile tmp res <- storeHelper (conn, bucket) r enck p tmp
Remote/WebDAV.hs view
@@ -83,15 +83,17 @@ store :: Remote -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool store r k _f p = metered (Just p) k $ \meterupdate ->- davAction r False $ \(baseurl, user, pass) -> sendAnnex k $ \src ->- liftIO $ withMeteredFile src meterupdate $- storeHelper r k baseurl user pass+ davAction r False $ \(baseurl, user, pass) -> + sendAnnex k (void $ remove r k) $ \src ->+ liftIO $ withMeteredFile src meterupdate $+ storeHelper r k baseurl user pass storeEncrypted :: Remote -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool storeEncrypted r (cipher, enck) k p = metered (Just p) k $ \meterupdate ->- davAction r False $ \(baseurl, user, pass) -> sendAnnex k $ \src ->- liftIO $ encrypt cipher (streamMeteredFile src meterupdate) $- readBytes $ storeHelper r enck baseurl user pass+ davAction r False $ \(baseurl, user, pass) ->+ sendAnnex k (void $ remove r enck) $ \src ->+ liftIO $ encrypt cipher (streamMeteredFile src meterupdate) $+ readBytes $ storeHelper r enck baseurl user pass storeHelper :: Remote -> Key -> DavUrl -> DavUser -> DavPass -> L.ByteString -> IO Bool storeHelper r k baseurl user pass b = catchBoolIO $ do
Utility/WebApp.hs view
@@ -54,14 +54,14 @@ {- Binds to a socket on localhost, and runs a webapp on it. -- - An IO action can also be run, to do something with the port number,+ - An IO action can also be run, to do something with the address, - such as start a web browser to view the webapp. -}-runWebApp :: Wai.Application -> (PortNumber -> IO ()) -> IO ()+runWebApp :: Wai.Application -> (SockAddr -> IO ()) -> IO () runWebApp app observer = do sock <- localSocket void $ forkIO $ runSettingsSocket defaultSettings sock app- observer =<< socketPort sock+ observer =<< getSocketName sock {- Binds to a local socket, selecting any free port. -
debian/changelog view
@@ -1,3 +1,29 @@+git-annex (3.20130114) unstable; urgency=low++ * Now handles the case where a file that's being transferred to a remote+ is modified in place, which direct mode allows. When this+ happens, the transfer now fails, rather than allow possibly corrupt+ data into the remote.+ * fsck: Better checking of file content in direct mode.+ * drop: Suggest using git annex move when numcopies prevents dropping a file.+ * webapp: Repo switcher filters out repos that do not exist any more+ (or are on a drive that's not mounted).+ * webapp: Use IP address, rather than localhost, since some systems may+ have configuration problems or other issues that prevent web browsers+ from connecting to the right localhost IP for the webapp.+ * webapp: Adjust longpoll code to work with recent versions of+ shakespeare-js.+ * assistant: Support new gvfs dbus names used in Gnome 3.6.+ * In direct mode, files with the same key are no longer hardlinked, as+ that would cause a surprising behavior if modifying one, where the other+ would also change.+ * webapp: Avoid illegal characters in hostname when creating S3 or+ Glacier remote.+ * assistant: Avoid committer crashing if a file is deleted at the wrong+ instant.++ -- Joey Hess <joeyh@debian.org> Mon, 14 Jan 2013 15:25:18 -0400+ git-annex (3.20130107) unstable; urgency=low * webapp: Add UI to stop and restart assistant.
debian/copyright view
@@ -2,7 +2,7 @@ Source: native package Files: *-Copyright: © 2010-2012 Joey Hess <joey@kitenet.net>+Copyright: © 2010-2013 Joey Hess <joey@kitenet.net> License: GPL-3+ Files: Assistant/WebApp.hs Assistant/WebApp/* templates/* static/*
+ doc/bugs/Allow_syncing_to_a_specific_directory_on_a_USB_remote.mdwn view
@@ -0,0 +1,9 @@+This follows up to the [comment made by Laszlo](http://git-annex.branchable.com/design/assistant/polls/what_is_preventing_me_from_using_git-annex_assistant/#comment-f26d3b6b45bb66601ecfaa883ace161c) on the [recent poll](http://git-annex.branchable.com/design/assistant/polls/what_is_preventing_me_from_using_git-annex_assistant/).++I too need to be able to select the directory on the remote drive that the annex will be synced to.++If I just add a remote drive via the web app, it syncs the repository to `/mnt/usb/annex`, and it looks like it just creates a bare repository in that folder. I need the repository to be synced to something like `/mnt/usb/subfolder/myspecifiedfoldername` and I need that remote to be a full repository.++My use case is that I use the USB drive to keep annexes in sync between two computers. I have multiple annexes that need to be synced between the two computers, and none of them are in a directory called `annex`. I also need to be able to plug the drive into other computers and access the files directly, without doing a `git clone` or anything like that. I have all of this setup and working fine with just plain old git annex, but the web app does not seem to support creating new repositories with this workflow.++I think it makes a lot of sense to allow the web application to add a new remote that is simply a directory. People like me could specify the path of the directory to be on the mounted USB drive. Others may want to add a remote that is a mounted network share or something like that.
+ doc/bugs/Assistant_uses_obsolete_GDU_volume_monitor.mdwn view
@@ -0,0 +1,26 @@+### What steps will reproduce the problem?++Run `git annex assistant`.+++### What is the expected output? What do you see instead?++git-annex complains:++ dbus failed; falling back to mtab polling (ClientError {clientErrorMessage =+ "Call failed: The name org.gtk.Private.GduVolumeMonitor was not provided+ by any .service files", clientErrorFatal = False})++This is because the `gvfs-gdu-volume-monitor` daemon has been obsoleted and removed from GNOME 3.6 (maybe even earlier).++git-annex should start using `gvfs-udisks2-volume-monitor` at bus name `org.gtk.Private.UDisks2VolumeMonitor`.++Alternatively, git-annex should stop relying on any per-user services, and use kernel interfaces directly when available. (This way, monitoring could work even if the user wasn't logged in and/or didn't have a DBus session bus.)++ * On all Linux kernels since 2.6.15, the `/proc/self/mounts` file is pollable – you can use **select(), poll() or epoll** to detect new mounted filesystems, without having to rely on periodic checks. (Run `findmnt -p` to see it in action.)++ * On BSD systems, kqueue on `/etc/mtab`.++### What version of git-annex are you using? On what operating system?++git-annex 3.20130102 on Linux 3.7.1, GNOME 3.7
+ doc/bugs/Committer_crashed.mdwn view
@@ -0,0 +1,32 @@+# What steps will reproduce the problem?++Editing a text file with vim++#What is the expected output? What do you see instead?++ # On branch master+ # Changes not staged for commit:++ # (use "git add <file>..." to update what will be committed)+ # (use "git checkout -- <file>..." to discard changes in working directory)+ #+ # typechange: test+ #+ # Untracked files:+ # (use "git add <file>..." to include in what will be committed)+ #+ # .test.swp++ no changes added to commit (use "git add" and/or "git commit -a")++ /.test.swp still has writers, not adding++ Committer crashed: ./test~: createLink: does not exist (No such file or directory)++# What version of git-annex are you using? On what operating system?++3.20130107 prebuilt tar ball on Debian testing++> Could also fail in `getFileStatus`. In either case it's a race+> with the file being deleted while it's still in the process of being+> locked down. Fixed this [[done]] --[[Joey]]
+ doc/bugs/Crash_when_adding_jabber_account_.mdwn view
@@ -0,0 +1,30 @@+*What steps will reproduce the problem?*++1. Start git-annex webapp+2. Configuration+3. Configure Jabber Account+4. Insert user and pass+5. Click "User this account"++Tryed 4 times, all the same.+++*What is the expected output? What do you see instead?*++On Chrome I get "Error 101 (net::ERR_CONNECTION_RESET): The connection was reset." or "Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data."++On the terminal where git-annex was running I get "Segmentation fault (core dumped)"+++*What version of git-annex are you using? On what operating system?*++git-annex version: I downloaded 3.20130107 (twice to be sure), but for some reason 'git-annex version' reports 3.20130102 ++OS: Ubuntu 12.04.1 LTS 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux+++*Please provide any additional information below.*++On dmesg: +[45773.212717] git-annex[26779]: segfault at b724e840 ip 09699150 sp b4cfd038 error 7 in git-annex[8048000+1762000]+
+ doc/bugs/Creating_an_encrypted_S3_does_not_check_for_presence_of_GPG.mdwn view
@@ -0,0 +1,17 @@+What steps will reproduce the problem?++Don't have gpg installed/on your $PATH, and attempt to create an encrypted S3 remote via the web interface.++What is the expected output? What do you see instead?++Expected to be told to install GPG. Actual output was a Yesod error:++Internal Server Error+user error (gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--gen-random","--armor","1","512"] exited 127)++What version of git-annex are you using? On what operating system?++3.20130107 on Fedora 17 (64-bit).++Please provide any additional information below.+
+ doc/bugs/Internal_server_error_adding_USB_drive_on_OS_X.mdwn view
@@ -0,0 +1,21 @@+What steps will reproduce the problem?++* Start with a clean setup.+* Allow webapp to start; use it to create annex in ~/Documents/annex That works.+* Go to add remote repo. Removable drive.+* Select "/Volumes/G-DRIVE slim". Click next.++What is the expected output? What do you see instead?+Expected is something like "done". What I see is++Internal Server Error++git config [Param "annex.uuid",Param "6898F314-7817-4CD5-B1C3-588C55522A3B"] failed++What version of git-annex are you using? On what operating system?++git-annex version 3.20130107, OS X Mountain Lion. No MacPorts/homebrew/fink installed. gcc / git are installed.++Please provide any additional information below.++Maybe something to do with the drive name having spaces? "/Volumes/git-annex" worked fine.
+ doc/bugs/No_progress_bars_with_S3.mdwn view
@@ -0,0 +1,21 @@+## What steps will reproduce the problem?++Add new data to a repository with an S3 special remote. Monitor the repository with the web app.+++## What is the expected output? What do you see instead?++I expect a changing status bar and percentage. Instead I see no changes when an upload becomes active.+++## What version of git-annex are you using? On what operating system?++3.20130102 on Arch 64-bit.+++## Please provide any additional information below.+++When uploading local data to an S3 remote, I see no progress bars. The progress bar area on active uploads stays the same grey as the bar on queued uploads. The status does not change from "0% of...". The uploads are completing, but this makes it very difficult to judge their activity.++The only remotes I currently have setup are S3 special remotes, so I cannot say whether progress bars are working for uploads to other remote types.
+ doc/bugs/OSX_app_issues/comment_8_f4d5b2645d7f29b80925159efb94a998._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmOsimKUgz6rxpmsS_nrBQGavEYyUpDlsE"+ nickname="Tim"+ subject="OS X 10.8.2"+ date="2013-01-11T00:07:54Z"+ content="""+Double click on the app, give permission for it to run and ... nothing+"""]]
+ doc/bugs/Old_repository_stuck.mdwn view
@@ -0,0 +1,9 @@+I had created a test repository a time ago with an old version of git-annex. I didn't really used it so I simply deleted the directory by hand. Now I've installed a new version of git-annex and the old repository stills appears on the webapp, but there is no interface to delete it.++* Old git-annex version: don't remember +* New git-annex version: I downloaded 3.20130107 (twice to be sure), but for some reason 'git-annex version' reports 3.20130102+* OS: Ubuntu 12.04.1 LTS 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux++> This is [[fixed|done]] in git; assuming the repo was showing up+> in the upper-right menu for switching amoung local repositories.+> --[[Joey]]
+ doc/bugs/Switching_from_indirect_mode_to_direct_mode_breaks_duplicates.mdwn view
@@ -0,0 +1,30 @@+#What steps will reproduce the problem?++1. Create a new repository in indirect mode.++2. Add the same file twice under a different name. Now you have two symlinks pointing to the same file under .git/annex/objects/++3. Switch to direct mode. The first symlink gets replaced by the actual file. The second stays unchanged, pointing to nowhere. But git annex whereis still reports it has a copy.++4. Delete the first file. Git annex whereis still thinks it has a copy of file 2, which is not true -> data loss.++#What is the expected output? What do you see instead?++When switching to direct mode, both symlinks should be replaced by a copy (or at least a hardlink) of the actual file.++> The typo that caused this bug is fixed. --[[Joey]] ++#What version of git-annex are you using? On what operating system?++3.20130107 on Arch Linux x64++#Please provide any additional information below.++The deduplication performed by git-annex is very dangerous in itself+because files with identical content become replaced by references to the+same file without the user necessarily being aware. Think of the user+making a copy of a file, than modifying it. He would expect to end up with+two files, the unchanged original and the modified copy. But what he really+gets is two symlinks pointing to the same modified file.++> I agree, it now copies rather than hard linking. [[done]] --[[Joey]]
+ doc/bugs/Update_dependency_on_certificate___62____61___1.3.3.mdwn view
@@ -0,0 +1,64 @@+What steps will reproduce the problem?++Run:++ cabal install git-annex++What is the expected output? What do you see instead?++The current output is the following:++ $ cabal install git-annex + Resolving dependencies... + Configuring certificate-1.3.2...+ Building certificate-1.3.2...+ Preprocessing library certificate-1.3.2...+ [ 1 of 10] Compiling Data.Certificate.KeyDSA ( Data/Certificate/KeyDSA.hs, dist/build/Data/Certificate/KeyDSA.o )+ [ 2 of 10] Compiling Data.Certificate.KeyRSA ( Data/Certificate/KeyRSA.hs, dist/build/Data/Certificate/KeyRSA.o )+ + Data/Certificate/KeyRSA.hs:64:27:+ `RSA.private_pub' is not a (visible) field of constructor `RSA.PrivateKey'+ cabal: Error: some packages failed to install:+ DAV-0.3 depends on certificate-1.3.2 which failed to install.+ authenticate-1.3.2 depends on certificate-1.3.2 which failed to install.+ certificate-1.3.2 failed during the building phase. The exception was:+ ExitFailure 1+ git-annex-3.20130107 depends on certificate-1.3.2 which failed to install.+ http-conduit-1.8.6.3 depends on certificate-1.3.2 which failed to install.+ http-reverse-proxy-0.1.1.1 depends on certificate-1.3.2 which failed to install.+ tls-1.0.3 depends on certificate-1.3.2 which failed to install.+ tls-extra-0.5.1 depends on certificate-1.3.2 which failed to install.+ yesod-1.1.7.2 depends on certificate-1.3.2 which failed to install.+ yesod-auth-1.1.3 depends on certificate-1.3.2 which failed to install.++I'd rather get a message stating how awesome the software I just installed is. :)++What version of git-annex are you using? On what operating system?++ * Debian (testing)+ * GHC 7.4.1+ * Cabal 1.14.0, cabal-install 0.14.0+ * cabal list git-annex says the installing version is: 3.20130107++Please provide any additional information below.++The certificate package version 1.3.2 does not seem to install properly with+this version of GHC (I think).++Version 1.3.3 solves the issue. I don't know if there is a way for me to+override the dependency tree to try to force the version update with+cabal-install, so maybe it's worth filing a bug.++Thanks a lot for git-annex.++> Welcome to cabal hell! This problem is why haskell's cabal system is not+> a sufficient way for users to install git-annex, and we have to provide+> prebuilt builds.+> +> No change to git-annex can fix this problem. The problem is that+> the old version of certificate got busted by some change to one of its+> dependencies, and several libraries that git-annex depends on have not+> yet been updated to use the new version of certificate. Once those+> libraries get updated, it'll fix itself.+> +> [[done]]; not git-annex bug. --[[Joey]]
+ doc/bugs/drop_fails_to_see_copies_that_whereis_sees.mdwn view
@@ -0,0 +1,69 @@+What steps will reproduce the problem?+------------------------------------------------------++I haven't tried doing this again, but here's what I did:++I was copying files to my usb drive (hugex) with probably this command:++ git annex copy --to=hugex .++While doing that, I did something stupid in another window, and filled my local hard drive (the one I was copying from) and git annex spit out some errors about not being able to write to log files (because my local drive was full.)++I suspended (^Z) git annex, made some hard drive space, then resumed (fg).++At first, git annex whereis didn't see the copies of some of the files in hugex (apparently the ones where git annex had trouble writing the local log files). After a "git remote update hugex" and I think a ``git annex merge``, whereis was able to see both copies.++But git drop can't see both copies, and won't let me drop my local copy. I ran ``git annex fsck .`` on the directory with the now files I was copying above, and that didn't seem to change anything (or report errors.)++Here's a terminal session where I'm showing the problem and some hopefully useful text:++ compy compy compy ~/video/tv/keen-eddie> git annex whereis 02-horse-heir.avi + whereis 02-horse-heir.avi (2 copies) + 5bfe091c-ed07-11df-842e-eb791a485889 -- here (compy)+ e15161ec-f1bf-11df-a7b5-eb1f0e6921ee -- hugex+ ok+ compy compy compy ~/video/tv/keen-eddie> git annex drop 02-horse-heir.avi + drop 02-horse-heir.avi (unsafe) + Could only verify the existence of 1 out of 2 necessary copies++ No other repository is known to contain the file.++ (Use --force to override this check, or adjust annex.numcopies.)+ failed+ git-annex: drop: 1 failed+ zsh: exit 1 git annex drop 02-horse-heir.avi+ compy compy compy ~/video/tv/keen-eddie> ls -lh 02-horse-heir.avi + lrwxrwxrwx 1 jasonwoof jasonwoof 149 Nov 15 04:19 02-horse-heir.avi -> ../../../.git/annex/objects/KV/8G/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7+ compy compy compy ~/video/tv/keen-eddie> ls --dereference -lh 02-horse-heir.avi+ -r--r--r-- 1 jasonwoof jasonwoof 342M Nov 15 04:19 02-horse-heir.avi+ compy compy compy ~/video/tv/keen-eddie> ls -lh ../../../.git/annex/objects/KV/8G/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7+ -r--r--r-- 1 jasonwoof jasonwoof 342M Nov 15 04:19 ../../../.git/annex/objects/KV/8G/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7+ compy compy compy ~/video/tv/keen-eddie> ls -lh /media/hugex/jason/home.git/annex/objects/5bd/6a1/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7+ -r--r--r-- 1 jasonwoof jasonwoof 342M Jan 7 16:27 /media/hugex/jason/home.git/annex/objects/5bd/6a1/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7/SHA1-s358316330--7fcbf33b711e41def269f042842212d0bf3736a7++That last command is showing that the file is indeed in hugex's annex/objects+++Oh, and another wrinkle. hugex is a bare repo. I tried to fsck hugex's video/tv directory, but it said that directory doesn't exist (I assume because there's no working copy.)+++What is the expected output? What do you see instead?+------------------------------------------------------------------------------++I'd like ``git annex drop`` to have the same kind of confidence in the copies of these files on hugex.++How can I resolve this. I tried ``git annex copy --to=hugex .`` again, but that command knows that these files are already copied to hugex.++What version of git-annex are you using? On what operating system?++3.20130102 on debian unstable (thanks for packaging!)++Please provide any additional information below.+------------------------------------------------------------------++You can also reach me at ``jason@jasonwoof.com``++> [[done]]; the confusing message has been improved.+> +> BTW, you can use `git annex move` to ensure a file is on another repo and+> drop it locally. --[[Joey]]
+ doc/bugs/encryption_given_a_gpg_keyid_still_uses_symmetric_encryption.mdwn view
@@ -0,0 +1,38 @@+What steps will reproduce the problem?+ % > git annex initremote glacier type=glacier encryption=E9053BDA+ -- SNIP --+ initremote glacier [2013-01-10 14:50:12 PST] read: gpg ["--quiet","--trust-model","always","--with-colons","--list-public-keys","E9053BDA"]+ [2013-01-10 14:50:12 PST] chat: gpg ["--quiet","--trust-model","always","--decrypt"]+ + You need a passphrase to unlock the secret key for+ user: "Andrew Mark Kraut <akraut@gmail.com>"+ 4096-bit ELG key, ID 353E49B9, created 2008-11-11 (main key ID E9053BDA)+ + [2013-01-10 14:50:13 PST] chat: gpg ["--quiet","--trust-model","always","--encrypt","--no-encrypt-to","--no-default-recipient","--recipient","B608B8F6E9053BDA"]+ (encryption updated with gpg key B608B8F6E9053BDA) [2013-01-10 14:50:13 PST] call: glacier ["--region=us-west-1","vault","create","glacier-06D927EC-5761-447B-86AC-CA66040BAC25"]+ [2013-01-10 14:50:13 PST] call: git ["--git-dir=/Users/akraut/Desktop/annex/.git","--work-tree=/Users/akraut/Desktop/annex","config","remote.glacier.annex-glacier","true"]+ [2013-01-10 14:50:13 PST] call: git ["--git-dir=/Users/akraut/Desktop/annex/.git","--work-tree=/Users/akraut/Desktop/annex","config","remote.glacier.annex-uuid","06D927EC-5761-447B-86AC-CA66040BAC25"]+ (gpg) [2013-01-10 14:50:13 PST] chat: gpg ["--quiet","--trust-model","always","--decrypt"]+ + You need a passphrase to unlock the secret key for+ user: "Andrew Mark Kraut <akraut@gmail.com>"+ 4096-bit ELG key, ID 353E49B9, created 2008-11-11 (main key ID E9053BDA)+ + [2013-01-10 14:50:14 PST] chat: gpg ["--quiet","--trust-model","always","--passphrase-fd","8","--symmetric","--force-mdc"]+ ok++What is the expected output? What do you see instead?++> I expect any transfers to this remote (glacier) to use the given gpg key, but instead it uses --symmetric, as you can see above.++What version of git-annex are you using? On what operating system?++ git-annex version: 3.20130107+ local repository version: 3+ default repository version: 3+ supported repository versions: 3+ upgrade supported from repository versions: 0 1 2+++Please provide any additional information below.+
+ doc/bugs/fsck_should_double-check_when_a_content-check_fails.mdwn view
@@ -0,0 +1,1 @@+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.
@@ -0,0 +1,29 @@+What steps will reproduce the problem?+ apt-get install git-annex++++What is the expected output?+ a menu item at kde or gnome at internet> Git Annex , as+http://git-annex.branchable.com/assistant/ shows.++ What do you see instead? no menu item.+++What version of git-annex are you using?+Version: 1:1.7.10.4-1+wheezy1++ On what operating system?+Wheezy+++ Also+I just installed git-annex on a squeeze system and had the same result.++same with ubuntu precise 12.04++> git-annex ships a /usr/share/applications/git-annex.desktop+> file that provies the menu item. But there has never been a version+> 1.7.10. I suspect this is user error; installing a version of git-annex+> that predates the git-annex assistant and expecting it to have the+> assistant and its menu item. [[done]] --[[Joey]]
+ doc/bugs/random_files_vanishing_when_assistant_gets_restarted.mdwn view
@@ -0,0 +1,30 @@+#What steps will reproduce the problem?++Running assistant in foreground on one repository that is paired to another repository, than killing it using CTRL-C and restarting it+++#What is the expected output? What do you see instead?++I get messages like:++ (Recording state in git...)+ # Auf Zweig master+ # Änderungen, die nicht zum Eintragen bereitgestellt sind:+ # (benutze "git add/rm <Datei>..." zum Bereitstellen)+ # (benutze "git checkout -- <Datei>..." um die Änderungen im Arbeitsverzeichnis zu verwerfen)+ #+ # gelöscht: "path/to/file"+ #+ keine Änderungen zum Eintragen hinzugefügt (benutze "git add" und/oder "git commit -a")+ Total 0 (delta 0), reused 0 (delta 0)+ To ssh://stormking@git-annex-volyova-stormking/data/repository/+ 4e2c631..911b80c git-annex -> synced/git-annex+ + Already up-to-date.++Sorry for the german language, I'll try to reproduce it in english, later. After that, the symlinks for the file in the repository are gone. I can get them back by reverting the commit but things like that make me very nervous.+++#What version of git-annex are you using? On what operating system?++3.20130102 on Arch Linux x64
+ doc/bugs/three_way_sync_via_S3_and_Jabber.mdwn view
@@ -0,0 +1,117 @@+## What steps will reproduce the problem?++I wanted to setup a `~/Desktop/annex` synchronised between three machines, my home desktop (`dagon`), my work desktop (`zakaz`) and my laptop (`hastur`).++I set this up via the annex interface, using my gmail account and Amazon S3.++## What is the expected output? What do you see instead?++I expected that anything dropped into `~/Desktop/annex` on any of the three machines would be synced to the other 2.++I ran:+<pre>+ $ echo Created on `hostname` > `hostname`.txt on each of the three machines.+</pre>++What I ended up with was:++* Home desktop (`dagon`): dagon.txt (ok)+* Work desktop (`zakaz`): zakaz.txt (ok) and hastur.txt (broken link)+* Laptop (`hastur`): hastur.txt (ok) and zakaz.txt (broken link)++In each case the local file had been detected and annexed -- "(ok)" means it is a symlink to the annex.++Manually running `git annex sync` on any of the machines didn't change anything. Running `git annex copy --auto --from=DesktopAnnex` on the Work desktop synced the broken hastur.txt but dagon.txt didn't appear. Running the same on my laptop did nothing. Likewise on my home desktop it did nothing. (I'm not sure if running stuff from the CLI is valid when the assistant is running, but I couldn't see a "force refresh" option in the UI)++In the `git log --oneline` my laptop and Work machines both have:+<pre>+3f541e5 Merge commit 'refs/synced/552d29fe-4a86-11e2-819a-9f61585ee7a2/master'+cbee12b +dddc4f0 +d8854e7 Merge commit 'refs/synced/1167ef76-4791-11e2-9bfe-4319f44b8a5f/master'+</pre>++While my home desktop has:+<pre>+43a80d5 git-annex automatic sync+46328db +d8854e7 Merge commit 'refs/synced/1167ef76-4791-11e2-9bfe-4319f44b8a5f/master'+</pre>++There are other commits prior to d8854e7 which appear to be the same on all hosts. d8854e7 was committed in December when I first played with this stuff. All the commits after that were made today as part of the experiment above, with the exception of 43a80d5 on my home desktop with was the removal of a "Test.txt" created last year. This removal also didn't sync to the other two machines.++git-annex status on my home desktop (dagon) shows:+<pre>+semitrusted repositories: 5+ 00000000-0000-0000-0000-000000000001 -- web+ 1167ef76-4791-11e2-9bfe-4319f44b8a5f -- annex on hastur+ 54f6febc-4791-11e2-952f-13bd7a1c79f1 -- here (annex on dagon)+ 552d29fe-4a86-11e2-819a-9f61585ee7a2 -- ian.james.campbell (annex on zakaz)+ ad5c6a4c-4791-11e2-b9f0-53f8af10a9e6 -- DesktopAnnex+</pre>+(DesktopAnnex is the S3 remote, ian.james.campbell is my gmail username)++However the webapp only shows 3 repos:+<pre>+ here (annex on dagon)+ ian.james.campbell (annex on zakaz)+ DesktopAnnex+</pre>++git-annex status on my laptop (hastur) shows only:+<pre>+ 00000000-0000-0000-0000-000000000001 -- web+ 1167ef76-4791-11e2-9bfe-4319f44b8a5f -- here (ijc@hastur:~/Desktop/annex)+ 54f6febc-4791-11e2-952f-13bd7a1c79f1 -- ian.james.campbell (ijc@dagon:~/Desktop/annex)+ ad5c6a4c-4791-11e2-b9f0-53f8af10a9e6 -- DesktopAnnex+</pre>++while the webapp shows:+<pre>+ here (ijc@hastur:~/Desktop/annex)+ ian.james.campbell (ijc@dagon:~/Desktop/annex)+ DesktopAnnex+</pre>++Lastly on my work desktop (zakaz) annex status shows:+<pre>+ 00000000-0000-0000-0000-000000000001 -- web+ 1167ef76-4791-11e2-9bfe-4319f44b8a5f -- annex on hastur+ 54f6febc-4791-11e2-952f-13bd7a1c79f1 -- ian.james.campbell (annex on dagon)+ 552d29fe-4a86-11e2-819a-9f61585ee7a2 -- here (annex on zakaz)+ ad5c6a4c-4791-11e2-b9f0-53f8af10a9e6 -- DesktopAnnex+</pre>++The webapp shows:+<pre>+ here (annex on zakaz)+ ian.james.campbell (annex on dagon)+ DesktopAnnex +</pre>++git-annex sync on any of them shows:+<pre>+$ git annex sync+commit +# On branch master+nothing to commit (working directory clean)+ok+pull ian.james.campbell +fatal: Unable to find remote helper for 'xmpp'+failed+push ian.james.campbell +fatal: Unable to find remote helper for 'xmpp'+failed+git-annex: sync: 2 failed+</pre>++## What version of git-annex are you using? On what operating system?++3.20121211 on Debian Sid. All machines are amd64++## Please provide any additional information below.++I'm not 100% sure this sort of multiway synching is supposed to work, so maybe this is just as expected. If this isn't a bug you could consider it a feature request though ;-)++This issue also made me wonder about how one would go about syncing multiple unrelated annexes via XMPP. Would you need a different gmail account for each? Maybe there is a trick similar to the email local+foo@ thing?+
+ doc/bugs/webapp_requires_reload_for_notification_bubbles.mdwn view
@@ -0,0 +1,37 @@+What steps will reproduce the problem?++> Open Webapp on Mac OSX Mountain Lion++What is the expected output? What do you see instead?++> I expect notification bubbles and transfer progress bars to show and update on the fly, as well as notifications to disappear when I click the X.+> +> Instead, I have to reload the page after clicking an X or to see new bubbles and progress bar updates.++What version of git-annex are you using? On what operating system?++> git-annex version: 3.20130107+> local repository version: 3+> default repository version: 3+> supported repository versions: 3+> upgrade supported from repository versions: 0 1 2+> +> Mac OS X 10.8.2 Build 12C3006+> +> Chrome Version 23.0.1271.101++Please provide any additional information below.++Javascript console error log says "Syntax error on localhost:5" which is this line:++ <link rel="stylesheet" href="/static/css/bootstrap.css"><link rel="stylesheet" href="/static/css/bootstrap-responsive.css"><style>body{padding-top:60px;padding-bottom:40px}.sidebar-nav{padding:9px 0}</style><script src="/static/jquery.full.js"></script><script src="/static/js/bootstrap-dropdown.js"></script><script src="/static/js/bootstrap-modal.js"></script><script src="/static/js/bootstrap-collapse.js"></script><script src="/static/longpolling.js"></script><script>function longpoll_"sidebar"() {++> And the bug is the quoting inside the function name.+> +> I believe this affects all builds done using shakespeare-js 1.0.0.2.+> It may be that some browsers manage to run the javascript despite the+> quoting. Otherwise, I don't know why noone has reported this bug+> before now.+> +> I've fixed this bug in git. Your testing with tomorrow's+> autobuild would be appreciated. [[done]] --[[Joey]]
doc/design/assistant/blog/day_165__release_day.mdwn view
@@ -1,10 +1,12 @@+(Posted a day late.) [[!meta date="Mon Jan 7 16:05:13 JEST 2013"]]+ Got `git annex add` (and `addurl`) working in direct mode. This allowed me to make `git annex sync` in direct mode no longer automatically add new files. It's also now safe to mix direct mode annexed files with regular files in git, in the same repository. Might have been safe all along, but I've-tested it, and it certianly works now. You just have to be careful to not+tested it, and it certainly works now. You just have to be careful to not use `git commit -a` to commit changes to such files, since that'll also stage the entire content of direct mode files.
+ doc/design/assistant/blog/day_166__a_short_long_day.mdwn view
@@ -0,0 +1,25 @@+I was up at the crack of dawn wrestling 100 pound batteries around for 3+hours and rewiring most of my battery bank, so today is a partial day...+but a day with power, which is always nice.++Did some design work on finally making transfers of files from direct mode+repositories safe, even if a file is modified as it's being uploaded.+This seems easily doable for special remotes; git to git repository+transfers are harder, but I think I see how to do it without breaking+backwards compatability. ++(An unresolved problem is that a temp file would be left behind when a+transfer failed due to a file being changed. What would really be nice to+do is to use that temp file as the rsync basis when transferring the new+version of a file. Although this really goes beyond direct mode, and into+[[deltas]] territory.)++Made fsck work better in direct mode repositories. While it's expected for+files to change at any time in direct mode, and so fsck cannot complain+every time there's a checksum mismatch, it is possible for it to detect+when a file does not *seem* to have changed, then check its checksum,+and so detect disk corruption or other data problems.++Also dealt with several bug reports. One really weird one involves `git+cat-file` failing due to some kind of gpg signed data in the git-annex+branch. I don't understand that at all yet.
+ doc/design/assistant/blog/day_167__safe_direct_mode_transfers.mdwn view
@@ -0,0 +1,12 @@+Well underway on making direct mode transfers roll back when the file is+modified while it's transferred.++As expected, it was easy to do for all the special remotes ... Except for+bup, which does not allow deleting content. For bup it just removes the git+ref for the bad content, and relies on bup's use of git delta compression+to keep space use sane.++The problem is also handled by `git-annex-shell sendkey`.+But not yet for downloads from other git repositories. Bit stuck on that.++Also: A few minor bug fixes.
+ doc/design/assistant/blog/day_168__back_to_theme.mdwn view
@@ -0,0 +1,18 @@+This month's theme is supposed to be fixing up whatever might prevent users+from using the assistant. To that end, I've posted an open-ended poll,+[[polls/what is preventing me from using git-annex assistant]]. Please go+fill it out so I can get an idea of how many people are using the+assistant, and what needs to be done to get the rest of you, and your+friends and family able to use it.++In the meantime, today I fixed several bugs that were recently reported in+the webapp and assistant. Getting it working as widely as possible, even on+strange IPv6 only systems, and with browsers that didn't like my generated+javascript code is important, and fits right into this month's theme. I'm+happy to see lots of bugs being filed, since it means more users are trying+the assistant out.++Also continued work on making direct mode transfers safe. All transfers to+local git remotes (wish I had a better phrase!) are now safe in direct mode.+Only uploading from a direct mode repository over ssh to another git+repository is still potentially unsafe.
+ doc/design/assistant/blog/day_169__direct_mode_is_safe.mdwn view
@@ -0,0 +1,24 @@+I've finished making direct mode file transfers safe. The last piece of the+puzzle was making `git-annex-shell recv-key` check data it's received from+direct mode repositories. This is a bit expensive, but avoids adding+another round-trip to the protocol. I might revisit this later, this was+just a quick fix.++---++The [[poll|polls/what is preventing me from using git-annex assistant]] was +quite useful. Some interesting points:++* 14% have been reading this blog, and rightly don't trust direct mode to+ be safe. Which is why I went ahead with a quick fix to make it safe.+* 6% want an Ubuntu PPA. I don't anticipate doing this myself, but+ if anyone who develops for Ubuntu wants to put together a PPA with a+ newer version, I can help you pick the newer haskell packages you'll+ need from Debian, etc.+* 9% just need me to update the amd64 build in Debian sid. I forgot to+ include it in the last release, and the Debian buildds cannot currently+ autobuild git-annex due to some breakage in the versions of haskell+ libraries in unstable. Hopefully I'll remember to include an amd64 build+ in my next release.++And lots of other interesting stuff, I have a nice new TODO list now. :)
+ doc/design/assistant/blog/day_170__bugfixes_and_release.mdwn view
@@ -0,0 +1,8 @@+Fixed a goodly amount of bugs today.++The most interesting change was that in direct mode, files using the same+key are no longer hardlinked, as that could cause a surprising behavior if+modifying one, where the other would also change.++Made a release, which is almost entirely bug fixes. Debian amd64 build+included this time. :)
doc/design/assistant/desymlink.mdwn view
@@ -84,9 +84,6 @@ ## TODO -* Deal with files changing as they're being transferred from a direct mode- repository to another git repository. The remote repo currently will - accept the bad data and update the location log to say it has the key. * kqueue does not deliver an event when an existing file is modified. This doesn't affect OSX, which uses FSEvents now, but it makes direct mode assistant not 100% on other BSD's.@@ -112,3 +109,37 @@ elsewhere in the tree. **done** * handle merge conflicts on direct mode files **done** * support direct mode in the assistant (many little fixes)++* Deal with files changing as they're being transferred from a direct mode+ repository to another git repository. The remote repo currently will + accept the bad data and update the location log to say it has the key.++ This affects both special remotes and git remotes. ++ For special remotes,+ it seems the best that could be done is to have an error unwind action+ passed to `sendAnnex` that is called if the file is modified as it's+ transferred. That would then remove the probably corrupted file from the+ remote. (The full transfer would still run, unless there was also a way+ to cancel an in progress transfer.) **done**++ (With the above, there is some potential for the bad content being+ downloaded from the special remote into another repo. This would only+ happen if the other repo for some reason thinks the special remote + has the content. Since the location log would not be updated until the+ transfer is successful, this should not happen.)++ For local git remotes, need to check the direct mode file after it's+ copied and before it's put into place as a key's content. **done**+ (untested)++ `git-annex-shell sendkey` needs to do something if it sent bad+ data. This seems to not need protocol changes; it can just detect + the problem and exit nonzero. Would need to do something to clean up+ the temp file, which is probably corrupt. (Could in future use it as a+ basis for transferring the new key..) **done**++ For git remotes, added a flag to `git-annex-shell recvkey` (using a field+ after the "--" to remain back-compat). With this flag, after receiving+ the data, the remote fscks the data. This is not optimal, but avoids+ needing another round-trip, or a protocol change.
doc/design/assistant/xmpp.mdwn view
@@ -76,15 +76,15 @@ To request that a remote push to us, a chat message can be sent. - <git-annex xmlns='git-annex' pushrequest="uuid" />+ <git-annex xmlns='git-annex' pushrequest="" /> -When replying to an xmpppush message, this is directed at the specific+When replying to an canpush message, this is directed at the specific client that indicated it could push. To solicit pushes from all clients,-the message has to be sent directed indiviaually to each client.+the message has to be sent directed individually to each client. When a peer is ready to send a git push, it sends: - <git-annex xmlns='git-annex' startingpush="uuid" />+ <git-annex xmlns='git-annex' startingpush="" /> The receiver runs `git receive-pack`, and sends back its output in one or more chat messages, directed to the client that is pushing:@@ -100,7 +100,7 @@ data </git-annex> -When `git receive-pack` edits, the receiver indicates its exit+When `git receive-pack` exits, the receiver indicates its exit status with a chat message, directed at the sender: <git-annex xmlns='git-annex' rpdone="0" />
+ doc/forum/Assistant_not_syncing_to_Rsync.mdwn view
@@ -0,0 +1,15 @@+I have 3 remotes for an annex - one on my laptop, one on a USB drive that's plugged in 50% of the time, and an rsync special remote on a friend's machine that I can access using SSH.++I have tried various things (annex copy, numcopies=3) to make it move data to the rsync remote, but it doesn't seem to want to work. I have tried git annex sync. I added the remote repo using the webapp, and it looked as if it was copying my files for a bit then stopped. I have the remote repo setup as a backup in the webapp.++The sizes of the directorys:+ ~ $ du -sh Documents+ 126M Documents+ ~ $ du -sh /Volumes/Backup/Documents+ 227M /Volumes/Backup/Documents++and the remote+ [c0g@womb Tom]$ du -sh MacDocuments/+ 21M MacDocuments/++I'm also curious as to why the usb drive repo is so much bigger than the thing I'm copying, but I'll worry about that later.
+ doc/forum/Detached_git_work_tree__63__.mdwn view
@@ -0,0 +1,11 @@+Does git-annex (safely) handle detached work trees?++That is, in git I can set `GIT_WORK_TREE=/dir/A` and `GIT_DIR=/dir/B` in the environment and have all my .git stuff in /dir/B and all my files in /dir/A.++I can see this coming in useful for a few situations, but in particular for difficult file systems - like SMB or old implementations of NFS.++In my particular case I have a Drobo (something like a proprietary NAS). The Drobo is linux based, but by default mounts as a samba share or if you install `unfsd` it can be mounted via NFS. Unfortunately, the nfs is v3 and doesn't allow locks, so git-annex barfs. :-(++What I'd like to be able to do is have a direct mode annex on the drobo, with the git directory sitting on one of my linux machines. That machine would be the only one that would directly access the drobo data as an annex but other systems that look at the drobo would see what looks like a normal directory structure; for example my media centre - `mythtv` naturally! - would see "normal" names for my music collection, not SHA256 hashes...++I guess there would be an issue if there were different `GIT_DIR`s pointing to the one `GIT_WORK_TREE`, but that is a caveat emptor IMHO.
+ doc/forum/Syncronisation_of_syncronisation_between_3_repositories__63__.mdwn view
@@ -0,0 +1,11 @@+Hello Joey,++I just want to know if file transfers between three inter-connected repositories somehow gets syncronized. I have a laptop, a local file server in my home and a virtual server on the internet.++Both my laptop and my file server are configured with a full git repository and connected through pairing and xmpp. The server on the internet is configured as a rsync special remote.++I want the local file server to hold a copy of everything in my annex, the rsync remote should get everything except the folder "media" (too large to upload and not that important) and the laptop whatever I manually decide (preferred content is set to "present").++I have added some files to the repository on the local file server and transferred their content to my laptop by using "git annex get". But when I started the web interface, I saw that those files who are present on both the file server and on the laptop get uploaded to the remote server from both computers, often the same file at the same time. Previously I though the two assistants would somehow talk to each other via xmpp so that doubled effort like that would be avoided. I'm also worried about data consistency because two apparently separate processes rsync to the same remote repository at the same time.++So my question would be: Is your xmpp protocol designed to deal with situations like this and I did not set it up correctly or is what I'm trying to accomplish simply not (yet) possible?
doc/git-annex-shell.mdwn view
@@ -76,7 +76,8 @@ past versions of git-annex-shell (that ignore these, but would choke on new dashed options). - Currently used fields include remoteuuid= and associatedfile=+ Currently used fields include remoteuuid=, associatedfile=,+ and direct= # HOOK
− doc/news/version_3.20121127.mdwn
@@ -1,8 +0,0 @@-git-annex 3.20121127 released with [[!toggle text="these changes"]]-[[!toggleable text="""- * Fix dirContentsRecursive, which had missed some files in deeply nested- subdirectories. Could affect various parts of git-annex.- * rsync: Fix bug introduced in last release that broke encrypted rsync- special remotes.- * The standalone builds now unset their special path and library path- variables before running the system web browser."""]]
− doc/news/version_3.20121211.mdwn
@@ -1,32 +0,0 @@-git-annex 3.20121211 released with [[!toggle text="these changes"]]-[[!toggleable text="""- * webapp: Defaults to sharing box.com account info with friends, allowing- one-click enabling of the repository.- * Fix broken .config/git-annex/program installed by standalone tarball.- * assistant: Retrival from glacier now handled.- * Include ssh in standalone tarball and OSX app.- * watch: Avoid leaving hard links to files behind in .git/annex/tmp- if a file is deleted or moved while it's being quarantined in preparation- to being added to the annex.- * Allow `git annex drop --from web`; of course this does not remove- any file from the web, but it does make git-annex remove all urls- associated with a file.- * webapp: S3 and Glacier forms now have a select list of all- currently-supported AWS regions.- * webdav: Avoid trying to set props, avoiding incompatability with- livedrive.com. Needs DAV version 0.3.- * webapp: Prettify error display.- * webapp: Fix bad interaction between required fields and modals.- * webapp: Added help buttons and links next to fields that require- explanations.- * webapp: Encryption can be disabled when setting up remotes.- * assistant: Avoid trying to drop content from remotes that don't have it.- * assistant: Allow periods in ssh key comments.- * get/copy --auto: Transfer data even if it would exceed numcopies,- when preferred content settings want it.- * drop --auto: Fix dropping content when there are no preferred content- settings.- * webapp: Allow user to specify the port when setting up a ssh or rsync- remote.- * assistant: Fix syncing to just created ssh remotes.- * Enable WebDAV support in Debian package. Closes: #[695532](http://bugs.debian.org/695532)"""]]
+ doc/news/version_3.20130114.mdwn view
@@ -0,0 +1,23 @@+git-annex 3.20130114 released with [[!toggle text="these changes"]]+[[!toggleable text="""+ * Now handles the case where a file that's being transferred to a remote+ is modified in place, which direct mode allows. When this+ happens, the transfer now fails, rather than allow possibly corrupt+ data into the remote.+ * fsck: Better checking of file content in direct mode.+ * drop: Suggest using git annex move when numcopies prevents dropping a file.+ * webapp: Repo switcher filters out repos that do not exist any more+ (or are on a drive that's not mounted).+ * webapp: Use IP address, rather than localhost, since some systems may+ have configuration problems or other issues that prevent web browsers+ from connecting to the right localhost IP for the webapp.+ * webapp: Adjust longpoll code to work with recent versions of+ shakespeare-js.+ * assistant: Support new gvfs dbus names used in Gnome 3.6.+ * In direct mode, files with the same key are no longer hardlinked, as+ that would cause a surprising behavior if modifying one, where the other+ would also change.+ * webapp: Avoid illegal characters in hostname when creating S3 or+ Glacier remote.+ * assistant: Avoid committer crashing if a file is deleted at the wrong+ instant."""]]
+ doc/preferred_content/comment_6_b434c0e2aaa132020fd4a01551285376._comment view
@@ -0,0 +1,12 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmRFKwny4rArBaz-36xTcsJYqKIgdDaw5Q"+ nickname="Andrew"+ subject="comment 6"+ date="2013-01-10T03:00:52Z"+ content="""+Is there a way to change these definitions for a given annex?++ie: in this repo make \"client\" mean++ present and exclude=*/archive/* and exclude=archive/*+"""]]
+ doc/preferred_content/comment_7_c4acaa237bf1a8512c5e8ea4cdbd11b9._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.7.238"+ subject="comment 7"+ date="2013-01-10T03:51:38Z"+ content="""+Sorry, there's not. The expressions used for \"standard\" are built in.+"""]]
+ doc/preferred_content/comment_8_ff2a2dc9c566ebd9f570bdfcd7bfc030._comment view
@@ -0,0 +1,27 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawmRFKwny4rArBaz-36xTcsJYqKIgdDaw5Q"+ nickname="Andrew"+ subject="comment 8"+ date="2013-01-10T10:24:28Z"+ content="""+By way of a feature request: Maybe the way to do this is to have an additional keyword like \"config\" or \"repo\" that allows you to use vicfg and/or git config to set alternative rules and even additional group names.++In git config:++ annex.groups.<groupname> = present and exclude=*/archive/* and exclude=archive/*++in vicfg:++ # (for passport)+ #trust A0637025-ED47-4F95-A887-346121F1B4A0 = semitrusted+ + # (for passport)+ group A0637025-ED47-4F95-A887-346121F1B4A0 = transfer+ + # (for passport)+ preferred-content A0637025-ED47-4F95-A887-346121F1B4A0 = repo+ + # (for transfer)+ group-content transfer = present and exclude=*/archive/* and exclude=archive/*++"""]]
+ doc/sync/comment_3_49560003da47490e4fabd4ab0089f2d7._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnVX_teMpJeQkyheivad_1XSCFSjpiWgx8"+ nickname="Diggory"+ subject="synchronising stored files with a bare repository"+ date="2013-01-11T16:52:38Z"+ content="""+Good for syncing indexes, but if I want to synchronise all data files too (specifically pushing to a remote bare repository), how do I do that?+"""]]
+ doc/sync/comment_4_cf29326408e62575085d1f980087c923._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="http://joeyh.name/"+ ip="4.154.7.238"+ subject="comment 4"+ date="2013-01-11T18:18:07Z"+ content="""+Yes, sync only syncs the git branches, not git-annex data. To sync the date, you can run a command such as `git annex copy --to bareremote`. You could run that in cron. Or, the [[assistant]] can be run as a daemon, and automatically syncs git-annex data.+"""]]
+ doc/todo/windows_support/comment_6_34f1f60b570c389bb1e741b990064a7e._comment view
@@ -0,0 +1,8 @@+[[!comment format=mdwn+ username="https://www.google.com/accounts/o8/id?id=AItOawnlwEMhiNYv__mEUABW4scn83yMraC3hqE"+ nickname="Sean"+ subject="NTFS symlinks"+ date="2013-01-11T21:44:21Z"+ content="""+It seems that NTFS (from Vista forward) has full POSIX support for symlinks. At least, Wikipedia [seems to think so.](http://en.wikipedia.org/wiki/NTFS_symbolic_link). What about doing like GitHub and using MinGW for compatibility? Cygwin absolutely blows in terms of installation size and compatability with the rest of Windows.+"""]]
git-annex-shell.1 view
@@ -63,7 +63,8 @@ past versions of git\-annex\-shell (that ignore these, but would choke on new dashed options). .IP-Currently used fields include remoteuuid= and associatedfile=+Currently used fields include remoteuuid=, associatedfile=,+and direct= .IP .SH HOOK After content is received or dropped from the repository by git\-annex\-shell,
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 3.20130107+Version: 3.20130114 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess <joey@kitenet.net>
templates/documentation/about.hamlet view
@@ -8,7 +8,7 @@ For full details, see # <a href="http://git-annex.branchable.com/">the git-annex website</a>. <hr>- git-annex is © 2010-2012 Joey Hess. It is free software, licensed #+ git-annex is © 2010-2013 Joey Hess. It is free software, licensed # under the terms of the GNU General Public License, version 3 or above. # This webapp is licensed under the terms of the GNU Affero General # Public License, version 3 or above. #
templates/notifications/longpolling.julius view
@@ -1,12 +1,11 @@-function longpoll_#{ident}() {- longpoll(longpoll_#{ident}_url, '#{ident}'- , function() { setTimeout(longpoll_#{ident}, #{delay}); }- , function() { webapp_disconnected(); }- );-} $(function() { $.get("@{geturl}", function(url){- longpoll_#{ident}_url = url;- setTimeout(longpoll_#{ident}, #{startdelay});+ var f = function() {+ longpoll(url, '#{ident}'+ , function() { setTimeout(f, #{delay}); }+ , function() { webapp_disconnected(); }+ ); + };+ setTimeout(f, #{startdelay}); }); });