From 2f668493a0fb330ca68181ca0479ac73f34d0ae7 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 29 May 2014 12:02:37 -0700 Subject: [PATCH] Don't attempt to discover parents commits for untracked branchs. Summary: Fixes T5195. Currently, the `./bin/repository parents` workflow doesn't respect tracked branches and will attempt to build parents caches for all branches. Test Plan: For at least one of our repositories, this patch fixes the `Unknown commit` exception. Unfortunately, it doesn't seem to completely solve this problem though, but I suspect that this is due to commits that were overwritten with a `git push --force` or similar. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5195 Differential Revision: https://secure.phabricator.com/D9322 --- .../PhabricatorRepositoryManagementParentsWorkflow.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php index fd49df59a0..86fb07c7bf 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementParentsWorkflow.php @@ -58,6 +58,10 @@ final class PhabricatorRepositoryManagementParentsWorkflow $graph = array(); foreach ($refs as $ref) { + if (!$repo->shouldTrackBranch($ref->getRefName())) { + continue; + } + $console->writeOut( "%s\n", pht('Rebuilding branch "%s"...', $ref->getRefName()));