diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 5b333ff275..af3bedfab9 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -337,7 +337,8 @@ getFinishAddDriveR drive = go setConfig (ConfigKey "core.fsyncobjectfiles") (Git.Config.boolConfig True) (u, r) <- a isnew - liftAnnex $ setStandardGroup u TransferGroup + when isnew $ + liftAnnex $ setStandardGroup u TransferGroup liftAssistant $ syncRemote r redirect $ EditNewRepositoryR u mountpoint = T.unpack (mountPoint drive) @@ -459,15 +460,15 @@ initRepo True primary_assistant_repo dir desc mgroup = inDir dir $ do inRepo $ Git.Command.run [Param "config", Param "gc.auto", Param "0"] getUUID -{- Repo already exists, could be a non-git-annex repo though. -} +{- Repo already exists, could be a non-git-annex repo though so + - still initialize it. -} initRepo False _ dir desc mgroup = inDir dir $ do initRepo' desc mgroup getUUID initRepo' :: Maybe String -> Maybe StandardGroup -> Annex () -initRepo' desc mgroup = do - unlessM isInitialized $ do - initialize desc +initRepo' desc mgroup = unlessM isInitialized $ do + initialize desc u <- getUUID maybe noop (setStandardGroup u) mgroup {- Ensure branch gets committed right away so it is diff --git a/debian/changelog b/debian/changelog index c1a7e3c039..3eb4cf09d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ git-annex (5.20140530) UNRELEASED; urgency=medium * 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. + * webapp: Avoid stomping on existing group and preferred content settings + when adding a local repository (or removable drive repository) that + already exists. -- Joey Hess Thu, 29 May 2014 20:10:59 -0400 diff --git a/doc/bugs/adding_existing_repo_as_remote_in_webapp_may_reset_its_group.mdwn b/doc/bugs/adding_existing_repo_as_remote_in_webapp_may_reset_its_group.mdwn index 1572960856..492adfe8ba 100644 --- a/doc/bugs/adding_existing_repo_as_remote_in_webapp_may_reset_its_group.mdwn +++ b/doc/bugs/adding_existing_repo_as_remote_in_webapp_may_reset_its_group.mdwn @@ -5,4 +5,7 @@ settings. Adding existing local repositories or repositories from removable drives may have the same problems. Didn't check yet. -[[!ttag confirmed]] --[[Joey]] +[[!tag confirmed]] --[[Joey]] + +> Fixed for local repos and repos on removable drives. Still open for +> ssh remotes (incl gcrypt). --[[Joey]]