diff options
-rw-r--r-- | Command/RegisterUrl.hs | 7 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Command/RegisterUrl.hs b/Command/RegisterUrl.hs index 16489c094..c1f5a2fcd 100644 --- a/Command/RegisterUrl.hs +++ b/Command/RegisterUrl.hs @@ -14,6 +14,7 @@ import Command import Logs.Web import Annex.UUID import Command.FromKey (mkKey) +import qualified Remote cmd :: Command cmd = notDirect $ notBareRepo $ @@ -53,5 +54,9 @@ perform key url = do perform' :: Key -> URLString -> Annex Bool perform' key url = do - setUrlPresent webUUID key url + r <- Remote.claimingUrl url + let url' = if Remote.uuid r == webUUID + then url + else setDownloader url OtherDownloader + setUrlPresent (Remote.uuid r) key url' return True diff --git a/debian/changelog b/debian/changelog index 07834662f..657c3c7cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ git-annex (6.20160115) UNRELEASED; urgency=medium * addurl --json: Include field for added key (unless the file was added directly to git due to annex.largefiles configuration.) (Also done by add --json and import --json) + * registerurl: Check if a remote claims the url, same as addurl does. -- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400 |