mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Merge commit 'refs/merge-requests/93' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
c09382fa82
1 changed files with 12 additions and 0 deletions
|
|
@ -555,6 +555,18 @@ class vcs_hg(vcs):
|
||||||
if subprocess.call(['hg', 'update', '-C', rev],
|
if subprocess.call(['hg', 'update', '-C', rev],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
raise VCSException("Hg checkout failed")
|
raise VCSException("Hg checkout failed")
|
||||||
|
p = subprocess.Popen(['hg', 'purge', '--all'], stdout=subprocess.PIPE,
|
||||||
|
cwd=self.local)
|
||||||
|
result = p.communicate()[0]
|
||||||
|
if "'purge' is provided by the following extension" in result:
|
||||||
|
#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")
|
||||||
|
else:
|
||||||
|
raise VCSException("HG purge failed")
|
||||||
|
|
||||||
def gettags(self):
|
def gettags(self):
|
||||||
p = subprocess.Popen(['hg', 'tags', '-q'],
|
p = subprocess.Popen(['hg', 'tags', '-q'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue