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
F18355315: D21825.diff
Wed, Aug 27, 3:55 AM
F18045644: D21825.diff
Sun, Aug 3, 9:29 AM
F18023721: D21825.id52007.diff
Sat, Aug 2, 9:04 PM
F17963612: D21825.id52006.diff
Fri, Aug 1, 10:46 AM
F17948807: D21825.id.diff
Thu, Jul 31, 10:04 PM
F17946498: D21825.diff
Thu, Jul 31, 2:37 PM
F17940755: D21825.diff
Thu, Jul 31, 4:43 AM
F17850159: D21825.id.diff
Jul 27 2025, 9:35 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
Branch
marker1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25724
Build 35552: arc lint + arc unit