From 969dcc5bae53bb00db3420f4bb945df8ae23e05f Mon Sep 17 00:00:00 2001 From: Jason Ge Date: Fri, 22 Jun 2012 16:54:15 -0700 Subject: [PATCH] handle svn and hg for auto-close Summary: in svn and hg (for now), no branch used. Test Plan: will test live Reviewers: epriestley CC: nh, vrana, aran, Korvin Differential Revision: https://secure.phabricator.com/D2839 --- .../repository/storage/PhabricatorRepository.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 31ae83db3b..e5599f642f 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -433,6 +433,17 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO { return false; } + switch ($this->getVersionControlSystem()) { + case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: + return true; + case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: + break; + case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: + return true; + default: + throw new Exception("Unrecognized version control system."); + } + $branches = $data->getCommitDetail('seenOnBranches', array()); foreach ($branches as $branch) { if ($this->shouldAutocloseBranch($branch)) {