in order to help direct history synchronizers to the most appropriate logic, we should introduce a simple boolean field onto {versioncontrol_repositories} that tracks whether or not an initial sync has been performed. i would prefer to do it this way than via heuristics (e.g., checking to see if $repo->loadCommits() and $repo->loadBranches() and $repo->loadTags() are all empty) as it's more efficient, and will make it cleaner to let backends extend with additional data types that could make them non-empty (e.g., notes in git).
once the field is in, we should make all generic logic check this flag when preparing to perform a sync, and redirect to syncInitial() if it is set.
this will mean updating our tests on the Git backend, though - test repositories will probably need to force this to 0 in order to pretend that an initialSync() has occurred so that simulated pushes pass through syncEvent() as they should.
Comments
Comment #1
sdboyer commentedthis is now done, in my sync-tinkering branch. alongside doing this, i unified the API entrance points for synchronization.
Comment #2
sdboyer commentedincluded with the merge, so i guess it's good :)