Avoid displaying network transport warning when a ssh remote does not yet have an annex.uuid set.
Instead, only display transport error if the configlist output doesn't include an annex.uuid line, even an empty one. A recent change made git-annex init try to get all the remote uuids, and so the transport error would be displayed by it. It was also displayed when eg, copying files to a remote that had no uuid yet.
This commit is contained in:
parent
8c54069980
commit
806819be57
4 changed files with 26 additions and 1 deletions
|
@ -15,6 +15,7 @@ module Annex.UUID (
|
||||||
getUUID,
|
getUUID,
|
||||||
getRepoUUID,
|
getRepoUUID,
|
||||||
getUncachedUUID,
|
getUncachedUUID,
|
||||||
|
isUUIDConfigured,
|
||||||
prepUUID,
|
prepUUID,
|
||||||
genUUID,
|
genUUID,
|
||||||
genUUIDInNameSpace,
|
genUUIDInNameSpace,
|
||||||
|
@ -84,6 +85,13 @@ getUncachedUUID = toUUID . Git.Config.get key ""
|
||||||
where
|
where
|
||||||
(ConfigKey key) = configkey
|
(ConfigKey key) = configkey
|
||||||
|
|
||||||
|
-- Does the repo's config have a key for the UUID?
|
||||||
|
-- True even when the key has no value.
|
||||||
|
isUUIDConfigured :: Git.Repo -> Bool
|
||||||
|
isUUIDConfigured = isJust . Git.Config.getMaybe key
|
||||||
|
where
|
||||||
|
(ConfigKey key) = configkey
|
||||||
|
|
||||||
{- Make sure that the repo has an annex.uuid setting. -}
|
{- Make sure that the repo has an annex.uuid setting. -}
|
||||||
prepUUID :: Annex ()
|
prepUUID :: Annex ()
|
||||||
prepUUID = whenM ((==) NoUUID <$> getUUID) $
|
prepUUID = whenM ((==) NoUUID <$> getUUID) $
|
||||||
|
|
|
@ -221,7 +221,7 @@ tryGitConfigRead autoinit r
|
||||||
v <- Git.Config.fromPipe r cmd params
|
v <- Git.Config.fromPipe r cmd params
|
||||||
case v of
|
case v of
|
||||||
Right (r', val) -> do
|
Right (r', val) -> do
|
||||||
when (getUncachedUUID r' == NoUUID && not (null val)) $ do
|
unless (isUUIDConfigured r' || null val) $ do
|
||||||
warningIO $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r
|
warningIO $ "Failed to get annex.uuid configuration of repository " ++ Git.repoDescribe r
|
||||||
warningIO $ "Instead, got: " ++ show val
|
warningIO $ "Instead, got: " ++ show val
|
||||||
warningIO $ "This is unexpected; please check the network transport!"
|
warningIO $ "This is unexpected; please check the network transport!"
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -42,6 +42,8 @@ git-annex (5.20150931) UNRELEASED; urgency=medium
|
||||||
that could omit such files or otherwise be bad. Fixed by aborting the
|
that could omit such files or otherwise be bad. Fixed by aborting the
|
||||||
whole merge process when git merge fails for any reason other than a
|
whole merge process when git merge fails for any reason other than a
|
||||||
merge conflict.
|
merge conflict.
|
||||||
|
* Avoid displaying network transport warning when a ssh remote
|
||||||
|
does not yet have an annex.uuid set.
|
||||||
* Debian: Add torrent library to build-depends as it's packaged now,
|
* Debian: Add torrent library to build-depends as it's packaged now,
|
||||||
and stop recommending bittornado | bittorrent.
|
and stop recommending bittornado | bittorrent.
|
||||||
* Debian: Remove dependency on transformers library, as it is now
|
* Debian: Remove dependency on transformers library, as it is now
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2015-10-15T18:55:42Z"
|
||||||
|
content="""
|
||||||
|
Yeah, this is a bug, and one I was able to reproduce. It was introduced in
|
||||||
|
the last release of git-annex.
|
||||||
|
|
||||||
|
Luckily, it's only a cosmetic bug. The `git annex init` does
|
||||||
|
succeed, and your repo is left in an ok state. If you continue
|
||||||
|
along the walkthrough path, adding some files and syncing with origin, it
|
||||||
|
will proceed to set up the origin appropriately and everything should work.
|
||||||
|
|
||||||
|
I'm gonna fix the bug of course. Indeed, it's fixed in git master now.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue