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
F18840637: D21825.id.diff
Oct 28 2025, 2:58 AM
F18835798: D21825.id52006.diff
Oct 26 2025, 6:49 PM
F18807233: D21825.id52007.diff
Oct 19 2025, 12:00 AM
F18764096: D21825.diff
Oct 7 2025, 4:16 AM
F18736730: D21825.diff
Oct 1 2025, 7:34 AM
F18562224: D21825.diff
Sep 9 2025, 2:35 AM
F18512380: D21825.diff
Sep 5 2025, 7:57 AM
F18371289: D21825.id52007.diff
Aug 28 2025, 4:57 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