--- a/pipelines/vcs.py Wed Jul 27 22:16:27 2016 -0700
+++ b/pipelines/vcs.py Thu Jul 28 00:57:57 2016 -0700
@@ -65,6 +65,32 @@
+ def __init__(self, search_path): + # search for .git or .hg to determine our backend class + next_dir = os.path.realpath(search_path) + while prev_dir != next_dir: + if os.path.exists(os.path.join(next_dir, '.git')): + self._repo = git_backend(next_dir) + elif os.path.exists(os.path.join(next_dir, '.hg')): + self._repo = hg_backend(next_dir) + next_dir = os.path.dirname(prev_dir) + raise IOError("Could not find .git nor .hg") + return self._repo.branch