diff options
-rw-r--r-- | Assistant/DeleteRemote.hs | 7 | ||||
-rw-r--r-- | Checks.hs | 13 | ||||
-rw-r--r-- | Command/Direct.hs | 2 | ||||
-rw-r--r-- | Command/Indirect.hs | 5 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn | 6 | ||||
-rw-r--r-- | doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn | 3 | ||||
-rw-r--r-- | doc/bugs/Repository_deletion_error.mdwn | 9 | ||||
-rw-r--r-- | doc/bugs/Resource_exhausted.mdwn | 5 | ||||
-rw-r--r-- | doc/bugs/Switching_between_direct_and_indirect_stomps_on___39__regular__39___git_files.mdwn | 3 | ||||
-rw-r--r-- | doc/bugs/Weird_behaviour_of_direct_and_indirect_annexes.mdwn | 5 | ||||
-rw-r--r-- | doc/bugs/make_SHA512E_the_default.mdwn | 2 | ||||
-rw-r--r-- | doc/bugs/three_character_directories_created.mdwn | 5 |
13 files changed, 64 insertions, 8 deletions
diff --git a/Assistant/DeleteRemote.hs b/Assistant/DeleteRemote.hs index 25049103e..de3d4124b 100644 --- a/Assistant/DeleteRemote.hs +++ b/Assistant/DeleteRemote.hs @@ -18,6 +18,7 @@ import Assistant.DaemonStatus import qualified Remote import Remote.List import qualified Git.Command +import qualified Git.Version import Logs.Trust import qualified Annex @@ -36,7 +37,11 @@ disableRemote uuid = do liftAnnex $ do inRepo $ Git.Command.run [ Param "remote" - , Param "remove" + -- name of this subcommand changed + , Param $ + if Git.Version.older "1.8.0" + then "rm" + else "remove" , Param (Remote.name remote) ] void $ remoteListRefresh @@ -3,7 +3,7 @@ - Common sanity checks for commands, and an interface to selectively - remove them, or add others. - - - Copyright 2011 Joey Hess <joey@kitenet.net> + - Copyright 2011-2013 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -14,6 +14,7 @@ import Common.Annex import Types.Command import Init import Config +import Utility.Daemon import qualified Git commonChecks :: [CommandCheck] @@ -24,11 +25,17 @@ repoExists = CommandCheck 0 ensureInitialized notDirect :: Command -> Command notDirect = addCheck $ whenM isDirect $ - error "You cannot run this subcommand in a direct mode repository." + error "You cannot run this command in a direct mode repository." notBareRepo :: Command -> Command notBareRepo = addCheck $ whenM (fromRepo Git.repoIsLocalBare) $ - error "You cannot run this subcommand in a bare repository." + error "You cannot run this command in a bare repository." + +noDaemonRunning :: Command -> Command +noDaemonRunning = addCheck $ whenM (isJust <$> daemonpid) $ + error "You cannot run this command while git-annex watch or git-annex assistant is running." + where + daemonpid = liftIO . checkDaemon =<< fromRepo gitAnnexPidFile dontCheck :: CommandCheck -> Command -> Command dontCheck check cmd = mutateCheck cmd $ \c -> filter (/= check) c diff --git a/Command/Direct.hs b/Command/Direct.hs index 7ded712ae..7835988b4 100644 --- a/Command/Direct.hs +++ b/Command/Direct.hs @@ -17,7 +17,7 @@ import Annex.Direct import Annex.Version def :: [Command] -def = [notBareRepo $ +def = [notBareRepo $ noDaemonRunning $ command "direct" paramNothing seek SectionSetup "switch repository to direct mode"] diff --git a/Command/Indirect.hs b/Command/Indirect.hs index 9ce2751be..59972a66b 100644 --- a/Command/Indirect.hs +++ b/Command/Indirect.hs @@ -21,8 +21,9 @@ import Annex.Version import Init def :: [Command] -def = [notBareRepo $ command "indirect" paramNothing seek - SectionSetup "switch repository to indirect mode"] +def = [notBareRepo $ noDaemonRunning $ + command "indirect" paramNothing seek + SectionSetup "switch repository to indirect mode"] seek :: [CommandSeek] seek = [withNothing start] diff --git a/debian/changelog b/debian/changelog index c0cba45ce..a6bd997ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,13 @@ git-annex (4.20130418) UNRELEASED; urgency=low don't have user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration. + * webapp: When told to add a git repository on a remote server, and + the repository already exists as a non-bare repository, use it, + rather than initializing a bare repository in the same directory. + * direct, indirect: Refuse to do anything when the assistant + or git-annex watch daemon is running. + * assistant: When built with git before 1.8.0, use `git remote rm` + to delete a remote. Newer git uses `git remote remove`. -- Joey Hess <joeyh@debian.org> Thu, 18 Apr 2013 16:22:48 -0400 diff --git a/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn b/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn index 2b8bbb70d..c2e05dee0 100644 --- a/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn +++ b/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn @@ -12,4 +12,10 @@ git-annex version: 4.20130324, Ubuntu 11.04 **Please provide any additional information below.** +[[!tag /design/assistant]] +> I have made it check for the .git directory and reuse the existing +> repository if it's there. [[done]] --[[Joey]] +> +> (The comment about `git-annex-shell` is incorrect; it has nothing +> to do with this.) diff --git a/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn b/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn index c54223084..effd2faf5 100644 --- a/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn +++ b/doc/bugs/Handling_of_files_inside_and_outside_archive_directory_at_the_same_time.mdwn @@ -4,3 +4,6 @@ some time ago, I accidentially copied some files from the archive to the non-arc Best Karsten + +[[!tag /design/assistant]] +[[!meta title="assistant preferred content handling of files inside and outside archive directory at the same time"]] diff --git a/doc/bugs/Repository_deletion_error.mdwn b/doc/bugs/Repository_deletion_error.mdwn index faebf2a83..33142d8dd 100644 --- a/doc/bugs/Repository_deletion_error.mdwn +++ b/doc/bugs/Repository_deletion_error.mdwn @@ -35,3 +35,12 @@ The log shows: +> Seems that `git remote remove` is new as of git 1.8.0 or so. +> Older gits only support `git remote rm`. Which newer gits +> support as well. but it seems to be in the process +> of being deprecated so I'd rather not use it. +> +> So, I've made the version of git it's +> built for determine which subcommand it uses. [[done]] --[[Joey]] +> +> (You can run `git remote rm repo` by hand to clean up from this BTW.) diff --git a/doc/bugs/Resource_exhausted.mdwn b/doc/bugs/Resource_exhausted.mdwn index 5218936de..0d9f884be 100644 --- a/doc/bugs/Resource_exhausted.mdwn +++ b/doc/bugs/Resource_exhausted.mdwn @@ -42,4 +42,7 @@ Best, Laszlo [[!tag /design/assistant]] -[[!meta title "assistant can try to add too many files at once in batch add mode"]] +[[!meta title="assistant can try to add too many files at once in batch add mode"]] + +> Seems that [[Stress_test]] is the same person reporting the same bug +> with a test case, so closing this as a duplicate. [[done]] --[[Joey]] diff --git a/doc/bugs/Switching_between_direct_and_indirect_stomps_on___39__regular__39___git_files.mdwn b/doc/bugs/Switching_between_direct_and_indirect_stomps_on___39__regular__39___git_files.mdwn index 0c40c57d2..db1889f81 100644 --- a/doc/bugs/Switching_between_direct_and_indirect_stomps_on___39__regular__39___git_files.mdwn +++ b/doc/bugs/Switching_between_direct_and_indirect_stomps_on___39__regular__39___git_files.mdwn @@ -22,3 +22,6 @@ file should remain in the main repo, file2 should remain in the annex git version 1.8.1.5 Mac OSX 10.8.2 Build 12C60 + +> Closing this bug, as I cannot reproduce it and the bug reporter is +> not responding. [[done]] --[[Joey]] diff --git a/doc/bugs/Weird_behaviour_of_direct_and_indirect_annexes.mdwn b/doc/bugs/Weird_behaviour_of_direct_and_indirect_annexes.mdwn index f8d0155f6..b3b0eea64 100644 --- a/doc/bugs/Weird_behaviour_of_direct_and_indirect_annexes.mdwn +++ b/doc/bugs/Weird_behaviour_of_direct_and_indirect_annexes.mdwn @@ -50,3 +50,8 @@ that all three copies are stored in ~/Indirect, so the functionality I'm after s **Edit: Doing a git annex sync in ~/Indirect results in the continuing behaviour to be correct, so there's some issue telling Direct that Indirect is no longer in direct-mode?** This appears to fix it, but I guess shouldn't be necessary. + +> AFAICS, the entire problem is that the assistant does not notice when the +> repository it's running in is changed from direct to indirect mode. Since this +> has also been reported to cause problems with the assistant, I have added +> a check to prevent it from being done. [[done]] --[[Joey]] diff --git a/doc/bugs/make_SHA512E_the_default.mdwn b/doc/bugs/make_SHA512E_the_default.mdwn index 8a32ab697..46f18130c 100644 --- a/doc/bugs/make_SHA512E_the_default.mdwn +++ b/doc/bugs/make_SHA512E_the_default.mdwn @@ -25,3 +25,5 @@ Please provide any additional information below. > hash. > > --[[Joey]] + +[[done]] diff --git a/doc/bugs/three_character_directories_created.mdwn b/doc/bugs/three_character_directories_created.mdwn index 68dd7bc74..658ad3c20 100644 --- a/doc/bugs/three_character_directories_created.mdwn +++ b/doc/bugs/three_character_directories_created.mdwn @@ -49,3 +49,8 @@ Please provide any additional information below. I use a symlink to the repository to change into it. +> Closing this bug as user error. If the `git-annex` branch +> gets merged into master by the user, then that adds all its log files +> to master, and so they're visible as regular files. Solution: Don't do +> that, or if you do that, use `git log --stat` to find the commit that +> adds all those files, and `git revery` the commit. [[done]] --[[Joey]] |