From: Kilian Holzinger Date: Thu, 12 Dec 2013 09:26:56 +0000 (+0100) Subject: hg deletes now all changes, so we get a unchanged, blank repo. this is also the behav... X-Git-Tag: 0.1~7^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6435551e6669bf3ff31e180002e4a5e0932511a3;p=fdroidserver.git hg deletes now all changes, so we get a unchanged, blank repo. this is also the behaviour of git --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 5b3d7c62..51be2ae1 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -472,6 +472,12 @@ class vcs_hg(vcs): if subprocess.call(['hg', 'update', '-C', rev], cwd=self.local) != 0: raise VCSException("Hg checkout failed") + #Also delete untracked files, we have to enable purge extension for that: + 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: + raise VCSException("HG purge failed") def gettags(self): p = subprocess.Popen(['hg', 'tags', '-q'],