diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs index a78505a197..ad93529cc2 100644 --- a/Command/InitRemote.hs +++ b/Command/InitRemote.hs @@ -38,18 +38,19 @@ start (name:ws) = do t <- findType fullconfig showStart "initremote" name - next $ perform t u $ M.union config c + next $ perform t u name $ M.union config c where config = Logs.Remote.keyValToConfig ws -perform :: RemoteType -> UUID -> R.RemoteConfig -> CommandPerform -perform t u c = do +perform :: RemoteType -> UUID -> String -> R.RemoteConfig -> CommandPerform +perform t u name c = do c' <- R.setup t u c - next $ cleanup u c' + next $ cleanup u name c' -cleanup :: UUID -> R.RemoteConfig -> CommandCleanup -cleanup u c = do +cleanup :: UUID -> String -> R.RemoteConfig -> CommandCleanup +cleanup u name c = do + describeUUID u name Logs.Remote.configSet u c return True @@ -61,7 +62,6 @@ findByName name = do where generate = do uuid <- liftIO genUUID - describeUUID uuid name return (uuid, M.insert nameKey name M.empty) findByName' :: String -> M.Map UUID R.RemoteConfig -> Maybe (UUID, R.RemoteConfig) diff --git a/debian/changelog b/debian/changelog index 387dacd53f..82bf5009a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +git-annex (3.20120722) UNRELEASED; urgency=low + + * initremote: Avoid recording remote's description before checking + that its config is valid. + + -- Joey Hess Fri, 27 Jul 2012 21:04:47 -0400 + git-annex (3.20120721) unstable; urgency=low * get, move, copy: Now refuse to do anything when the requested file diff --git a/doc/bugs/git_annex_initremote_needs_some___34__error_checking__34__.mdwn b/doc/bugs/git_annex_initremote_needs_some___34__error_checking__34__.mdwn index 3521038d74..6b57f8ce5f 100644 --- a/doc/bugs/git_annex_initremote_needs_some___34__error_checking__34__.mdwn +++ b/doc/bugs/git_annex_initremote_needs_some___34__error_checking__34__.mdwn @@ -60,3 +60,6 @@ bloom filter size: 16 mebibytes (0% full) backend usage: x00:atest jtang$ + +> Indeed, I broke that in June by making it record the name in a much too +> early stage. Now fixed. [[done]] --[[Joey]]