Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13218223
D18615.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18615.diff
View Options
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php
@@ -54,6 +54,7 @@
->setViewer($this->getViewer())
->withRefTypes(array(PhabricatorRepositoryRefCursor::TYPE_BRANCH))
->withRepositoryPHIDs(array($repo->getPHID()))
+ ->needPositions(true)
->execute();
$graph = array();
@@ -66,23 +67,23 @@
"%s\n",
pht('Rebuilding branch "%s"...', $ref->getRefName()));
- $commit = $ref->getCommitIdentifier();
-
- if ($repo->isGit()) {
- $stream = new PhabricatorGitGraphStream($repo, $commit);
- } else {
- $stream = new PhabricatorMercurialGraphStream($repo, $commit);
- }
-
- $discover = array($commit);
- while ($discover) {
- $target = array_pop($discover);
- if (isset($graph[$target])) {
- continue;
+ foreach ($ref->getPositionIdentifiers() as $commit) {
+ if ($repo->isGit()) {
+ $stream = new PhabricatorGitGraphStream($repo, $commit);
+ } else {
+ $stream = new PhabricatorMercurialGraphStream($repo, $commit);
}
- $graph[$target] = $stream->getParents($target);
- foreach ($graph[$target] as $parent) {
- $discover[] = $parent;
+
+ $discover = array($commit);
+ while ($discover) {
+ $target = array_pop($discover);
+ if (isset($graph[$target])) {
+ continue;
+ }
+ $graph[$target] = $stream->getParents($target);
+ foreach ($graph[$target] as $parent) {
+ $discover[] = $parent;
+ }
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 19, 11:08 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6302153
Default Alt Text
D18615.diff (1 KB)
Attached To
Mode
D18615: Update utility "bin/repository parents" workflow to work with RefPosition
Attached
Detach File
Event Timeline
Log In to Comment