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
F18555158: D18307.id44015.diff
Mon, Sep 8, 5:32 PM
F18094840: D18307.diff
Aug 7 2025, 10:23 PM
F18088505: D18307.id44031.diff
Aug 6 2025, 8:14 AM
F17842686: D18307.id.diff
Jul 26 2025, 11:59 PM
F17808235: D18307.diff
Jul 25 2025, 3:46 PM
Unknown Object (File)
Apr 17 2025, 1:49 AM
Unknown Object (File)
Apr 9 2025, 11:35 AM
Unknown Object (File)
Apr 8 2025, 9:24 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