mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Minor, fix arc land
for the case of no dependencies.
Auditors: Afaque_Hussain
This commit is contained in:
parent
91154c9cdf
commit
42235d9f1f
1 changed files with 27 additions and 26 deletions
|
@ -365,36 +365,37 @@ EOTEXT
|
|||
|
||||
if ($rev_auxiliary) {
|
||||
$phids = idx($rev_auxiliary, 'phabricator:depends-on', array());
|
||||
if ($phids) {
|
||||
$dep_on_revs = $this->getConduit()->callMethodSynchronous(
|
||||
'differential.query',
|
||||
array(
|
||||
'phids' => $phids,
|
||||
'status' => 'status-open',
|
||||
));
|
||||
|
||||
$dep_on_revs = $this->getConduit()->callMethodSynchronous(
|
||||
'differential.query',
|
||||
array(
|
||||
'phids' => $phids,
|
||||
'status' => 'status-open',
|
||||
));
|
||||
|
||||
$open_dep_revs = array();
|
||||
foreach ($dep_on_revs as $dep_on_rev) {
|
||||
$dep_on_rev_id = $dep_on_rev['id'];
|
||||
$dep_on_rev_title = $dep_on_rev['title'];
|
||||
$dep_on_rev_status = $dep_on_rev['status'];
|
||||
$open_dep_revs[$dep_on_rev_id] = $dep_on_rev_title;
|
||||
}
|
||||
|
||||
if (!empty($open_dep_revs)) {
|
||||
$open_revs = array();
|
||||
foreach ($open_dep_revs as $id => $title) {
|
||||
$open_revs[] = " - D".$id.": ".$title;
|
||||
$open_dep_revs = array();
|
||||
foreach ($dep_on_revs as $dep_on_rev) {
|
||||
$dep_on_rev_id = $dep_on_rev['id'];
|
||||
$dep_on_rev_title = $dep_on_rev['title'];
|
||||
$dep_on_rev_status = $dep_on_rev['status'];
|
||||
$open_dep_revs[$dep_on_rev_id] = $dep_on_rev_title;
|
||||
}
|
||||
$open_revs = implode("\n", $open_revs);
|
||||
|
||||
echo "Revision 'D{$rev_id}: {$rev_title}' depends ".
|
||||
"on open revisions:\n\n";
|
||||
echo $open_revs;
|
||||
if (!empty($open_dep_revs)) {
|
||||
$open_revs = array();
|
||||
foreach ($open_dep_revs as $id => $title) {
|
||||
$open_revs[] = " - D".$id.": ".$title;
|
||||
}
|
||||
$open_revs = implode("\n", $open_revs);
|
||||
|
||||
$ok = phutil_console_confirm("Continue anyway?");
|
||||
if (!$ok) {
|
||||
throw new ArcanistUserAbortException();
|
||||
echo "Revision 'D{$rev_id}: {$rev_title}' depends ".
|
||||
"on open revisions:\n\n";
|
||||
echo $open_revs;
|
||||
|
||||
$ok = phutil_console_confirm("Continue anyway?");
|
||||
if (!$ok) {
|
||||
throw new ArcanistUserAbortException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue