Remove ignored files on gotorevisionx for hg

Other revisions can change the list of ignored files and if we don't
remove them, switching to another revision can fail.
This commit is contained in:
relan 2024-11-14 21:53:44 +03:00 committed by Hans-Christoph Steiner
parent 3bd2bc69d3
commit 87909fae74

View file

@ -1697,11 +1697,11 @@ class vcs_hg(vcs):
self.clone_failed = True
raise VCSException("Hg clone failed", p.output)
else:
p = FDroidPopen(['hg', 'status', '-uS'], cwd=self.local, output=False)
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('? '):
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: