1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 00:02:40 +01:00

Fix an issue in Subversion with a root working copy which is actually a symlink.

Summary: lol svn lol

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley 2011-01-11 14:26:21 -08:00
parent b7ccb78ece
commit e508504ddf

View file

@ -161,6 +161,25 @@ class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
} }
public function buildInfoFuture($path) { public function buildInfoFuture($path) {
if ($path == '/') {
// When the root of a working copy is referenced by a symlink and you
// execute 'svn info' on that symlink, svn fails. This is a longstanding
// bug in svn:
//
// See http://subversion.tigris.org/issues/show_bug.cgi?id=2305
//
// To reproduce, do:
//
// $ ln -s working_copy working_link
// $ svn info working_copy # ok
// $ svn info working_link # fails
//
// Work around this by cd-ing into the directory before executing
// 'svn info'.
return new ExecFuture(
'(cd %s && svn info .)',
$this->getPath());
} else {
// Note: here and elsewhere we need to append "@" to the path because if // Note: here and elsewhere we need to append "@" to the path because if
// a file has a literal "@" in it, everything after that will be // a file has a literal "@" in it, everything after that will be
// interpreted as a revision. By appending "@" with no argument, SVN // interpreted as a revision. By appending "@" with no argument, SVN
@ -169,6 +188,7 @@ class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
'svn info %s@', 'svn info %s@',
$this->getPath($path)); $this->getPath($path));
} }
}
public function buildDiffFuture($path) { public function buildDiffFuture($path) {
// The "--depth empty" flag prevents us from picking up changes in // The "--depth empty" flag prevents us from picking up changes in