Changeset View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommit.php
Show All 27 Lines | final class PhabricatorRepositoryCommit | ||||
protected $epoch; | protected $epoch; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $auditStatus = DiffusionCommitAuditStatus::NONE; | protected $auditStatus = DiffusionCommitAuditStatus::NONE; | ||||
protected $summary = ''; | protected $summary = ''; | ||||
protected $importStatus = 0; | protected $importStatus = 0; | ||||
const IMPORTED_MESSAGE = 1; | const IMPORTED_MESSAGE = 1; | ||||
const IMPORTED_CHANGE = 2; | const IMPORTED_CHANGE = 2; | ||||
const IMPORTED_OWNERS = 4; | const IMPORTED_PUBLISH = 8; | ||||
const IMPORTED_HERALD = 8; | const IMPORTED_ALL = 11; | ||||
amckinley: What happens to commits currently sitting around with `importStatus IN (IMPORTED_OWNERS… | |||||
Done Inline ActionsIf the next queued import step for a commit is:
I'll call this out in the changelog ("Finish importing any outstanding repositories before upgrading"), but even if users ignore this advice the number of impacted commits should be small, and skipping some parse steps for a handful of commits normally isn't a problem. epriestley: If the next queued import step for a commit is:
- "Message" or "Change": Things will work… | |||||
Not Done Inline ActionsDon't we need a migration for this? Won't the DB suddenly have a bunch of old PhabricatorRepositoryCommit with importStatus = 15 and a bunch of new ones with importStatus = 11? amckinley: Don't we need a migration for this? Won't the DB suddenly have a bunch of old… | |||||
Done Inline ActionsOlder commits will have an extra bit (4) in the bitfield, but that doesn't hurt anything. All tests against the bitfield examine specific bits and this field is purely internal. For the sake of cleanliness, we could wipe this bit from memory by setting the field to field & ~4, but that seems fairly low-value and would make reverting this change more difficult/dangerous. epriestley: Older commits will have an extra bit (4) in the bitfield, but that doesn't hurt anything. All… | |||||
const IMPORTED_ALL = 15; | |||||
const IMPORTED_CLOSEABLE = 1024; | const IMPORTED_CLOSEABLE = 1024; | ||||
const IMPORTED_UNREACHABLE = 2048; | const IMPORTED_UNREACHABLE = 2048; | ||||
private $commitData = self::ATTACHABLE; | private $commitData = self::ATTACHABLE; | ||||
private $audits = self::ATTACHABLE; | private $audits = self::ATTACHABLE; | ||||
private $repository = self::ATTACHABLE; | private $repository = self::ATTACHABLE; | ||||
private $customFields = self::ATTACHABLE; | private $customFields = self::ATTACHABLE; | ||||
▲ Show 20 Lines • Show All 855 Lines • Show Last 20 Lines |
What happens to commits currently sitting around with importStatus IN (IMPORTED_OWNERS, IMPORTED_HERALD) when this update gets applied? I guess we'll just end up running the publish step again, which is fine?