Page MenuHomePhabricator

D19712.id47106.diff
No OneTemporary

D19712.id47106.diff

Index: src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
===================================================================
--- src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
+++ src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
@@ -150,13 +150,11 @@
// isolation for repository-oriented test cases.
$root = dirname(phutil_get_library_root('arcanist'));
- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root);
- $configuration_manager = new ArcanistConfigurationManager();
- $configuration_manager->setWorkingCopyIdentity($working_copy);
- $repo = ArcanistRepositoryAPI::newAPIFromConfigurationManager(
- $configuration_manager);
+ $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root);
- return new ArcanistBaseCommitParser($repo);
+ $api = $working_copy->newRepositoryAPI();
+
+ return new ArcanistBaseCommitParser($api);
}
}
Index: src/workingcopy/ArcanistGitWorkingCopy.php
===================================================================
--- src/workingcopy/ArcanistGitWorkingCopy.php
+++ src/workingcopy/ArcanistGitWorkingCopy.php
@@ -18,5 +18,9 @@
return new self();
}
+ public function newRepositoryAPI() {
+ return new ArcanistGitAPI($this->getPath());
+ }
+
}
Index: src/workingcopy/ArcanistMercurialWorkingCopy.php
===================================================================
--- src/workingcopy/ArcanistMercurialWorkingCopy.php
+++ src/workingcopy/ArcanistMercurialWorkingCopy.php
@@ -18,5 +18,9 @@
return new self();
}
+ public function newRepositoryAPI() {
+ return new ArcanistMercurialAPI($this->getPath());
+ }
+
}
Index: src/workingcopy/ArcanistSubversionWorkingCopy.php
===================================================================
--- src/workingcopy/ArcanistSubversionWorkingCopy.php
+++ src/workingcopy/ArcanistSubversionWorkingCopy.php
@@ -70,5 +70,9 @@
return head($candidates);
}
+ public function newRepositoryAPI() {
+ return new ArcanistSubversionAPI($this->getPath());
+ }
+
}
Index: src/workingcopy/ArcanistWorkingCopy.php
===================================================================
--- src/workingcopy/ArcanistWorkingCopy.php
+++ src/workingcopy/ArcanistWorkingCopy.php
@@ -110,4 +110,6 @@
return last($candidates);
}
+ abstract public function newRepositoryAPI();
+
}

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 20, 2:48 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734831
Default Alt Text
D19712.id47106.diff (2 KB)

Event Timeline