Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'devbot/git.py')
-rw-r--r--devbot/git.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/devbot/git.py b/devbot/git.py
index 55fd9f5..8db61d2 100644
--- a/devbot/git.py
+++ b/devbot/git.py
@@ -36,3 +36,13 @@ class Module:
command.run(["git", "checkout", self.tag])
else:
command.run(["git", "merge", "origin", self._branch])
+
+ def clean(self):
+ try:
+ os.chdir(self.local)
+ except OSError:
+ return False
+
+ command.run(["git", "clean", "-fdx"])
+
+ return True