Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistLandWorkflow.php
| Show First 20 Lines • Show All 312 Lines • ▼ Show 20 Lines | if ($this->onto == $this->branch) { | ||||
| } | } | ||||
| throw new ArcanistUsageException($message); | throw new ArcanistUsageException($message); | ||||
| } | } | ||||
| if ($this->isHg) { | if ($this->isHg) { | ||||
| if ($this->useSquash) { | if ($this->useSquash) { | ||||
| if (!$repository_api->supportsRebase()) { | if (!$repository_api->supportsRebase()) { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| pht("You must enable the rebase extension to use the --squash ". | pht('You must enable the rebase extension to use the --squash '. | ||||
| "strategy.")); | 'strategy.')); | ||||
| } | } | ||||
| } | } | ||||
| if ($this->branchType != $this->ontoType) { | if ($this->branchType != $this->ontoType) { | ||||
| throw new ArcanistUsageException(pht( | throw new ArcanistUsageException(pht( | ||||
| "Source %s is a %s but destination %s is a %s. When landing a ". | 'Source %s is a %s but destination %s is a %s. When landing a '. | ||||
| "%s, the destination must also be a %s. Use --onto to specify a %s, ". | '%s, the destination must also be a %s. Use --onto to specify a %s, '. | ||||
| "or set arc.land.onto.default in .arcconfig.", | 'or set arc.land.onto.default in .arcconfig.', | ||||
| $this->branch, | $this->branch, | ||||
| $this->branchType, | $this->branchType, | ||||
| $this->onto, | $this->onto, | ||||
| $this->ontoType, | $this->ontoType, | ||||
| $this->branchType, | $this->branchType, | ||||
| $this->branchType, | $this->branchType, | ||||
| $this->branchType)); | $this->branchType)); | ||||
| } | } | ||||
| Show All 17 Lines | private function checkoutBranch() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| if ($this->getBranchOrBookmark() != $this->branch) { | if ($this->getBranchOrBookmark() != $this->branch) { | ||||
| $repository_api->execxLocal( | $repository_api->execxLocal( | ||||
| 'checkout %s', | 'checkout %s', | ||||
| $this->branch); | $this->branch); | ||||
| } | } | ||||
| echo phutil_console_format( | echo phutil_console_format( | ||||
| pht("Switched to %s **%s**. Identifying and merging...", | pht('Switched to %s **%s**. Identifying and merging...', | ||||
| $this->branchType, | $this->branchType, | ||||
| $this->branch). | $this->branch). | ||||
| "\n"); | "\n"); | ||||
| } | } | ||||
| private function printPendingCommits() { | private function printPendingCommits() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| Show All 18 Lines | if ($repository_api instanceof ArcanistGitAPI) { | ||||
| 'log -r %s --template %s', | 'log -r %s --template %s', | ||||
| $branch_range, | $branch_range, | ||||
| '{node|short} {desc|firstline}\n'); | '{node|short} {desc|firstline}\n'); | ||||
| } | } | ||||
| if (!trim($out)) { | if (!trim($out)) { | ||||
| $this->restoreBranch(); | $this->restoreBranch(); | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| pht("No commits to land from %s.", $this->branch)); | pht('No commits to land from %s.', $this->branch)); | ||||
| } | } | ||||
| echo pht("The following commit(s) will be landed:\n\n%s", $out), "\n"; | echo pht("The following commit(s) will be landed:\n\n%s", $out), "\n"; | ||||
| } | } | ||||
| private function findRevision() { | private function findRevision() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| ▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | if ($rev_auxiliary) { | ||||
| $dep_on_rev_title = $dep_on_rev['title']; | $dep_on_rev_title = $dep_on_rev['title']; | ||||
| $dep_on_rev_status = $dep_on_rev['status']; | $dep_on_rev_status = $dep_on_rev['status']; | ||||
| $open_dep_revs[$dep_on_rev_id] = $dep_on_rev_title; | $open_dep_revs[$dep_on_rev_id] = $dep_on_rev_title; | ||||
| } | } | ||||
| if (!empty($open_dep_revs)) { | if (!empty($open_dep_revs)) { | ||||
| $open_revs = array(); | $open_revs = array(); | ||||
| foreach ($open_dep_revs as $id => $title) { | foreach ($open_dep_revs as $id => $title) { | ||||
| $open_revs[] = " - D".$id.": ".$title; | $open_revs[] = ' - D'.$id.': '.$title; | ||||
| } | } | ||||
| $open_revs = implode("\n", $open_revs); | $open_revs = implode("\n", $open_revs); | ||||
| echo pht("Revision '%s' depends on open revisions:\n\n%s", | echo pht("Revision '%s' depends on open revisions:\n\n%s", | ||||
| "D{$rev_id}: {$rev_title}", | "D{$rev_id}: {$rev_title}", | ||||
| $open_revs); | $open_revs); | ||||
| $ok = phutil_console_confirm(pht("Continue anyway?")); | $ok = phutil_console_confirm(pht('Continue anyway?')); | ||||
| if (!$ok) { | if (!$ok) { | ||||
| throw new ArcanistUserAbortException(); | throw new ArcanistUserAbortException(); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| $message = $this->getConduit()->callMethodSynchronous( | $message = $this->getConduit()->callMethodSynchronous( | ||||
| Show All 39 Lines | if ($this->isGit) { | ||||
| if (strlen(trim($out))) { | if (strlen(trim($out))) { | ||||
| $local_ahead_of_remote = true; | $local_ahead_of_remote = true; | ||||
| } else if ($this->isGitSvn) { | } else if ($this->isGitSvn) { | ||||
| $repository_api->execxLocal('svn rebase'); | $repository_api->execxLocal('svn rebase'); | ||||
| } | } | ||||
| } else if ($this->isHg) { | } else if ($this->isHg) { | ||||
| echo phutil_console_format(pht( | echo phutil_console_format(pht( | ||||
| "Updating **%s**...", | 'Updating **%s**...', | ||||
| $this->onto) . "\n"); | $this->onto) . "\n"); | ||||
| try { | try { | ||||
| list($out, $err) = $repository_api->execxLocal('pull'); | list($out, $err) = $repository_api->execxLocal('pull'); | ||||
| $divergedbookmark = $this->onto.'@'.$repository_api->getBranchName(); | $divergedbookmark = $this->onto.'@'.$repository_api->getBranchName(); | ||||
| if (strpos($err, $divergedbookmark) !== false) { | if (strpos($err, $divergedbookmark) !== false) { | ||||
| throw new ArcanistUsageException(phutil_console_format(pht( | throw new ArcanistUsageException(phutil_console_format(pht( | ||||
| Show All 29 Lines | if ($this->isGit) { | ||||
| if ($err != 1 || !preg_match('/no changes found/', $stdout)) { | if ($err != 1 || !preg_match('/no changes found/', $stdout)) { | ||||
| throw $ex; | throw $ex; | ||||
| } | } | ||||
| } | } | ||||
| // Pull succeeded. Now make sure master is not on an outgoing change | // Pull succeeded. Now make sure master is not on an outgoing change | ||||
| if ($repository_api->supportsPhases()) { | if ($repository_api->supportsPhases()) { | ||||
| list($out) = $repository_api->execxLocal( | list($out) = $repository_api->execxLocal( | ||||
| 'log -r %s --template %s', $this->onto, "{phase}"); | 'log -r %s --template %s', $this->onto, '{phase}'); | ||||
| if ($out != 'public') { | if ($out != 'public') { | ||||
| $local_ahead_of_remote = true; | $local_ahead_of_remote = true; | ||||
| } | } | ||||
| } else { | } else { | ||||
| // execManual instead of execx because outgoing returns | // execManual instead of execx because outgoing returns | ||||
| // code 1 when there is nothing outgoing | // code 1 when there is nothing outgoing | ||||
| list($err, $out) = $repository_api->execManualLocal( | list($err, $out) = $repository_api->execManualLocal( | ||||
| 'outgoing -r %s', | 'outgoing -r %s', | ||||
| Show All 22 Lines | EOTEXT | ||||
| private function rebase() { | private function rebase() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| chdir($repository_api->getPath()); | chdir($repository_api->getPath()); | ||||
| if ($this->isGit) { | if ($this->isGit) { | ||||
| if ($this->shouldUpdateWithRebase) { | if ($this->shouldUpdateWithRebase) { | ||||
| echo phutil_console_format(pht( | echo phutil_console_format(pht( | ||||
| "Rebasing **%s** onto **%s**", | 'Rebasing **%s** onto **%s**', | ||||
| $this->branch, | $this->branch, | ||||
| $this->onto)."\n"); | $this->onto)."\n"); | ||||
| $err = phutil_passthru('git rebase %s', $this->onto); | $err = phutil_passthru('git rebase %s', $this->onto); | ||||
| if ($err) { | if ($err) { | ||||
| throw new ArcanistUsageException(pht( | throw new ArcanistUsageException(pht( | ||||
| "'git rebase %s' failed. You can abort with 'git rebase ". | "'git rebase %s' failed. You can abort with 'git rebase ". | ||||
| "--abort', or resolve conflicts and use 'git rebase --continue' ". | "--abort', or resolve conflicts and use 'git rebase --continue' ". | ||||
| "to continue forward. After resolving the rebase, run 'arc land' ". | "to continue forward. After resolving the rebase, run 'arc land' ". | ||||
| "again.", | "again.", | ||||
| $this->onto)); | $this->onto)); | ||||
| } | } | ||||
| } else { | } else { | ||||
| echo phutil_console_format(pht( | echo phutil_console_format(pht( | ||||
| "Merging **%s** into **%s**", | 'Merging **%s** into **%s**', | ||||
| $this->branch, | $this->branch, | ||||
| $this->onto)."\n"); | $this->onto)."\n"); | ||||
| $err = phutil_passthru( | $err = phutil_passthru( | ||||
| 'git merge --no-stat %s -m %s', | 'git merge --no-stat %s -m %s', | ||||
| $this->onto, | $this->onto, | ||||
| pht("Automatic merge by 'arc land'")); | pht("Automatic merge by 'arc land'")); | ||||
| if ($err) { | if ($err) { | ||||
| throw new ArcanistUsageException(pht( | throw new ArcanistUsageException(pht( | ||||
| "'git merge %s' failed. ". | "'git merge %s' failed. ". | ||||
| "To continue: resolve the conflicts, commit the changes, then run ". | "To continue: resolve the conflicts, commit the changes, then run ". | ||||
| "'arc land' again. To abort: run 'git merge --abort'.", | "'arc land' again. To abort: run 'git merge --abort'.", | ||||
| $this->onto)); | $this->onto)); | ||||
| } | } | ||||
| } | } | ||||
| } else if ($this->isHg) { | } else if ($this->isHg) { | ||||
| $onto_tip = $repository_api->getCanonicalRevisionName($this->onto); | $onto_tip = $repository_api->getCanonicalRevisionName($this->onto); | ||||
| $common_ancestor = $repository_api->getCanonicalRevisionName( | $common_ancestor = $repository_api->getCanonicalRevisionName( | ||||
| hgsprintf("ancestor(%s, %s)", | hgsprintf('ancestor(%s, %s)', | ||||
| $this->onto, | $this->onto, | ||||
| $this->branch)); | $this->branch)); | ||||
| // Only rebase if the local branch is not at the tip of the onto branch. | // Only rebase if the local branch is not at the tip of the onto branch. | ||||
| if ($onto_tip != $common_ancestor) { | if ($onto_tip != $common_ancestor) { | ||||
| // keep branch here so later we can decide whether to remove it | // keep branch here so later we can decide whether to remove it | ||||
| $err = $repository_api->execPassthru( | $err = $repository_api->execPassthru( | ||||
| 'rebase -d %s --keepbranches', | 'rebase -d %s --keepbranches', | ||||
| ▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if ($this->isGit) { | ||||
| $branch_rev_id = $repository_api->getCanonicalRevisionName($this->branch); | $branch_rev_id = $repository_api->getCanonicalRevisionName($this->branch); | ||||
| // At this point $this->onto has been pulled from remote and | // At this point $this->onto has been pulled from remote and | ||||
| // $this->branch has been rebased on top of onto(by the rebase() | // $this->branch has been rebased on top of onto(by the rebase() | ||||
| // function). So we're guaranteed to have onto as an ancestor of branch | // function). So we're guaranteed to have onto as an ancestor of branch | ||||
| // when we use first((onto::branch)-onto) below. | // when we use first((onto::branch)-onto) below. | ||||
| $branch_root = $repository_api->getCanonicalRevisionName( | $branch_root = $repository_api->getCanonicalRevisionName( | ||||
| hgsprintf("first((%s::%s)-%s)", | hgsprintf('first((%s::%s)-%s)', | ||||
| $this->onto, | $this->onto, | ||||
| $this->branch, | $this->branch, | ||||
| $this->onto)); | $this->onto)); | ||||
| $branch_range = hgsprintf( | $branch_range = hgsprintf( | ||||
| "(%s::%s)", | '(%s::%s)', | ||||
| $branch_root, | $branch_root, | ||||
| $this->branch); | $this->branch); | ||||
| if (!$this->keepBranch) { | if (!$this->keepBranch) { | ||||
| $this->handleAlternateBranches($branch_root, $branch_range); | $this->handleAlternateBranches($branch_root, $branch_range); | ||||
| } | } | ||||
| // Collapse just the landing branch onto master. | // Collapse just the landing branch onto master. | ||||
| Show All 25 Lines | if ($this->isGit) { | ||||
| $repository_api->execxLocal( | $repository_api->execxLocal( | ||||
| 'bookmark -f %s -r %s', | 'bookmark -f %s -r %s', | ||||
| $this->branch, | $this->branch, | ||||
| $branch_rev_id); | $branch_rev_id); | ||||
| } | } | ||||
| // check if the branch had children | // check if the branch had children | ||||
| list($output) = $repository_api->execxLocal( | list($output) = $repository_api->execxLocal( | ||||
| "log -r %s --template %s", | 'log -r %s --template %s', | ||||
| hgsprintf("children(%s)", $this->branch), | hgsprintf('children(%s)', $this->branch), | ||||
| '{node}\n'); | '{node}\n'); | ||||
| $child_branch_roots = phutil_split_lines($output, false); | $child_branch_roots = phutil_split_lines($output, false); | ||||
| $child_branch_roots = array_filter($child_branch_roots); | $child_branch_roots = array_filter($child_branch_roots); | ||||
| if ($child_branch_roots) { | if ($child_branch_roots) { | ||||
| // move the branch's children onto the collapsed commit | // move the branch's children onto the collapsed commit | ||||
| foreach ($child_branch_roots as $child_root) { | foreach ($child_branch_roots as $child_root) { | ||||
| $repository_api->execxLocal( | $repository_api->execxLocal( | ||||
| Show All 38 Lines | private function handleAlternateBranches($branch_root, $branch_range) { | ||||
| // 3. roots({y,z}) | // 3. roots({y,z}) | ||||
| // 4. {y,z} | // 4. {y,z} | ||||
| $alt_branch_revset = hgsprintf( | $alt_branch_revset = hgsprintf( | ||||
| 'roots(descendants(%s)-descendants(%s)-%R)', | 'roots(descendants(%s)-descendants(%s)-%R)', | ||||
| $branch_root, | $branch_root, | ||||
| $this->branch, | $this->branch, | ||||
| $branch_range); | $branch_range); | ||||
| list($alt_branches) = $repository_api->execxLocal( | list($alt_branches) = $repository_api->execxLocal( | ||||
| "log --template %s -r %s", | 'log --template %s -r %s', | ||||
| '{node}\n', | '{node}\n', | ||||
| $alt_branch_revset); | $alt_branch_revset); | ||||
| $alt_branches = phutil_split_lines($alt_branches, false); | $alt_branches = phutil_split_lines($alt_branches, false); | ||||
| $alt_branches = array_filter($alt_branches); | $alt_branches = array_filter($alt_branches); | ||||
| $alt_count = count($alt_branches); | $alt_count = count($alt_branches); | ||||
| if ($alt_count > 0) { | if ($alt_count > 0) { | ||||
| Show All 24 Lines | if ($alt_count > 0) { | ||||
| pht("Remove the %s starting at these revisions and ". | pht("Remove the %s starting at these revisions and ". | ||||
| "run arc land again:\n%s", | "run arc land again:\n%s", | ||||
| $this->branchType.'s', | $this->branchType.'s', | ||||
| $branch_string), | $branch_string), | ||||
| "\n\n"; | "\n\n"; | ||||
| throw new ArcanistUserAbortException(); | throw new ArcanistUserAbortException(); | ||||
| } else { | } else { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| pht("Invalid choice. Aborting arc land.")); | pht('Invalid choice. Aborting arc land.')); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| private function merge() { | private function merge() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| // In immutable histories, do a --no-ff merge to force a merge commit with | // In immutable histories, do a --no-ff merge to force a merge commit with | ||||
| Show All 16 Lines | if ($this->isGit) { | ||||
| // HG arc land currently doesn't support --merge. | // HG arc land currently doesn't support --merge. | ||||
| // When merging a bookmark branch to a master branch that | // When merging a bookmark branch to a master branch that | ||||
| // hasn't changed since the fork, mercurial fails to merge. | // hasn't changed since the fork, mercurial fails to merge. | ||||
| // Instead of only working in some cases, we just disable --merge | // Instead of only working in some cases, we just disable --merge | ||||
| // until there is a demand for it. | // until there is a demand for it. | ||||
| // The user should never reach this line, since --merge is | // The user should never reach this line, since --merge is | ||||
| // forbidden at the command line argument level. | // forbidden at the command line argument level. | ||||
| throw new ArcanistUsageException(pht( | throw new ArcanistUsageException(pht( | ||||
| "--merge is not currently supported for hg repos.")); | '--merge is not currently supported for hg repos.')); | ||||
| } | } | ||||
| } | } | ||||
| private function push() { | private function push() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| // these commands can fail legitimately (e.g. commit hooks) | // these commands can fail legitimately (e.g. commit hooks) | ||||
| try { | try { | ||||
| Show All 21 Lines | try { | ||||
| array()); | array()); | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| $this->executeCleanupAfterFailedPush(); | $this->executeCleanupAfterFailedPush(); | ||||
| throw $ex; | throw $ex; | ||||
| } | } | ||||
| if ($this->getArgument('hold')) { | if ($this->getArgument('hold')) { | ||||
| echo phutil_console_format(pht( | echo phutil_console_format(pht( | ||||
| "Holding change in **%s**: it has NOT been pushed yet.", | 'Holding change in **%s**: it has NOT been pushed yet.', | ||||
| $this->onto). "\n"); | $this->onto). "\n"); | ||||
| } else { | } else { | ||||
| echo pht('Pushing change...'), "\n\n"; | echo pht('Pushing change...'), "\n\n"; | ||||
| chdir($repository_api->getPath()); | chdir($repository_api->getPath()); | ||||
| if ($this->isGitSvn) { | if ($this->isGitSvn) { | ||||
| $err = phutil_passthru('git svn dcommit'); | $err = phutil_passthru('git svn dcommit'); | ||||
| $cmd = "git svn dcommit"; | $cmd = 'git svn dcommit'; | ||||
| } else if ($this->isGit) { | } else if ($this->isGit) { | ||||
| $err = phutil_passthru( | $err = phutil_passthru( | ||||
| 'git push %s %s', | 'git push %s %s', | ||||
| $this->remote, | $this->remote, | ||||
| $this->onto); | $this->onto); | ||||
| $cmd = "git push"; | $cmd = 'git push'; | ||||
| } else if ($this->isHgSvn) { | } else if ($this->isHgSvn) { | ||||
| // hg-svn doesn't support 'push -r', so we do a normal push | // hg-svn doesn't support 'push -r', so we do a normal push | ||||
| // which hg-svn modifies to only push the current branch and | // which hg-svn modifies to only push the current branch and | ||||
| // ancestors. | // ancestors. | ||||
| $err = $repository_api->execPassthru( | $err = $repository_api->execPassthru( | ||||
| 'push %s', | 'push %s', | ||||
| $this->remote); | $this->remote); | ||||
| $cmd = "hg push"; | $cmd = 'hg push'; | ||||
| } else if ($this->isHg) { | } else if ($this->isHg) { | ||||
| $err = $repository_api->execPassthru( | $err = $repository_api->execPassthru( | ||||
| 'push -r %s %s', | 'push -r %s %s', | ||||
| $this->onto, | $this->onto, | ||||
| $this->remote); | $this->remote); | ||||
| $cmd = "hg push"; | $cmd = 'hg push'; | ||||
| } | } | ||||
| if ($err) { | if ($err) { | ||||
| $failed_str = pht('PUSH FAILED!'); | $failed_str = pht('PUSH FAILED!'); | ||||
| echo phutil_console_format("<bg:red>** %s **</bg>\n", $failed_str); | echo phutil_console_format("<bg:red>** %s **</bg>\n", $failed_str); | ||||
| $this->executeCleanupAfterFailedPush(); | $this->executeCleanupAfterFailedPush(); | ||||
| if ($this->isGit) { | if ($this->isGit) { | ||||
| throw new ArcanistUsageException(pht( | throw new ArcanistUsageException(pht( | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | if ($this->isGit) { | ||||
| $this->branch, | $this->branch, | ||||
| $ref); | $ref); | ||||
| echo pht('(Use `%s` if you want it back.)', $recovery_command), "\n"; | echo pht('(Use `%s` if you want it back.)', $recovery_command), "\n"; | ||||
| $repository_api->execxLocal( | $repository_api->execxLocal( | ||||
| 'branch -D %s', | 'branch -D %s', | ||||
| $this->branch); | $this->branch); | ||||
| } else if ($this->isHg) { | } else if ($this->isHg) { | ||||
| $common_ancestor = $repository_api->getCanonicalRevisionName( | $common_ancestor = $repository_api->getCanonicalRevisionName( | ||||
| hgsprintf("ancestor(%s,%s)", | hgsprintf('ancestor(%s,%s)', | ||||
| $this->onto, | $this->onto, | ||||
| $this->branch)); | $this->branch)); | ||||
| $branch_root = $repository_api->getCanonicalRevisionName( | $branch_root = $repository_api->getCanonicalRevisionName( | ||||
| hgsprintf("first((%s::%s)-%s)", | hgsprintf('first((%s::%s)-%s)', | ||||
| $common_ancestor, | $common_ancestor, | ||||
| $this->branch, | $this->branch, | ||||
| $common_ancestor)); | $common_ancestor)); | ||||
| $repository_api->execxLocal( | $repository_api->execxLocal( | ||||
| '--config extensions.mq= strip -r %s', | '--config extensions.mq= strip -r %s', | ||||
| $branch_root); | $branch_root); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | private function getBranchOrBookmark() { | ||||
| } | } | ||||
| return $branch; | return $branch; | ||||
| } | } | ||||
| private function getBranchType($branch) { | private function getBranchType($branch) { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| if ($this->isHg && $repository_api->isBookmark($branch)) { | if ($this->isHg && $repository_api->isBookmark($branch)) { | ||||
| return "bookmark"; | return 'bookmark'; | ||||
| } | } | ||||
| return "branch"; | return 'branch'; | ||||
| } | } | ||||
| /** | /** | ||||
| * Restore the original branch, e.g. after a successful land or a failed | * Restore the original branch, e.g. after a successful land or a failed | ||||
| * pull. | * pull. | ||||
| */ | */ | ||||
| private function restoreBranch() { | private function restoreBranch() { | ||||
| $repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||