diff options
author | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-07-22 16:46:38 +0200 |
---|---|---|
committer | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-07-22 16:46:38 +0200 |
commit | 85bd0d837f3f001b61cba9e8e37257ee410dee32 (patch) | |
tree | 1c603525bb2678bb0dba92254eca3f026a9a8f36 /MgaRepo | |
parent | 6867c689a397d863365daea4598a20a54d566100 (diff) | |
download | mgarepo-85bd0d837f3f001b61cba9e8e37257ee410dee32.tar mgarepo-85bd0d837f3f001b61cba9e8e37257ee410dee32.tar.gz mgarepo-85bd0d837f3f001b61cba9e8e37257ee410dee32.tar.bz2 mgarepo-85bd0d837f3f001b61cba9e8e37257ee410dee32.tar.xz mgarepo-85bd0d837f3f001b61cba9e8e37257ee410dee32.zip |
add support for checking out branch after git-svn init
Diffstat (limited to 'MgaRepo')
-rw-r--r-- | MgaRepo/git.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MgaRepo/git.py b/MgaRepo/git.py index ab89b25..4e763f8 100644 --- a/MgaRepo/git.py +++ b/MgaRepo/git.py @@ -52,7 +52,7 @@ class GIT(VCS): else: return self.update(targetpath, clone=True, **kwargs) - def init(self, url, targetpath, fullnames=True, **kwargs): + def init(self, url, targetpath, fullnames=True, branch=None, **kwargs): # verify repo url execcmd("svn", "info", url) @@ -73,6 +73,12 @@ class GIT(VCS): "svn-remote.authorlog.defaultmail": usermap.defaultmail} self.configset(gitconfig) + if branch: + execcmd(("git", "init", "-q", self.path), **kwargs) + execcmd(("git", "checkout", "-q", branch), **kwargs) + cmd = ["svn", "rebase", "--local"] + status, output = self._execVcs(*cmd, **kwargs) + return True def info(self, path, **kwargs): |