Commit a6f09dd1 authored by Aki Sasaki's avatar Aki Sasaki
Browse files

Bug 1747280 - nuke comm/ after cross-channel. r=releng-reviewers,jmaher DONTBUILD

We clean up our Gecko clone between tasks via `hg robustcheckout --purge`, which runs `hg purge`. This is very effective, *but* it doesn't detect or clean up any nested clones.

Because we run cross-channel on Gecko workers, and because we clone `comm/` in cross-channel and haven't cleaned it up, and because `hg purge` doesn't detect or clean up nested clones, and because our current virtualenv setup code traverses the tree and can error out on `comm/` clones, let's clean up `comm/` after running cross-channel.

We'll be moving TB cross-channel to different tasks/workers in bug 1742711, and ideally we can update robustcheckout and/or `hg purge` to be able to detect and/or clean up nested clones.

Differential Revision: https://phabricator.services.mozilla.com/D134582
parent 38873ef4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ def get_default_config(topsrcdir, strings_path):
            },
            "comm-central": {
                "path": topsrcdir / "comm",
                "post-clobber": True,
                "url": "https://hg.mozilla.org/comm-central/",
                "heads": {
                    # This list of repositories is ordered, starting with the
+6 −0
Original line number Diff line number Diff line
@@ -279,6 +279,8 @@ def _do_create_content(
                repo_config["path"],
                heads=repo_config.get("heads", {}).keys(),
            )
            if repo_config.get("post-clobber", False):
                _nuke_hg_repo(command_context, str(repo_config["path"]))
    else:
        _check_hg_repo(command_context, strings_path)
        for repo_config in config.get("source", {}).values():
@@ -397,3 +399,7 @@ def _check_hg_repo(command_context, path, heads=None):

def _clone_hg_repo(command_context, url, path):
    _retry_run_process(command_context, ["hg", "clone", url, str(path)])


def _nuke_hg_repo(command_context, path):
    _retry_run_process(command_context, ["rm", "-rf", str(path)])