Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/git.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-29 22:26:08 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-29 22:34:33 (GMT)
commit59df9bd4d22715b03d1b765321021a59ebc9366b (patch)
treebe1075a9e3a3c2d4908735e948e0d73d690ba9dd /devbot/git.py
parent48c02f188784d65bd501a907e572e041ed61dc15 (diff)
Git clean not out-of-source modules instead of removing
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