add reregisterurl command

What this can currently be used for is only to change an url from being
used by a special remote to being used by the web remote.

This could have been a --move-from option to registerurl. But, that would
have complicated its option and --batch processing, and also would have
complicated unregisterurl, which is implemented on top of
Command.Registerurl. So, a separate command was actually less complicated
to implement.

The generic description of the command is because I want to make this
command a catch-all for other url updating kind of things, if there are
ever any more. Also because it was hard to come up with a good name for the
specific action. I considered `git-annex moveurl`, but that seems to
indicate data is perhaps actually being moved, and seems to sit at the same
level as addurl and rmurl, and this command is at the plumbing
level of registerurl and unregisterurl.

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2024-03-05 15:04:35 -04:00
parent 1bf02029f9
commit 016d1bee88
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 187 additions and 0 deletions

View file

@ -34,6 +34,7 @@ import qualified Command.MatchExpression
import qualified Command.FromKey
import qualified Command.RegisterUrl
import qualified Command.UnregisterUrl
import qualified Command.ReregisterUrl
import qualified Command.SetKey
import qualified Command.DropKey
import qualified Command.Transferrer
@ -196,6 +197,7 @@ cmds testoptparser testrunner mkbenchmarkgenerator = map addGitAnnexCommonOption
, Command.FromKey.cmd
, Command.RegisterUrl.cmd
, Command.UnregisterUrl.cmd
, Command.ReregisterUrl.cmd
, Command.SetKey.cmd
, Command.DropKey.cmd
, Command.Transferrer.cmd