Page MenuHomePhabricator

Herald - tweak accepted differential revision check slightly
ClosedPublic

Authored by btrahan on Jan 7 2014, 10:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 11:35 AM
Unknown Object (File)
Thu, Apr 25, 2:08 AM
Unknown Object (File)
Wed, Apr 24, 1:51 AM
Unknown Object (File)
Mar 25 2024, 3:18 PM
Unknown Object (File)
Mar 18 2024, 3:40 PM
Unknown Object (File)
Mar 15 2024, 7:50 AM
Unknown Object (File)
Feb 21 2024, 4:41 PM
Unknown Object (File)
Feb 17 2024, 4:37 PM

Details

Summary

use the loadReviewedBy function, which seems to do what we want -- returns a reviewer IFF the last thing was an accept

Test Plan

i believe in the power of loadReviewedBy

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Is this in response to something? I think this is maybe-bad or at least counterintuitive. I also want to get rid of loadReviewedBy() eventually.

Ah, okay, I found the IRC bit.

arc land should not close revisions if the repository is tracked. However, arc is often not able to figure out that a repository is tracked right now, because this chain has to be unbroken:

  1. The working copy has a .arcconfig;
  2. the .arcconfig has a project_id;
  3. the project_id's corresponding "Arcanist Project" has a repository.

Usually, step (3) is missing, because it's configured in an obscure interface and there are no hints about it. I'd like to get rid of this and let arc figure out that the repository is tracked based on the remote URI.

The quick fix here is probably to go to Repositories > Whatever Project from the web UI and set a repository.

In this specific case, if that doesn't work and we need something in the short term, maybe adding a separate "Accepted or closed revision" field is a better fix? I want to get rid of loadReiviewedBy() eventually -- it no longer really makes sense given that we can track multiple "Accept"ing users, and it doesn't follow modern query protocol.

In the long run, I want to move away from Arcanist Projects as much as possible.

Oh, I'm actually probably crazy. The CommitMessage worker will always fire before the Herald worker does, and always close the revision. So this patch is more consistent with intent. We can deal with the specifics when this stuff gets sorted out eventually.

Cool.

I think loadReviewedBy will have a worthy successor someday. For example, that diff you rejected and I approved and the confusion there -- I could see that being configurable and thus requiring this successor someday. Or not, but we can fix this at that time I think.

(will commit this tomorrow or later if I get back on)