We need to be able to resync repositories from scratch as needed. This is a useful dev tool, but also a useful tool for a website like d.o, where occasional problems crop up with a repository's data and a normal resync doesn't solve the problem (since syncing from scratch is almost always correct).

Fundamentally, this operation is just $repo->purgeData(); $repo->fetchLogs(). However, since other systems expect to be able to build on vcapi & rely on its serial ids, those two steps need to be wrapped in an atomic wrapper that fires pre- and post- hooks so that they can do what they need to preserve & update their data. Example from d.o - versioncontrol_project has to respond and rebuild associations between labels and releases - basically, reupdate the {versioncontrol_release_labels} table with the new label ids for resynced labels.

Comments

sdboyer’s picture

OK, pushed this change in. Change also includes additions to drush that allow this new facility to be accessed via the existing drush vcapi-parse-logs command.

sdboyer’s picture

Status: Active » Fixed
sdboyer’s picture

Issue tags: +needs drupal.org deployment

tagging for deployment

sdboyer’s picture

Issue tags: -needs drupal.org deployment

deployed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 6754d3e on repository-families, drush-vc-sync-unlock by sdboyer:
    Issue #1103368: Add support for 'atomic' purge-and-resync of...

  • Commit 6754d3e on repository-families by sdboyer:
    Issue #1103368: Add support for 'atomic' purge-and-resync of...