Page MenuHomePhabricator

Treat commit hook execution in observed repositories as a no-op, not an error
ClosedPublic

Authored by epriestley on Jul 31 2017, 8:24 PM.
Tags
None
Referenced Files
F15511351: D18307.id44015.diff
Thu, Apr 17, 1:49 AM
F15483298: D18307.id44031.diff
Wed, Apr 9, 11:35 AM
F15481508: D18307.id.diff
Tue, Apr 8, 9:24 PM
F15477672: D18307.diff
Mon, Apr 7, 5:16 PM
F15435036: D18307.diff
Mar 25 2025, 6:35 AM
F15396689: D18307.diff
Mar 16 2025, 3:50 PM
F15369883: D18307.id44015.diff
Mar 12 2025, 8:35 AM
Unknown Object (File)
Feb 2 2025, 7:50 AM
Subscribers
None

Details

Summary

See PHI24. If you create a hosted Mercurial repository and switch it to observed, you can end up with a hook installed that runs on pulls and complains.

Instead, just bail out if we're running on a pull.

The corresponding Git hook doesn't run on pulls, so there's no issue in Git.

Test Plan

Executed the hook in an observed Mercurial repository, got a clean exit.

Diff Detail

Repository
rP Phabricator
Branch
hghook
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17853
Build 23981: Run Core Tests
Build 23980: arc lint + arc unit