slug.py(1)
==========

NAME
----
slug.py - tool to interact with PLD git repositories


SYNOPSIS
--------
[verse]
'slug.py clone' [-d dir] [--depth depth]  [-j <threads>] pattern...
'slug.py fetch' [-d dir] [--depth depth]  [-j <threads>] pattern...
'slug.py init' [-d dir] [-j <threads>] package...
'slug.py list' [-b pattern...] pattern...
'slug.py pull' [-d dir] [--depth depth]  [-j <threads>] pattern...
'slug.py update' [-d dir] [--depth depth] [-j <threads>] [-n|-nn] [-P]
                 pattern...


DESCRIPTION
-----------

Facilitates common task in work with PLD git repositories


OPTIONS
-------

-d <directory>::
--packagesdir <directory>::
    The local repositories are assumed to reside in $HOME/rpm/packages directory. Use this
    options if you want to use a different location.

--depth <depth>::
    Fetch at most the specified number of commits for every updated branch.

-j <threads>::
    Set the number of threads which are used for fetching operations.

COMMANDS
--------

'checkout' <pattern>...::

Update the remote branches in the set of packages that match at least one of patterns and checkouts the first
branch in all repositories matching at least one of <patterns>.
        -b <pattern>;;
        --branch <pattern>;;
            Only the remote branches which names match the pattern are updated. If omitted \'master'
            is assumed.
        -c;;
        --checkout <ref>;;
            Name of ref to checkout. If omitted the remote tracking branch  corresponding to the argument of
            the first -b option is assumed.

'clone' <pattern> ...::

Clone the repositories which names match at least one of <patterns>.

'fetch' <pattern>...::
For every local repository matching at least one of patterns fetches upstream changes
and updates remote branches. It is synonymous with 'update -b \* -nn'.

'init' package ....::

Creates list of packages on the server side and initialize local repositories to follow them.

'list'::

Print the names of upstream repositories matching at least one of patterns.
+
With '-b' <pattern> only repositories containing a branch matching the pattern are
listed. Multiple '-b' options are allowed.

'pull'::
Update the remote branches in the set of packages that match at least on of the patterns
and rebase local changes on top of remote-tracking branch corresponding to local branch.
It is faster equivalent to performing git pull --rebase in every local repository.
        --all;;
            Perform rebase in all local repositories.
        --noall;;
            Perform rebase only in repositories with new changes fetched.

'update' <pattern>...::

Update the remote branches in the set of packages that match at least one of patterns.
        -b <pattern>;;
        --branch <pattern>;;
            Only the remote branches which names match the pattern are updated. If omitted 
\'master'
            is assumed.
        -n;;
        --newpkgs;;
            If the local repository does not exist it is initialized and the specified branches are fetched.
        -nn;;
        --nonewpkgs;;
            Update only the existing local repositories. No new local repositories are created. It is the default
            behaviour.
        -P;;
            Remove stale local packages, which were already removed upstream.

CONFIGURATION FILE
------------------

The behaviour of slug.py can also be configured with file $HOME/.gitconfig. The
value of all long options, can be specified in section [PLD] in this file.

AUTHOR
------

Written by Kacper Kornet <draenog at pld-linux.org>
