Page MenuHomePhabricator

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

Authored by epriestley on May 10 2016, 2:05 PM.
Tags
None
Referenced Files
F14065177: D15877.id38243.diff
Tue, Nov 19, 3:29 AM
F14065176: D15877.id38256.diff
Tue, Nov 19, 3:29 AM
F13993216: D15877.id38243.diff
Tue, Oct 22, 9:29 PM
F13967127: D15877.diff
Oct 16 2024, 11:52 AM
Unknown Object (File)
Oct 1 2024, 4:32 PM
Unknown Object (File)
Sep 24 2024, 6:09 PM
Unknown Object (File)
Sep 13 2024, 6:41 PM
Unknown Object (File)
Sep 12 2024, 8:30 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to When observing a repository, switch to "importing" mode on a large discovery in an empty repository.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.May 11 2016, 2:56 AM

Ah, I think this caused the bad unit test in the rest of the series -- specifically, in the unit tests we create a repository and mark it ephemeral (to prevent anything from updating it), but this now causes it to update.

There's no real reason to mark it ephemeral (this was just a sanity check sort of thing, I believe), so I'll just remove that, which should fix this and all subsequent changes.

epriestley edited edge metadata.
  • Probable fix for unit tests.

That fix seems to work, I'll cascade it down the chain and sort things out in the morning.

This revision was automatically updated to reflect the committed changes.