Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13964520
D19712.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.diff
View Options
diff --git a/src/parser/__tests__/ArcanistBaseCommitParserTestCase.php b/src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
--- a/src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
+++ b/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);
}
}
diff --git a/src/workingcopy/ArcanistGitWorkingCopy.php b/src/workingcopy/ArcanistGitWorkingCopy.php
--- a/src/workingcopy/ArcanistGitWorkingCopy.php
+++ b/src/workingcopy/ArcanistGitWorkingCopy.php
@@ -18,5 +18,9 @@
return new self();
}
+ public function newRepositoryAPI() {
+ return new ArcanistGitAPI($this->getPath());
+ }
+
}
diff --git a/src/workingcopy/ArcanistMercurialWorkingCopy.php b/src/workingcopy/ArcanistMercurialWorkingCopy.php
--- a/src/workingcopy/ArcanistMercurialWorkingCopy.php
+++ b/src/workingcopy/ArcanistMercurialWorkingCopy.php
@@ -18,5 +18,9 @@
return new self();
}
+ public function newRepositoryAPI() {
+ return new ArcanistMercurialAPI($this->getPath());
+ }
+
}
diff --git a/src/workingcopy/ArcanistSubversionWorkingCopy.php b/src/workingcopy/ArcanistSubversionWorkingCopy.php
--- a/src/workingcopy/ArcanistSubversionWorkingCopy.php
+++ b/src/workingcopy/ArcanistSubversionWorkingCopy.php
@@ -70,5 +70,9 @@
return head($candidates);
}
+ public function newRepositoryAPI() {
+ return new ArcanistSubversionAPI($this->getPath());
+ }
+
}
diff --git a/src/workingcopy/ArcanistWorkingCopy.php b/src/workingcopy/ArcanistWorkingCopy.php
--- a/src/workingcopy/ArcanistWorkingCopy.php
+++ b/src/workingcopy/ArcanistWorkingCopy.php
@@ -110,4 +110,6 @@
return last($candidates);
}
+ abstract public function newRepositoryAPI();
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 16, 8:53 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719144
Default Alt Text
D19712.diff (2 KB)
Attached To
Mode
D19712: [Wilds] Make "Base Commit" parser test cases pass
Attached
Detach File
Event Timeline
Log In to Comment