From 36709ece41ca1f758497e5ec117c8fd8934c0a45 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Fri, 9 Mar 2012 13:37:48 -0800 Subject: [PATCH] Improve arc support for svn 1.7 Summary: svn 1.7 no longer has a .svn directory in every subdirectory of the working copy, only one in the root of the working copy (like git, except you can still check out subtrees). Thus, we can't check whether we're in an svn repo by looking for a .svn directory alongside the .arcconfig file. Test Plan: ran arc diff in an svn 1.7 working copy where it previously wasn't working Reviewers: epriestley, btrahan, jungejason Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1848 --- src/repository/api/base/ArcanistRepositoryAPI.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/repository/api/base/ArcanistRepositoryAPI.php b/src/repository/api/base/ArcanistRepositoryAPI.php index 62657bea..0dd4316c 100644 --- a/src/repository/api/base/ArcanistRepositoryAPI.php +++ b/src/repository/api/base/ArcanistRepositoryAPI.php @@ -65,7 +65,9 @@ abstract class ArcanistRepositoryAPI { "any parent directory. Create an '.arcconfig' file to configure arc."); } - if (Filesystem::pathExists($root.'/.svn')) { + // check if we're in an svn working copy + list($err) = exec_manual('svn info'); + if (!$err) { return newv('ArcanistSubversionAPI', array($root)); }