summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote/Git.hs23
-rw-r--r--debian/changelog2
-rw-r--r--doc/design/assistant/webapp.mdwn5
-rw-r--r--doc/install.mdwn30
-rw-r--r--doc/install/Fedora.mdwn12
5 files changed, 48 insertions, 24 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index df97db7a6..cc524fd30 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -22,6 +22,7 @@ import Types.Remote
import qualified Git
import qualified Git.Config
import qualified Git.Construct
+import qualified Git.Command
import qualified Annex
import Logs.Presence
import Logs.Transfer
@@ -126,7 +127,20 @@ guardUsable r onerr a
tryGitConfigRead :: Git.Repo -> Annex Git.Repo
tryGitConfigRead r
| not $ M.null $ Git.config r = return r -- already read
- | Git.repoIsSsh r = store $ onRemote r (pipedconfig, r) "configlist" [] []
+ | Git.repoIsSsh r = store $ do
+ v <- onRemote r (pipedsshconfig, Left undefined) "configlist" [] []
+ case (v, Git.remoteName r) of
+ (Right r', _) -> return r'
+ (Left _, Just n) -> do
+ {- Is this remote just not available, or does
+ - it not have git-annex-shell?
+ - Find out by trying to fetch from the remote. -}
+ whenM (inRepo $ Git.Command.runBool "fetch" [Param "--quiet", Param n]) $ do
+ let k = "remote." ++ n ++ ".annex-ignore"
+ warning $ "Remote " ++ n ++ " does not have git-annex installed; setting " ++ k
+ inRepo $ Git.Command.run "config" [Param k, Param "true"]
+ return r
+ _ -> return r
| Git.repoIsHttp r = do
headers <- getHttpHeaders
store $ safely $ geturlconfig headers
@@ -140,18 +154,21 @@ tryGitConfigRead r
safely a = either (const $ return r) return
=<< liftIO (try a :: IO (Either SomeException Git.Repo))
- pipedconfig cmd params = safely $
+ pipedconfig cmd params =
withHandle StdoutHandle createProcessSuccess p $
Git.Config.hRead r
where
p = proc cmd $ toCommand params
+ pipedsshconfig cmd params =
+ liftIO (try (pipedconfig cmd params) :: IO (Either SomeException Git.Repo))
+
geturlconfig headers = do
s <- Url.get (Git.repoLocation r ++ "/config") headers
withTempFile "git-annex.tmp" $ \tmpfile h -> do
hPutStr h s
hClose h
- pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
+ safely $ pipedconfig "git" [Param "config", Param "--null", Param "--list", Param "--file", File tmpfile]
store = observe $ \r' -> do
g <- gitRepo
diff --git a/debian/changelog b/debian/changelog
index b3e825560..10430856b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ git-annex (3.20121010) UNRELEASED; urgency=low
a remote gets synced.
* Fix a crash when merging files in the git-annex branch that contain
invalid utf8.
+ * Automatically detect when a ssh remote does not have git-annex-shell
+ installed, and set annex-ignore.
-- Joey Hess <joeyh@debian.org> Wed, 10 Oct 2012 12:59:25 -0400
diff --git a/doc/design/assistant/webapp.mdwn b/doc/design/assistant/webapp.mdwn
index a5a970fd1..f3d959a33 100644
--- a/doc/design/assistant/webapp.mdwn
+++ b/doc/design/assistant/webapp.mdwn
@@ -8,6 +8,11 @@ The webapp is a web server that displays a shiny interface.
This is quite likely because of how the div containing transfers is refereshed.
If instead javascript was used to update the progress bar etc for transfers
with json data, the buttons would work better.
+* Disabling syncing to a remote doesn't stop any running transfer scan,
+ which can still queue uploads or downloads to the remote.
+* Transfers from a remote with syncing disabled show as from "unknown".
+ (Note that it's probably not practical to prevent a remote with syncing
+ disabled from initiating transfers, so this can happen.)
## interface
diff --git a/doc/install.mdwn b/doc/install.mdwn
index 2d0e718bb..7e88fc0b2 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -1,22 +1,20 @@
## Pick your OS
-Quick commands given where possible, but see the individual pages for
-details.
-
-[[!table format=dsv header=no data="""
-[[OSX]] | [download git-annex.app](http://downloads.kitenet.net/git-annex/OSX/git-annex.dmg.bz2) **beta**
+[[!table format=dsv header=yes data="""
+detailed instructions | quick install
+[[OSX]] | [download git-annex.app](http://downloads.kitenet.net/git-annex/OSX/git-annex.dmg.bz2) **beta**
[[Linux|linux_standalone]] | [download prebuilt linux tarball](http://downloads.kitenet.net/git-annex/linux/)
-[[Debian]] | `apt-get install git-annex`
-[[Ubuntu]] | `apt-get install git-annex`
-[[FreeBSD]] | `pkg_add -r hs-git-annex`
-[[ArchLinux]] | `yaourt -Sy git-annex`
-[[NixOS]] | `nix-env -i git-annex`
-[[Gentoo]] | `emerge git-annex`
-[[NixOS]] | `nix install git-annex`
-[[ScientificLinux5]] | (and other RHEL5 clones like CentOS5)
-[[Fedora]] |
-[[openSUSE]] |
-Windows | [[sorry, Windows not supported yet|todo/windows_support]]
+[[Debian]] | `apt-get install git-annex`
+[[Ubuntu]] | `apt-get install git-annex`
+[[Fedora]] | `yum install git-annex`
+[[FreeBSD]] | `pkg_add -r hs-git-annex`
+[[ArchLinux]] | `yaourt -Sy git-annex`
+[[NixOS]] | `nix-env -i git-annex`
+[[Gentoo]] | `emerge git-annex`
+[[NixOS]] | `nix install git-annex`
+[[ScientificLinux5]] | (and other RHEL5 clones like CentOS5)
+[[openSUSE]] |
+Windows | [[sorry, Windows not supported yet|todo/windows_support]]
"""]]
## Using cabal
diff --git a/doc/install/Fedora.mdwn b/doc/install/Fedora.mdwn
index c1905e01b..a150dbc38 100644
--- a/doc/install/Fedora.mdwn
+++ b/doc/install/Fedora.mdwn
@@ -1,10 +1,12 @@
-git-annex is recently finding its way into Fedora.
+git-annex is available in recent versions of Fedora. Although it is
+not currently a very recent version, it should work ok.
+[status](http://koji.fedoraproject.org/koji/packageinfo?packageID=14145)
-* [Status of getting a Fedora package](https://bugzilla.redhat.com/show_bug.cgi?id=662259)
-* [Koji build for F17](http://koji.fedoraproject.org/koji/buildinfo?buildID=328654)
-* [Koji build for F16](http://koji.fedoraproject.org/koji/buildinfo?buildID=328656)
+Should be as simple as: `yum install git-annex`
-Installation recipe for Fedora 14 thruough 15.
+----
+
+Older version? Here's an installation recipe for Fedora 14 through 15.
<pre>
sudo yum install ghc cabal-install pcre-devel