Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14018283
D10324.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10324.diff
View Options
diff --git a/src/workflow/ArcanistCommitWorkflow.php b/src/workflow/ArcanistCommitWorkflow.php
--- a/src/workflow/ArcanistCommitWorkflow.php
+++ b/src/workflow/ArcanistCommitWorkflow.php
@@ -160,6 +160,8 @@
throw new Exception("Executing 'svn commit' failed!");
}
+ $this->askForRepositoryUpdate();
+
$mark_workflow = $this->buildChildWorkflow(
'close-revision',
array(
diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php
--- a/src/workflow/ArcanistLandWorkflow.php
+++ b/src/workflow/ArcanistLandWorkflow.php
@@ -1035,23 +1035,7 @@
$cmd));
}
- // If we know which repository we're in, try to tell Phabricator that we
- // pushed commits to it so it can update. This hint can help pull updates
- // more quickly, especially in rarely-used repositories.
- if ($this->getRepositoryCallsign()) {
- try {
- $this->getConduit()->callMethodSynchronous(
- 'diffusion.looksoon',
- array(
- 'callsigns' => array($this->getRepositoryCallsign()),
- ));
- } catch (ConduitClientException $ex) {
- // If we hit an exception, just ignore it. Likely, we are running
- // against a Phabricator which is too old to support this method.
- // Since this hint is purely advisory, it doesn't matter if it has
- // no effect.
- }
- }
+ $this->askForRepositoryUpdate();
$mark_workflow = $this->buildChildWorkflow(
'close-revision',
diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -1839,4 +1839,34 @@
"Arcanist config to specify a command to use."));
}
+
+ /**
+ * Ask Phabricator to update the current repository as soon as possible.
+ *
+ * Calling this method after pushing commits allows Phabricator to discover
+ * the commits more quickly, so the system overall is more responsive.
+ *
+ * @return void
+ */
+ protected function askForRepositoryUpdate() {
+ // If we know which repository we're in, try to tell Phabricator that we
+ // pushed commits to it so it can update. This hint can help pull updates
+ // more quickly, especially in rarely-used repositories.
+ if ($this->getRepositoryCallsign()) {
+ try {
+ $this->getConduit()->callMethodSynchronous(
+ 'diffusion.looksoon',
+ array(
+ 'callsigns' => array($this->getRepositoryCallsign()),
+ ));
+ } catch (ConduitClientException $ex) {
+ // If we hit an exception, just ignore it. Likely, we are running
+ // against a Phabricator which is too old to support this method.
+ // Since this hint is purely advisory, it doesn't matter if it has
+ // no effect.
+ }
+ }
+ }
+
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 7:37 AM (6 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6755959
Default Alt Text
D10324.diff (2 KB)
Attached To
Mode
D10324: Schedule repository updates from `arc commit`, not just `arc land`
Attached
Detach File
Event Timeline
Log In to Comment