Commit 03f3d75d authored by Guido Günther's avatar Guido Günther

Make gbp-create-remote-repo a first class citizen

Add manpage, move into path, add bash completion
parent 05d9ecb7
......@@ -3,6 +3,7 @@ gbp/gbp_version.py
gbp-clone.py
gbp-pq.py
gbp-pull.py
gbp-create-remote-repo.py
git-buildpackage.py
git-dch.py
git-import-dsc.py
......
......@@ -26,3 +26,4 @@ Description: Suite to help with Debian packages in Git repositories
* git-dch: generate Debian changelog entries from Git commit messages
* gbp-{pull,clone}: clone and pull from remote repos
* gbp-pq: manage debian/patches easily
* gbp-create-remote-repo: create remote repositories
......@@ -155,3 +155,14 @@ _gbp_clone ()
_gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts"
}
[ "${have:-}" ] && complete -F _gbp_clone -o default gbp-clone
have gbp-create-remote-repo &&
_gbp_create_remote_repo ()
{
local options=$(_gbp_options gbp-create-remote-repo)
local branch_opts="--debian-branch\= --upstream-branch\="
local tristate_opts="--color\="
_gbp_comp "$options" "$branch_opts" "" "$tristate_opts"
}
[ "${have:-}" ] && complete -F _gbp_create_remote_repo -o default gbp-create-remote-repo
......@@ -13,18 +13,18 @@ COMMANDS = git-buildpackage \
git-dch \
gbp-pull \
gbp-clone \
gbp-pq
gbp-pq \
gbp-create-remote-repo
EXAMPLE_SCRIPTS=\
gbp-add-patch \
gbp-cowbuilder-sid \
gbp-pbuilder \
gbp-posttag-push \
gbp-create-remote-repo
gbp-posttag-push
DEB_COMPRESS_EXCLUDE=$(EXAMPLE_SCRIPTS)
SGML_MANPAGES=$(patsubst %,docs/%.1,$(COMMANDS) gbp-pq)
SGML_MANPAGES=$(patsubst %,docs/%.1,$(COMMANDS))
POD_MANPAGES=docs/git-pbuilder.1
MANPAGES=$(SGML_MANPAGES) $(POD_MANPAGES)
MANUAL=docs/manual-html
......
......@@ -168,6 +168,6 @@ EOF
&git-import-orig; <option>-u</option> <replaceable>0.1</replaceable> <filename>../package-0.1.tar.gz</filename>
<command>dh_make</command>
</screen>
That's it, you're done.
That's it, you're done. If you want to publish you're new repository you can use &gbp-create-remote-repo;.
</sect1>
</chapter>
......@@ -11,6 +11,7 @@
<!ENTITY gbp-pull "<command>gbp-pull</command>">
<!ENTITY gbp-clone "<command>gbp-clone</command>">
<!ENTITY gbp-pq "<command>gbp-pq</command>">
<!ENTITY gbp-create-remote-repo "<command>gbp-create-remote-repo</command>">
<!ENTITY gitcmd "<command>git</command>">
<!ENTITY gitkcmd "<command>gitk</command>">
<!ENTITY pbuildercmd "<command>pbuilder</command>">
......
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!ENTITY % COMMON SYSTEM "common.ent">
%COMMON;
<!ENTITY % MANPAGES SYSTEM "manpages/manpages.ent">
%MANPAGES;
]>
<reference>
<title>git-buildpackage Manual</title>
&man.gbp.create.remote.repo;
</reference>
<refentry id="gbp.man.gbp.create.remote.repo">
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
</refentryinfo>
<refmeta>
<refentrytitle>gbp-create-remote-repo</refentrytitle>
&dhsection;
</refmeta>
<refnamediv>
<refname>&gbp-create-remote-repo;</refname>
<refpurpose>Create remote repositories</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
&gbp-create-remote-repo;
<arg><option>--verbose</option></arg>
<arg><option>--color=</option><replaceable>[auto|on|off]</replaceable></arg>
<arg><option>--remote-url-pattern=</option><replaceable>url-pattern</replaceable></arg>
<arg><option>--[no-]pristine-tar</option></arg>
<arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
<arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg>
<arg><option>--[no-]track</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
&gbp-create-remote-repo; creates a repository at a remote location via ssh
and pushes the local repository into it. It then sets up remote branch
tracking so you can use &gbp-pull; to update your repo from there.
</para>
<para>
Note: By default the remote repositories are created in the <systemitem
class="groupname">collab-maint</systemitem> repository on <systemitem
class="systemname">alioth.debian.org</systemitem>.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term><option>--remote-url-pattern</option>=<replaceable>pattern</replaceable>
</term>
<listitem>
<para>Where to create the remote repository. The part
<replaceable>%(pkg)s</replaceable> will be replaced by the package name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debian-branch</option>=<replaceable>branch_name</replaceable>
</term>
<listitem>
<para>The branch in the Git repository the Debian package is being
developed on, default is <replaceable>master</replaceable>.
</listitem>
</varlistentry>
<varlistentry>
<term><option>--upstream-branch</option>=<replaceable>branch_name</replaceable>
</term>
<listitem>
<para>The branch in the &git; repository the upstream sources are put
onto. Default is <replaceable>upstream</replaceable>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pristine-tar</option>
</term>
<listitem>
<para>Whether to push the pristine tar branch.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--verbose</option></term>
<term><option>-v</option></term>
<listitem>
<para>verbose execution</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--color=</option><replaceable>[auto|on|off]</replaceable>
</term>
<listitem>
<para>Wheter to use colored output.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--[no-]track</option>
</term>
<listitem>
<para>Wheter to set up branch tracking for the debian, upstream and
pristine-tar branches.</para>
</listitem>
</varlistentry>
</variablelist>
<refsect1>
&man.git.config-files;
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>git-buildpackage</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>gbp-pull</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>&dhusername; &dhemail;</para>
</refsect1>
</refentry>
......@@ -6,5 +6,6 @@
<!ENTITY man.gbp.pull SYSTEM "gbp-pull.sgml">
<!ENTITY man.gbp.clone SYSTEM "gbp-clone.sgml">
<!ENTITY man.gbp.pq SYSTEM "gbp-pq.sgml">
<!ENTITY man.gbp.create.remote.repo SYSTEM "gbp-create-remote-repo.sgml">
<!ENTITY man.git.config-files SYSTEM "man.conffiles.sgml">
<!ENTITY man.seealso.common SYSTEM "man.seealso.sgml">
......@@ -35,6 +35,7 @@
&man.gbp.clone;
&man.gbp.pull;
&man.gbp.pq;
&man.gbp.create.remote.repo;
</appendix>
<appendix id="gbp.copyleft">
<title>Copyright</title>
......
......@@ -96,14 +96,13 @@ def main(argv):
parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='',
usage='%prog [options] - create a remote repository')
branch_group = GbpOptionGroup(parser, "branch options", "branch layout options")
branch_group = GbpOptionGroup(parser, "branch options", "branch layout and tracking options")
branch_group.add_config_file_option(option_name="remote-url-pattern", dest="remote_url")
parser.add_option_group(branch_group)
branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch")
branch_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
branch_group.add_option("--track", dest='track', action="store_true", default=False,
help="Set up tracking for remote branches")
branch_group.add_boolean_config_file_option(option_name="track", dest='track')
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
help="verbose command execution")
parser.add_config_file_option(option_name="color", dest="color", type='tristate')
......
......@@ -100,3 +100,7 @@
# Options only affecting gbp-
[gbp-pull]
#pristine-tar = True
[gbp-create-remote-repo]
# disable remote branch tracking
#track = False
......@@ -96,6 +96,7 @@ class GbpOptionParser(OptionParser):
'patch-numbers' : 'True',
'notify' : 'auto',
'merge' : 'True',
'track' : 'True',
}
help = {
'debian-branch':
......@@ -154,6 +155,8 @@ class GbpOptionParser(OptionParser):
"Whether to send a desktop notification after the build, default is '%(notify)s'",
'merge':
"after the import merge the result to the debian branch, default is '%(merge)s'",
'track':
"set up tracking for remote branches, default is '%(track)s'",
}
config_files = [ '/etc/git-buildpackage/gbp.conf',
os.path.expanduser('~/.gbp.conf'),
......
......@@ -22,7 +22,7 @@ setup(name = "git_build_package",
author = 'Guido Guenther',
author_email = 'agx@sigxcpu.org',
scripts = [ 'git-buildpackage', 'git-import-dsc', 'git-import-orig', 'git-dch', 'git-import-dscs',
'gbp-pq', 'gbp-pull', 'gbp-clone', 'git-pbuilder' ],
'gbp-pq', 'gbp-pull', 'gbp-clone', 'git-pbuilder', 'gbp-create-remote-repo'],
packages = [ 'gbp' ],
data_files = [("/etc/git-buildpackage/", ["gbp.conf" ]),],
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment