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
Unknown Object (File)
Sun, May 11, 4:57 PM
Unknown Object (File)
Fri, May 9, 8:06 AM
Unknown Object (File)
Thu, May 8, 4:08 AM
Unknown Object (File)
Apr 14 2025, 5:57 AM
Unknown Object (File)
Apr 9 2025, 11:32 PM
Unknown Object (File)
Apr 9 2025, 4:54 PM
Unknown Object (File)
Apr 8 2025, 7:32 AM
Unknown Object (File)
Apr 7 2025, 4:00 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