Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15332223
D21350.id50820.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
D21350.id50820.diff
View Options
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
@@ -288,7 +288,7 @@
$onto_markers[] = $new_bookmark;
$new_markers[] = $new_bookmark;
} else {
- $onto_markers[] = $marker;
+ $onto_markers[] = head($matches);
}
}
@@ -553,9 +553,6 @@
pht('Merge target is ambiguous.'));
}
- $is_bookmark = false;
- $is_branch = false;
-
if ($bookmarks) {
if (count($bookmarks) > 1) {
throw new Exception(
@@ -592,7 +589,7 @@
$target_marker = $branch;
}
- if ($is_branch) {
+ if ($target_marker->isBranch()) {
$err = $this->newPassthru(
'pull --branch %s -- %s',
$target->getRef(),
@@ -728,7 +725,7 @@
$branch_marker = $this->ontoBranchMarker;
if ($branch_marker) {
- $api->execxLocal('branch -- %s', $branch_marker);
+ $api->execxLocal('branch -- %s', $branch_marker->getName());
}
try {
@@ -892,7 +889,7 @@
return;
}
- $strip = array();
+ $revs = array();
// We've rebased all descendants already, so we can safely delete all
// of these commits.
@@ -904,10 +901,10 @@
$min_commit = head($commits)->getHash();
$max_commit = last($commits)->getHash();
- $strip[] = hgsprintf('%s::%s', $min_commit, $max_commit);
+ $revs[] = hgsprintf('%s::%s', $min_commit, $max_commit);
}
- $rev_set = '('.implode(') or (', $strip).')';
+ $rev_set = '('.implode(') or (', $revs).')';
// See PHI45. If we have "hg evolve", get rid of old commits using
// "hg prune" instead of "hg strip".
@@ -916,11 +913,11 @@
// removes the obsolescence marker and revives the predecessor. This is
// not desirable: we want to destroy all predecessors of these commits.
- try {
+ if ($api->getMercurialFeature('evolve')) {
$api->execxLocal(
- '--config extensions.evolve= prune --rev %s',
+ 'prune --rev %s',
$rev_set);
- } catch (CommandException $ex) {
+ } else {
$api->execxLocal(
'--config extensions.strip= strip --rev %s',
$rev_set);
diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php
--- a/src/repository/api/ArcanistMercurialAPI.php
+++ b/src/repository/api/ArcanistMercurialAPI.php
@@ -980,7 +980,9 @@
switch ($feature) {
case 'shelve':
return $this->execFutureLocal(
- '--config extensions.shelve= shelve --help');
+ '--config extensions.shelve= shelve --help --');
+ case 'evolve':
+ return $this->execFutureLocal('prune --help --');
default:
throw new Exception(
pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 8, 4:51 PM (3 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383339
Default Alt Text
D21350.id50820.diff (2 KB)
Attached To
Mode
D21350: Correct some minor "arc land" workflow issues in Mercurial
Attached
Detach File
Event Timeline
Log In to Comment