aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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 e73c92c6..9b5d20fb 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