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
F13251937: D21371.diff
Sat, May 25, 12:54 AM
F13250541: D21371.id.diff
Fri, May 24, 2:52 PM
F13248647: D21371.diff
Fri, May 24, 3:43 AM
F13246509: D21371.id50872.diff
Thu, May 23, 10:54 AM
F13224526: D21371.id50873.diff
Sun, May 19, 9:02 AM
F13204428: D21371.diff
Wed, May 15, 12:34 AM
F13186753: D21371.diff
Sat, May 11, 3:55 AM
Unknown Object (File)
Tue, May 7, 7:18 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.