Page MenuHomePhabricator

Show "hold reasons" on commit page, not on "Edit" page
ClosedPublic

Authored by epriestley on Apr 23 2019, 2:14 PM.
Tags
None
Referenced Files
F18100463: D20466.id.diff
Sat, Aug 9, 11:54 AM
F18087815: D20466.diff
Wed, Aug 6, 5:39 AM
F17836419: D20466.id.diff
Sat, Jul 26, 4:06 PM
F17835890: D20466.id.diff
Sat, Jul 26, 3:43 PM
F17833807: D20466.id48841.diff
Sat, Jul 26, 1:51 PM
F17815535: D20466.diff
Fri, Jul 25, 10:03 PM
F17807118: D20466.diff
Fri, Jul 25, 2:34 PM
Unknown Object (File)
Jul 3 2025, 10:41 AM
Subscribers
None

Details

Summary

Depends on D20465. Ref T13277. Currently, when a commit is unpublished, we put a single line about it on the "Edit Commit" page. This is pretty much impossible to find.

Move it to the main page. This treatment is more big/bold than I'd probably like to end up, but we should probably overshoot on the explanatory text until users get used to this behavior.

Also, allow searching for only published / unpublished commits.

Test Plan

Screen Shot 2019-04-23 at 7.11.40 AM.png (731×694 px, 70 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/diffusion/query/DiffusionCommitQuery.php
871

Any reason to prefer this over (commit.importStatus & %d) != 0?

This revision is now accepted and ready to land.Apr 24 2019, 1:01 AM

!== 0 and !== mask have different meanings when mask has multiple bits set. Today, IMPORTED_CLOSEABLE has just one bit set, so both tests would do the same thing. But the adjacent IMPORTED_ALL mask has several, and using the more general form is safer if IMPORTED_CLOSEABLE ever has multiple bits, or this code gets copy/pasted elsewhere or something.

Suppose:

red = 1
liquid = 2
potable = 4

red_poison = red | liquid
drinkable = liquid | potable

Then:

(red_poison & drinkable) = ((1 | 2) & (2 | 4)) = 2

If we're testing !== 0, we'll drink the red poison (both the bitfield and the mask have bit 2, the "liquid" bit, set, so the "bitwise and" is nonempty). If we're testing !== drinkable, we won't.

This revision was automatically updated to reflect the committed changes.