add SetupStage parameter to RemoteType.setup
authorJoey Hess <joeyh@joeyh.name>
Tue, 7 Feb 2017 18:35:58 +0000 (14:35 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 7 Feb 2017 18:55:58 +0000 (14:55 -0400)
commit5c804cf42e21f915511abfda240b055ac3807a9d
tree99d115b5cce4b396745dc65c13b785f1773fb114
parent7487b4da47ea787374d77ea22f1060649454f294
add SetupStage parameter to RemoteType.setup

Most remotes have an idempotent setup that can be reused for
enableremote, but in a few cases, it needs to tell which, and whether
a UUID was provided to setup was used.

This is groundwork for making initremote be able to provide a UUID.
It should not change any behavior.

Note that it would be nice to make the UUID always be provided to setup,
and make setup not need to generate and return a UUID. What prevented
this simplification is Remote.Git.gitSetup, which needs to reuse the
UUID of the git remote when setting it up, and so has to return that
UUID.

This commit was sponsored by Thom May on Patreon.
17 files changed:
Annex/SpecialRemote.hs
Assistant/MakeRemote.hs
Command/EnableRemote.hs
Command/InitRemote.hs
Remote/Bup.hs
Remote/Ddar.hs
Remote/Directory.hs
Remote/External.hs
Remote/GCrypt.hs
Remote/Git.hs
Remote/Glacier.hs
Remote/Hook.hs
Remote/Rsync.hs
Remote/S3.hs
Remote/Tahoe.hs
Remote/WebDAV.hs
Types/Remote.hs