]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Improve arc support for svn 1.7
authorNick Harper <nharper@fb.com>
Fri, 9 Mar 2012 21:37:48 +0000 (13:37 -0800)
committerNick Harper <nharper@fb.com>
Fri, 9 Mar 2012 21:51:52 +0000 (13:51 -0800)
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

index 62657beae2d82e7686b04eea6a47114fe4fe0f87..0dd4316cf2500b6d4f02110a2b2bacb080ba61c5 100644 (file)
@@ -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));
     }