Homec4science

When observing a repository, switch to "importing" mode on a large discovery in…

Authored by epriestley <git@epriestley.com> on May 10 2016, 15:40.

Description

When observing a repository, switch to "importing" mode on a large discovery in an empty repository

Summary:
Ref T10923. Fixes T9554.

When hosting a repository, we currently have a heuristic that tries to detect when you're doing an initial import: if you push more than 7 commits to an empty repository, it counts as an import and we disable mail/feed/etc.

Do something similar for observed repositories: if the repository is empty and we discover more than 7 commits, switch to import mode until we catch up.

This should align behavior with user expectation more often when juggling hosted vs imported repositories.

Test Plan:

  • Created a new hosted repository.
  • Activated it and allowed it to fully import.
  • Added an "Observe URI".
  • Saw it automatically drop into "Importing" mode until the import completed.
  • Swapped it back to hosted mode.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9554, T10923

Differential Revision: https://secure.phabricator.com/D15877

Details

Committed
epriestley <git@epriestley.com>May 11 2016, 15:36
Pushed
aubortJan 31 2017, 17:16
Parents
rPH576b73dc5375: Index all repository URIs, not just the "primary" repository URI
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH71a97d8af56b: When observing a repository, switch to "importing" mode on a large discovery in… (authored by epriestley <git@epriestley.com>).May 11 2016, 15:36