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
F15391897: D21371.id50873.diff
Sat, Mar 15, 12:15 PM
F15333717: D21371.diff
Sat, Mar 8, 4:13 AM
Unknown Object (File)
Mon, Feb 17, 11:02 PM
Unknown Object (File)
Feb 15 2025, 6:38 AM
Unknown Object (File)
Feb 15 2025, 12:24 AM
Unknown Object (File)
Jan 29 2025, 12:31 PM
Unknown Object (File)
Jan 28 2025, 8:26 PM
Unknown Object (File)
Jan 19 2025, 8:52 AM
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
Branch
xgraph1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24690
Build 34046: Run Core Tests
Build 34045: arc lint + arc unit

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.