Open the storage-migration gate before requesting daemon re-execution.
Resetting the revision marks the backend as never migrated. Call this on the main context: the temporary Settings wrapper caches settings and receives their notifications there.
The reset is read back, as the settings ask of a caller that has to know whether a write took: one refused -- a key an administrator locked -- fails with g_paste_error_failed, so that nothing re-executes the daemon for a migration its successor would find the gate closed on.
The re-exec is the caller's own, and so is closing the gate again ( util_cancel_storage_migration) once there is no re-exec left to expect: `gpaste-client migrate` has a second route to one -- signalling a daemon too old for the method -- and a gate closed on the first route's failure would leave that successor nothing to migrate.
| revision |
where to put the revision to restore if re-execution fails |
|
whether the gate is open |