Page MenuHomePhabricator

Introduce "phutil_partition()" and natural case sorting for "msortv(...)"
ClosedPublic

Authored by epriestley on Jun 30 2020, 1:41 PM.
Tags
None
Referenced Files
F18742385: D21371.id.diff
Thu, Oct 2, 6:59 PM
F18736857: D21371.diff
Wed, Oct 1, 8:01 AM
F18597466: D21371.diff
Sep 13 2025, 2:56 AM
F18198704: D21371.diff
Aug 18 2025, 1:10 AM
F18101207: D21371.id.diff
Aug 9 2025, 12:22 PM
F18081873: D21371.diff
Aug 5 2025, 2:35 AM
F17948302: D21371.id50872.diff
Jul 31 2025, 8:44 PM
F17948220: D21371.id50873.diff
Jul 31 2025, 8:23 PM
Subscribers
None

Details

Summary

Ref T13546. Pull some small utility changes out of the deeper stack of "land/markers" changes.

"phutil_partition()" makes it easier to write code that loops over a list grouping elements, then acts on each group. This kind of code is not terribly common, but often feels awkward when implemented with raw primitives.

"msortv()" can support "natural" sorting, which sorts "feature1", "feature2", ..., "feature10" in a more human-readable order.

Test Plan

Ran unit tests, used new behaviors elsewhere in "arc markers" workflows.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jun 30 2020, 1:45 PM
This revision was automatically updated to reflect the committed changes.