Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14398035
D18307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
850 B
Referenced Files
None
Subscribers
None
D18307.diff
View Options
diff --git a/scripts/repository/commit_hook.php b/scripts/repository/commit_hook.php
--- a/scripts/repository/commit_hook.php
+++ b/scripts/repository/commit_hook.php
@@ -48,8 +48,13 @@
}
if (!$repository->isHosted()) {
- // This should be redundant, but double check just in case.
- throw new Exception(pht('Repository "%s" is not hosted!', $argv[1]));
+ // In Mercurial, the "pretxnchangegroup" hook fires for both pulls and
+ // pushes. Normally we only install the hook for hosted repositories, but
+ // if a hosted repository is later converted into an observed repository we
+ // can end up with an observed repository that has the hook installed.
+ // If we're running hooks from an observed repository, just exit without
+ // taking action. For more discussion, see PHI24.
+ return 0;
}
$engine->setRepository($repository);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 12:47 PM (15 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921277
Default Alt Text
D18307.diff (850 B)
Attached To
Mode
D18307: Treat commit hook execution in observed repositories as a no-op, not an error
Attached
Detach File
Event Timeline
Log In to Comment