Bug 1409260 - Remove mozharness tc-vcs support. r?jlund draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 17 Oct 2017 15:09:40 +0900
changeset 681927 0b21f5f8d868f51165d133ba7ed557346122216e
parent 681926 4d5eb75799565b83e72fe6e4a1b4648462e4e2f5
child 681928 b072d5eca947dc592eb7d9523d8db50b759eb5e9
push id84949
push userbmo:mh+mozilla@glandium.org
push dateTue, 17 Oct 2017 21:31:20 +0000
reviewersjlund
bugs1409260, 1309593
milestone58.0a1
Bug 1409260 - Remove mozharness tc-vcs support. r?jlund It is not been used since bug 1309593.
testing/mozharness/mozharness/base/vcs/tcvcs.py
testing/mozharness/mozharness/base/vcs/vcsbase.py
deleted file mode 100644
--- a/testing/mozharness/mozharness/base/vcs/tcvcs.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import os.path
-from mozharness.base.script import ScriptMixin
-from mozharness.base.log import LogMixin
-
-class TcVCS(ScriptMixin, LogMixin):
-    def __init__(self, log_obj=None, config=None, vcs_config=None,
-                 script_obj=None):
-        super(TcVCS, self).__init__()
-
-        self.log_obj = log_obj
-        self.script_obj = script_obj
-        if config:
-            self.config = config
-        else:
-            self.config = {}
-        # vcs_config = {
-        #  repo: repository,
-        #  branch: branch,
-        #  revision: revision,
-        #  ssh_username: ssh_username,
-        #  ssh_key: ssh_key,
-        # }
-        self.vcs_config = vcs_config
-        self.tc_vcs = self.query_exe('tc-vcs', return_type='list')
-
-    def ensure_repo_and_revision(self):
-        """Makes sure that `dest` is has `revision` or `branch` checked out
-        from `repo`.
-
-        Do what it takes to make that happen, including possibly clobbering
-        dest.
-        """
-        c = self.vcs_config
-        for conf_item in ('dest', 'repo'):
-            assert self.vcs_config[conf_item]
-
-        dest = os.path.abspath(c['dest'])
-        repo = c['repo']
-        branch = c.get('branch', '')
-        revision = c.get('revision', '')
-        if revision is None:
-            revision = ''
-        base_repo = self.config.get('base_repo', repo)
-
-        cmd = [self.tc_vcs[:][0], 'checkout', dest, base_repo, repo, revision, branch]
-        self.run_command(cmd)
-
-        cmd = [self.tc_vcs[:][0], 'revision', dest]
-        return self.get_output_from_command(cmd)
--- a/testing/mozharness/mozharness/base/vcs/vcsbase.py
+++ b/testing/mozharness/mozharness/base/vcs/vcsbase.py
@@ -13,23 +13,21 @@ import sys
 
 sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.dirname(sys.path[0]))))
 
 from mozharness.base.errors import VCSException
 from mozharness.base.log import FATAL
 from mozharness.base.script import BaseScript
 from mozharness.base.vcs.mercurial import MercurialVCS
 from mozharness.base.vcs.gittool import GittoolVCS
-from mozharness.base.vcs.tcvcs import TcVCS
 
 # Update this with supported VCS name : VCS object
 VCS_DICT = {
     'hg': MercurialVCS,
     'gittool': GittoolVCS,
-    'tc-vcs': TcVCS,
 }
 
 
 # VCSMixin {{{1
 class VCSMixin(object):
     """Basic VCS methods that are vcs-agnostic.
     The vcs_class handles all the vcs-specific tasks.
     """