hg deletes now all changes, so we get a unchanged, blank repo. this is also the behaviour of git

This commit is contained in:
Kilian Holzinger 2013-12-12 10:26:56 +01:00
parent a5dca3013f
commit 6435551e66

View file

@ -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'],