aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-03-19 14:22:52 +0100
committerGuido Günther <agx@sigxcpu.org>2012-03-19 14:25:45 +0100
commit2e783283984d7413d7adeab66e91a1beb83e8ada (patch)
treec3987b7ffefa27f7fe199abcbcd1b053dc5d5d1e
parent288b96835180477d3884595bf21f9c0516650a7f (diff)
gbp-create-remote-repo: test generated config
Git-Dch: Ignore
-rw-r--r--gbp/scripts/create_remote_repo.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py
index e73c92c..9b5d20f 100644
--- a/gbp/scripts/create_remote_repo.py
+++ b/gbp/scripts/create_remote_repo.py
@@ -35,6 +35,23 @@ from gbp.deb.git import DebianGitRepository
import gbp.log
def print_config(remote, branches):
+ """
+ Print out the git config to push to the newly created repo.
+
+ >>> print_config({'name': 'name', 'url': 'url'}, ['foo', 'bar'])
+ [remote "name"]
+ url = url
+ fetch = +refs/heads/*:refs/remotes/name/*
+ push = foo
+ push = bar
+ [branch "foo"]
+ remote = name
+ merge = refs/heads/foo
+ [branch "bar"]
+ remote = name
+ merge = refs/heads/bar
+ """
+
print """[remote "%(name)s"]
url = %(url)s
fetch = +refs/heads/*:refs/remotes/%(name)s/*""" % remote