rebase command
[matrix.git] / matrix / git.py
index 3ed8347..ec02a13 100644 (file)
@@ -124,6 +124,14 @@ def clone(name, url, checkout=True):
 
        call(['clone'] + options + [url, name], fail=True)
 
+def remote_update(name):
+       call(['remote', 'update'], workdir=name)
+
+def rebase(name, refspec='origin'):
+       cmd = ['rebase', refspec]
+       if call(cmd, workdir=name) != 0:
+               raise Error(cmd, name)
+
 def pull(name, url=None, refspec=None):
        if url is None and refspec is None:
                cmd = ['pull']