grim/local-pipelines

601bff56b3fb
Parents 5ebfb03a8864
Children 1eb9fe35d616
vcs: add new class that interfaces to hg repos
--- a/pipelines/vcs.py Wed Jul 27 22:15:36 2016 -0700
+++ b/pipelines/vcs.py Wed Jul 27 22:16:27 2016 -0700
@@ -55,6 +55,16 @@
self._path)
+class hg_backend(object):
+ def __init__(self, path):
+ self._path = path
+
+ @property
+ def branch(self):
+ return run_command('hg log -r . -T {branch}',
+ self._path)
+
+
def get_branch(path):
branch = None
env = os.environ.copy()