webapp: When adding a new local repository, fix bug that caused its group and preferred content to be set in the current repository, even when not combining.

There was a tricky bit here, when it does combine, the edit form is shown,
and so the info needs to be committed to the new repository, but then
pulled into the current one. And caches need to be invalidated for it
to be visible in the edit form.
This commit is contained in:
Joey Hess 2014-05-29 20:12:17 -04:00
parent a4d760b700
commit 2dd274e4ca
6 changed files with 44 additions and 36 deletions

View file

@ -61,6 +61,10 @@ data RepoConfig = RepoConfig
getRepoConfig :: UUID -> Maybe Remote -> Annex RepoConfig
getRepoConfig uuid mremote = do
-- Ensure we're editing current data by discarding caches.
void groupMapLoad
void uuidMapLoad
groups <- lookupGroups uuid
remoteconfig <- M.lookup uuid <$> readRemoteLog
let (repogroup, associateddirectory) = case getStandardGroup groups of