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
F13275034: D21825.diff
Fri, May 31, 4:20 AM
F13270373: D21825.id52007.diff
Wed, May 29, 9:34 AM
F13270372: D21825.id52006.diff
Wed, May 29, 9:34 AM
F13270371: D21825.id.diff
Wed, May 29, 9:34 AM
F13261087: D21825.diff
Mon, May 27, 12:42 AM
F13243607: D21825.diff
Thu, May 23, 4:03 AM
F13222025: D21825.diff
Sun, May 19, 3:16 AM
F13204551: D21825.diff
Wed, May 15, 12:41 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