Page MenuHomePhabricator

Repositories - Move scripts/repository/reparse.php to bin/repository reparse
ClosedPublic

Authored by btrahan on Sep 12 2014, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:47 PM
Unknown Object (File)
Thu, Apr 11, 7:41 AM
Unknown Object (File)
Tue, Apr 9, 1:12 PM
Unknown Object (File)
Tue, Apr 2, 11:18 PM
Unknown Object (File)
Feb 16 2024, 8:18 PM
Unknown Object (File)
Feb 14 2024, 8:00 AM
Unknown Object (File)
Feb 14 2024, 8:00 AM
Unknown Object (File)
Feb 14 2024, 8:00 AM
Tokens
"Evil Spooky Haunted Tree" token, awarded by epriestley."Like" token, awarded by joshuaspence.

Details

Summary

Fixes T5966. Accomplishes a few things

  • see title
  • adds a force-autoclose flag and the plumbing for it
  • removes references to some HarborMaster thing that used to key off commits and seems long dead, but forgotten :/
Test Plan

ran a few commands. These first three had great success:

./repository reparse --all FIRSTREPO --message --change --herald --owners
./repository reparse --all FIRSTREPO --message --change --herald --owners --min-date yesterday
./repository reparse --all FIRSTREPO --message --change --herald --owners --min-date yesterday --force-autoclose

...and these next two showed me some errors as expected:

./repository reparse --all FIRSTREPO --message --change --herald --owners --min-date garbagedata
./repository reparse --all GARBAGEREPO --message --change --herald --owners

Also, made a diff in a repository with autoclose disabled and commited the diff. Later, reparse the diff with force-autoclose. Verified the diff closed and that the reason "why" had the proper message text.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Repositories - Move scripts/repository/reparse.php to bin/repository reparse.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php
15–21

Old help text

24

cruft?

140

Old help string.

197–228

This could happen later, but DiffusionCommitQuery should be able to do a much better job of this now (and work for short commit hashes, and not require the repository be specified for unambiguous commits).

src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
93

We should add a REASON_FORCED here and record/display it when it was forced. This will be confusing otherwise (autoclose effects with a UI message like "didn't autoclose because <some reason>"). That is:

if ($force_autoclose) {
  $autoclose_reason = PhabricatorRepository::BECAUSE_FORCED;
}

...then you might have to tweak the UI a bit where we show this stuff in Diffusion, because all of the current reasons are negative ("No: here's why") but this one is positive ("Yes: you passed a flag").

This revision is now accepted and ready to land.Sep 14 2014, 1:46 PM
btrahan edited edge metadata.

Implemented changes EXCEPT switching to DiffusionCommitQuery, which was a nice to have code re-factor thing which would require a good bit of testing.

This revision was automatically updated to reflect the committed changes.