aboutsummaryrefslogtreecommitdiff
path: root/git.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--git.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/git.rb b/git.rb
index a6b65fa..fbfb8cb 100644
--- a/git.rb
+++ b/git.rb
@@ -67,6 +67,11 @@ class VCS
`#{GITCMD} clone #{source} #{target}`
end
+ def VCS.revert revno
+ revhash = `#{GITCMD} log --format="%H"`.split("\n").reverse[revno-1]
+ `#{GITCMD} checkout #{revhash} .`
+ VCS.commit("Reverted Poll to version #{revno}")
+ end
end