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
F12193917: D21825.diff
Sun, Sep 24, 6:59 AM
F12192692: D21825.diff
Sat, Sep 23, 2:48 AM
F12186099: D21825.diff
Sat, Sep 16, 4:51 PM
F12181028: D21825.id52006.diff
Tue, Sep 12, 4:33 PM
F12178610: D21825.id52007.diff
Mon, Sep 11, 1:43 PM
F12170015: D21825.diff
Thu, Sep 7, 3:33 PM
F12162464: D21825.diff
Wed, Sep 6, 8:17 PM
F12153847: D21825.diff
Mon, Sep 4, 3:32 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