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
F18870041: D18307.id44015.diff
Tue, Nov 4, 3:06 PM
F18868119: D18307.diff
Tue, Nov 4, 4:43 AM
F18847047: D18307.id.diff
Wed, Oct 29, 10:40 PM
F18842934: D18307.diff
Tue, Oct 28, 7:47 PM
F18769008: D18307.diff
Oct 8 2025, 6:09 AM
F18733702: D18307.id.diff
Sep 30 2025, 10:40 PM
F18668946: D18307.diff
Sep 24 2025, 5:15 PM
F18555158: D18307.id44015.diff
Sep 8 2025, 5:32 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable