See T8090 for general discussion of change handoff.
For hosted Git repositories, T8092 seems like a promising way forward for change handoff.
For imported repositories, we can not virtualize refs. It's still desirable to support git-based change handoff if possible, for the same reasons that it's desirable for hosted repositories.
We can probably accept some rough edges here and support handoff for imported repositories, while sharing most of the handoff code for hosted repositories. Specifically:
- We add configuration settings to Diffusion to let users specify a side-band repository where diffs are pushed by arc diff.
- For now, options are: don't push to a side-band repository (default), use this repository's remote (maybe leave this out of v0 since user management is a bit of a pain for git/GitHub), use some other repository.
- In the future, this setting changes slightly to support better support virtual refs in hosted repositories.
- We emit this data in repository.query.
- In arc, we check for this data and perform pushes to tags in the specified repository if things are configured, after creating a diff.
- At some point, after pushing, we update diff metadata. Maybe for now we don't bother and the build harness just figures out that it didn't work because the tag isn't there (it needs to handle this case anyway).
We see how bad this is (does pushing tags to the same repository create a big user-facing mess?) and then go from there.