1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Simplify hg purge workarounds

This commit is contained in:
Daniel Martí 2014-01-20 00:33:31 +01:00
parent 4e4728969f
commit 228ed8eac9

View File

@ -561,9 +561,8 @@ class vcs_hg(vcs):
# Also delete untracked files, we have to enable purge extension for that:
if "'purge' is provided by the following extension" in result:
with open(self.local+"/.hg/hgrc", "a") as myfile:
myfile.write("\n[extensions]\nhgext.purge=")
if subprocess.call(['hg', 'purge', '--all'],
cwd=self.local) != 0:
myfile.write("\n[extensions]\nhgext.purge=\n")
if subprocess.call(['hg', 'purge', '--all'], cwd=self.local) != 0:
raise VCSException("HG purge failed")
else:
raise VCSException("HG purge failed")