Page MenuHomePhabricator

Fix a PHP 8.1 repository marker issue in Mercurial
ClosedPublic

Authored by epriestley on May 17 2022, 11:18 PM.
Tags
None
Referenced Files
F22819719: D21825.diff
Sat, Oct 10, 12:30 PM
F22775559: D21825.diff
Mon, Oct 5, 11:13 PM
F22773427: D21825.diff
Mon, Oct 5, 9:43 PM
F22750817: D21825.id.diff
Sun, Oct 4, 10:08 PM
F22683629: D21825.diff
Fri, Oct 2, 4:02 AM
F22653757: D21825.diff
Thu, Oct 1, 1:36 AM
F22610728: D21825.diff
Tue, Sep 29, 3:45 AM
Unknown Object (File)
Thu, Sep 17, 9:38 AM
Subscribers
None

Details

Summary

Ref T13588. "arc-ls-markers" emits a "branch-state" marker so callers can identify which branch is active in the working copy.

This marker doesn't have an associated commit, so trying to generate a display name fails under stricter PHP 8.1 rules when we try to substr(null, ...).

Don't attempt to generate a display name for markers with no commit hash.

Test Plan
  • Ran arc branches under PHP 8.1 in a Mercurial repository.
  • Before: fatal.
  • After: sensible output.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable