Incremental changes towards more efficient refactoring of gclient.py
Fix gclient diff & pack to not throw uncatched exceptions when a directory is missing.
Reorder things in gclient.py for easier diff later
Update revinfo help
Add GetScmName(), it will be needed later.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/2786013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49565 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index bd49add..4f971b2 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -70,18 +70,17 @@
members = [
'AddAdditionalFlags', 'FullUrlForRelativeUrl', 'RunCommand',
'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
- 'revinfo', 'runhooks', 'scm_name', 'status', 'update',
+ 'revinfo', 'runhooks', 'status', 'update',
'updatesingle', 'url',
]
# If you add a member, be sure to add the relevant test!
- self.compareMembers(self._scm_wrapper(), members)
+ self.compareMembers(self._scm_wrapper('svn://a'), members)
def testUnsupportedSCM(self):
- args = [self.url, self.root_dir, self.relpath]
- kwargs = {'scm_name' : 'foo'}
- exception_msg = 'Unsupported scm %(scm_name)s' % kwargs
- self.assertRaisesError(exception_msg, self._scm_wrapper, *args, **kwargs)
+ args = ['gopher://foo', self.root_dir, self.relpath]
+ exception_msg = 'No SCM found for url gopher://foo'
+ self.assertRaisesError(exception_msg, self._scm_wrapper, *args)
def testSVNFullUrlForRelativeUrl(self):
self.url = 'svn://a/b/c/d'
@@ -528,7 +527,7 @@
members = [
'FullUrlForRelativeUrl', 'RunCommand',
'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
- 'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url',
+ 'revinfo', 'runhooks', 'status', 'update', 'url',
]
# If you add a member, be sure to add the relevant test!