Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14761930
D21395.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D21395.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -307,6 +307,7 @@
'ArcanistLandCommit' => 'land/ArcanistLandCommit.php',
'ArcanistLandCommitSet' => 'land/ArcanistLandCommitSet.php',
'ArcanistLandEngine' => 'land/engine/ArcanistLandEngine.php',
+ 'ArcanistLandPushFailureException' => 'land/exception/ArcanistLandPushFailureException.php',
'ArcanistLandSymbol' => 'land/ArcanistLandSymbol.php',
'ArcanistLandTarget' => 'land/ArcanistLandTarget.php',
'ArcanistLandWorkflow' => 'workflow/ArcanistLandWorkflow.php',
@@ -1352,6 +1353,7 @@
'ArcanistLandCommit' => 'Phobject',
'ArcanistLandCommitSet' => 'Phobject',
'ArcanistLandEngine' => 'ArcanistWorkflowEngine',
+ 'ArcanistLandPushFailureException' => 'Exception',
'ArcanistLandSymbol' => 'Phobject',
'ArcanistLandTarget' => 'Phobject',
'ArcanistLandWorkflow' => 'ArcanistArcWorkflow',
diff --git a/src/land/engine/ArcanistGitLandEngine.php b/src/land/engine/ArcanistGitLandEngine.php
--- a/src/land/engine/ArcanistGitLandEngine.php
+++ b/src/land/engine/ArcanistGitLandEngine.php
@@ -491,7 +491,7 @@
$flags_argv,
$into_commit);
if ($err) {
- throw new ArcanistUsageException(
+ throw new ArcanistLandPushFailureException(
pht(
'Submit failed! Fix the error and run "arc land" again.'));
}
@@ -509,16 +509,10 @@
$this->newOntoRefArguments($into_commit));
if ($err) {
- throw new ArcanistUsageException(
+ throw new ArcanistLandPushFailureException(
pht(
'Push failed! Fix the error and run "arc land" again.'));
}
-
- // TODO
- // if ($this->isGitSvn) {
- // $err = phutil_passthru('git svn dcommit');
- // $cmd = 'git svn dcommit';
-
}
protected function reconcileLocalState(
diff --git a/src/land/engine/ArcanistLandEngine.php b/src/land/engine/ArcanistLandEngine.php
--- a/src/land/engine/ArcanistLandEngine.php
+++ b/src/land/engine/ArcanistLandEngine.php
@@ -1259,7 +1259,7 @@
try {
$this->pushChange($into_commit);
$this->setHasUnpushedChanges(false);
- } catch (Exception $ex) {
+ } catch (ArcanistLandPushFailureException $ex) {
// TODO: If the push fails, fetch and retry if the remote ref
// has moved ahead of us.
@@ -1280,7 +1280,8 @@
continue;
}
- throw $ex;
+ throw new PhutilArgumentUsageException(
+ $ex->getMessage());
}
if ($need_cascade) {
diff --git a/src/land/engine/ArcanistMercurialLandEngine.php b/src/land/engine/ArcanistMercurialLandEngine.php
--- a/src/land/engine/ArcanistMercurialLandEngine.php
+++ b/src/land/engine/ArcanistMercurialLandEngine.php
@@ -836,7 +836,7 @@
foreach ($body as $command) {
$err = $this->newPassthru('%Ls', $command);
if ($err) {
- throw new ArcanistUsageException(
+ throw new ArcanistLandPushFailureException(
pht(
'Push failed! Fix the error and run "arc land" again.'));
}
diff --git a/src/land/exception/ArcanistLandPushFailureException.php b/src/land/exception/ArcanistLandPushFailureException.php
new file mode 100644
--- /dev/null
+++ b/src/land/exception/ArcanistLandPushFailureException.php
@@ -0,0 +1,4 @@
+<?php
+
+final class ArcanistLandPushFailureException
+ extends Exception {}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 3:54 AM (20 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7038872
Default Alt Text
D21395.diff (3 KB)
Attached To
Mode
D21395: Clean up push failure messaging in "arc land" slightly
Attached
Detach File
Event Timeline
Log In to Comment