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
F15502993: D21825.diff
Mon, Apr 14, 5:57 AM
F15485410: D21825.id52006.diff
Wed, Apr 9, 11:32 PM
F15484183: D21825.id52007.diff
Wed, Apr 9, 4:54 PM
F15479473: D21825.id.diff
Tue, Apr 8, 7:32 AM
F15476101: D21825.diff
Mon, Apr 7, 4:00 AM
F15468493: D21825.diff
Fri, Apr 4, 1:01 AM
F15460462: D21825.diff
Mon, Mar 31, 11:07 PM
F15452172: D21825.id52007.diff
Sat, Mar 29, 2:21 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