webapp: Improve UI around remote that have no annex.uuid set, either because setup of them is incomplete, or because the remote git repository is not a git-annex repository.

Complicated by such repositories potentially being repos that should have
an annex.uuid, but it failed to be gotten, perhaps due to the past ssh repo
setup bugs. This is handled now by an Upgrade Repository button.
This commit is contained in:
Joey Hess 2013-11-07 18:02:00 -04:00
parent b7c15f3b60
commit 958312885f
26 changed files with 209 additions and 156 deletions

View file

@ -11,6 +11,7 @@ module Git.Remote where
import Common
import Git
import Git.Types
import qualified Git.Command
import qualified Git.BuildVersion
@ -21,8 +22,6 @@ import Network.URI
import Git.FilePath
#endif
type RemoteName = String
{- Construct a legal git remote name out of an arbitrary input string.
-
- There seems to be no formal definition of this in the git source,
@ -62,6 +61,10 @@ remoteLocationIsUrl :: RemoteLocation -> Bool
remoteLocationIsUrl (RemoteUrl _) = True
remoteLocationIsUrl _ = False
remoteLocationIsSshUrl :: RemoteLocation -> Bool
remoteLocationIsSshUrl (RemoteUrl u) = "ssh://" `isPrefixOf` u
remoteLocationIsSshUrl _ = False
{- Determines if a given remote location is an url, or a local
- path. Takes the repository's insteadOf configuration into account. -}
parseRemoteLocation :: String -> Repo -> RemoteLocation