Ignore unreachable commits when testing if a repository has imported
Summary:
Fixes T11309. When checking if a repository was fully imported, we incorrectly allow unreachable, un-imported commits to prevent the repository from moving to "Imported".
This can happen if you delete branches from a repository while it is importing.
Instead, ignore unreachable commits when checking for remaining imports, and when reporting status via bin/repository importing.
Test Plan:
- Stopped daemons.
- Created a new repository and activated it.
- Ran bin/repository update Rxx.
- Deleted a branch in the repository.
- Ran bin/repository update Rxx.
- Ran daemons to flush queue.
Now:
- Ran bin/repository importing. Old behavior: showed unreachable commits as importing. New behavior: does not show unreachable commits.
- Ran bin/repository update. Old behavior: failed to move repository to "imported" status. New behavior: correctly moves repository to "imported" status.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T11309
Differential Revision: https://secure.phabricator.com/D16269