Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13979129
D19712.id47106.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19712.id47106.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19712: [Wilds] Make "Base Commit" parser test cases pass
Attached
Detach File
Event Timeline
Log In to Comment