diff --git a/buildserver/provision-apt-get-install b/buildserver/provision-apt-get-install index e29a786a..c27d8ff9 100644 --- a/buildserver/provision-apt-get-install +++ b/buildserver/provision-apt-get-install @@ -123,7 +123,6 @@ packages=" fdroidserver git-svn gnupg - mercurial patch python3-magic python3-packaging diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 7886a9d8..2123910a 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -152,8 +152,8 @@ def check_tags(app: metadata.App, pattern: str) -> tuple[str, int, str]: else: repotype = app.RepoType - if repotype not in ('git', 'git-svn', 'hg'): - raise MetaDataException(_('Tags update mode only works for git, hg, bzr and git-svn repositories currently')) + if repotype != "git": + raise MetaDataException(_('Tags update mode only works for git repositories currently')) if repotype == 'git-svn' and ';' not in app.Repo: raise MetaDataException(_('Tags update mode used in git-svn, but the repo was not set up with tags')) @@ -313,8 +313,6 @@ def check_repomanifest(app: metadata.App, branch: Optional[str] = None) -> tuple vcs.gotorevision(branch) elif repotype == 'git-svn': vcs.gotorevision(branch) - elif repotype == 'hg': - vcs.gotorevision(branch) last_build = get_last_build_from_app(app) try_init_submodules(app, last_build, vcs) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 646032f2..ec389262 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1544,8 +1544,6 @@ def getvcs(vcstype, remote, local): ) if vcstype == 'git-svn': return vcs_gitsvn(remote, local) - if vcstype == 'hg': - return vcs_hg(remote, local) if vcstype == 'srclib': if str(local) != os.path.join('build', 'srclib', str(remote)): raise VCSException("Error: srclib paths are hard-coded!") @@ -2032,45 +2030,6 @@ class vcs_gitsvn(vcs): return p.output.strip() -class vcs_hg(vcs): - - def repotype(self): - return 'hg' - - def clientversioncmd(self): - return ['hg', '--version'] - - def gotorevisionx(self, rev): - if not os.path.exists(self.local): - p = FDroidPopen(['hg', 'clone', '--ssh', '/bin/false', '--', self.remote, str(self.local)], - output=False) - if p.returncode != 0: - self.clone_failed = True - raise VCSException("Hg clone failed", p.output) - else: - p = FDroidPopen(['hg', 'status', '-uiS'], cwd=self.local, output=False) - if p.returncode != 0: - raise VCSException("Hg status failed", p.output) - for line in p.output.splitlines(): - if not line.startswith('? ') and not line.startswith('I '): - raise VCSException("Unexpected output from hg status -uS: " + line) - FDroidPopen(['rm', '-rf', '--', line[2:]], cwd=self.local, output=False) - if not self.refreshed: - p = FDroidPopen(['hg', 'pull', '--ssh', '/bin/false'], cwd=self.local, output=False) - if p.returncode != 0: - raise VCSException("Hg pull failed", p.output) - self.refreshed = True - - rev = rev or 'default' - if not rev: - return - p = FDroidPopen(['hg', 'update', '-C', '--', rev], cwd=self.local, output=False) - if p.returncode != 0: - raise VCSException("Hg checkout of '%s' failed" % rev, p.output) - - def _gettags(self): - p = FDroidPopen(['hg', 'tags', '-q'], cwd=self.local, output=False) - return p.output.splitlines()[1:] # fmt: on