Homec4science

Add an "importing" state to repositories and clean up the UI

Authored by epriestley <git@epriestley.com> on Oct 27 2013, 03:59.

Description

Add an "importing" state to repositories and clean up the UI

Summary:
Fixes T3217. Ref T776. Ref T1493. Broadly, this introduces a mechanism which works like this:

  • When a repository is created, we set an "importing" flag.
  • After discovery completes, we check if a repository has no importing commits. Basically, this is the first time we catch up to HEAD.
  • If we're caught up, clear the "importing" flag.

This flag lets us fix some issues:

  • T3217. Currently, when you import a new repository and users have rules like "Email me on every commit ever" or "trigger an audit on every commit", we take a bunch of publish actions. Instead, implicitly disable publishing during import.
  • An imported but un-pulled repository currently has an incomprehensible error on /diffusion/X/. Fix that.
  • Show more cues in the UI about importing.
  • Made some exceptions more specific.

Test Plan:
This is the new screen for a completely new repo, replacing a giant exception:

{F75443}

  • Created a repository, saw it "importing".
  • Pulled and discovered it.
  • Processed its commits.
  • Ran discovery again, saw import flag clear.
  • Also this repository was empty, which hit some of the other code.

This is the new "parsed empty repository" UI, which isn't good, but is less broken:

{F75446}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, hach-que

Maniphest Tasks: T3607, T1493, T776, T3217

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

Details

Committed
epriestley <git@epriestley.com>Oct 29 2013, 23:32
Pushed
aubortJan 31 2017, 17:16
Parents
rPH912509558723: Distinguish between empty and unparsed commits in Diffusion
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd8bda7c66e0a: Add an "importing" state to repositories and clean up the UI (authored by epriestley <git@epriestley.com>).Oct 29 2013, 23:32