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
Unknown Object (File)
Fri, Dec 20, 7:36 PM
Unknown Object (File)
Thu, Dec 5, 9:34 AM
Unknown Object (File)
Nov 28 2024, 3:18 PM
Unknown Object (File)
Nov 25 2024, 1:26 AM
Unknown Object (File)
Nov 23 2024, 11:13 PM
Unknown Object (File)
Nov 20 2024, 8:34 PM
Unknown Object (File)
Nov 10 2024, 6:40 PM
Unknown Object (File)
Oct 21 2024, 2:15 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.