1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/repository/management
epriestley ec9eaabfbd Allow repo updates to recover after force push + garbage collection
Summary:
Fixes T5839. If a repository has been force pushed and garbage collected, we might have a ref cursor in the database which still points at the old commit (which no longer exists).

We'll then run a command like `git log <new hash> --not <old hash>` to figure out which commits are newly pushed, and this will bomb out because `<old hash>` is invalid.

Instead, validate all the `<old hash>` values before we try to make use of them.

Test Plan:
  - Forced a repository into a bad state by mucking with the datbase, generating a reproducible failure similar to the one in T5839.
  - Applied patch.
  - `bin/repository update <callsign> --trace` filtered the bad commit and put the repository into the right state.
  - Saw new commits recognized correctly.
  - Ran `bin/repository update <callsign>` for a Mercurial and SVN repo as a sanity check.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5839

Differential Revision: https://secure.phabricator.com/D10226
2014-08-12 12:25:24 -07:00
..
PhabricatorRepositoryManagementCacheWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementDiscoverWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementEditWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementImportingWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementListWorkflow.php Extend all "ManagementWorkflow" classes from a base class 2013-12-27 13:15:40 -08:00
PhabricatorRepositoryManagementLookupUsersWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementMarkImportedWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementMirrorWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementParentsWorkflow.php Batch up SQL operations in the ./bin/repository parents script. 2014-06-03 11:27:57 -07:00
PhabricatorRepositoryManagementPullWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementRefsWorkflow.php Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
PhabricatorRepositoryManagementUpdateWorkflow.php Allow repo updates to recover after force push + garbage collection 2014-08-12 12:25:24 -07:00
PhabricatorRepositoryManagementWorkflow.php Implement a chunked, APC-backed graph cache 2014-05-12 11:47:23 -07:00