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
F18847047: D18307.id.diff
Wed, Oct 29, 10:40 PM
F18842934: D18307.diff
Tue, Oct 28, 7:47 PM
F18769008: D18307.diff
Wed, Oct 8, 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
F18094840: D18307.diff
Aug 7 2025, 10:23 PM
F18088505: D18307.id44031.diff
Aug 6 2025, 8:14 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable