GitRepository: option to ignore untracked in is_clean()

Add an option to ignore untracked files when checking if the repository
is clean.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
import-orig: refactor args of symlink_orig()

Add call arg to define the (formerly hard-coded) tarball basename in
symlink_orig(). In other words, this controls the name by which the
tarball is stored in pristine-tar branch.

This change makes symlink_orig() re-usable in the upcoming RPM-tools.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Introduce rpm helpers

Preparation for RPM support.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
config: add rpm-specific option parser class

Adds a new GbpOptionParserRpm class for handling rpm-specific options.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
docs: enable building html docs with docbook2html

This is useful if sgml2x package is not available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pull: similar update strategy for all branches

Treat non-checked-out branches similarly to the current branch when
forcing update. That is, do git merge, instead of just setting the ref.

Also, renames fast_forward_branch() to update_branch() to better match
the functionality.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pull: two modes for --force

The 'force' option now has two possible values:
'merge': upstream branch is merged, even if fast-forward is not
possible.

'clean': check out a clean copy from the upstream if fast-forward is not
possible (i.e. no merge). Local changes are lost in this case.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-dir' option to config.py

Needed by the upcoming rpm tools.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Rename internal var debian_branch -> packaging_branch

This is done in sake of more general purpose naming, intended for
enabling rpm support.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-branch' cmdline option

This is the counterpart of 'debian-branch' (basically identical to that)
to not confuse rpm maintainers.

Also, adds this option to gbp-clone and gbp-pull commands (as an
alternative to the 'debian-branch option), which are usable for RPM in
their current form.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Rename internal var debian_tag -> packaging_tag

This is done in sake of more general purpose naming, intended for
enabling rpm support: to allow logical naming for rpm and to
share as much code between debian and rpm tools as possible.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add 'packaging-tag' option to config.py

This is the counterpart of 'debian-tag' (basically identical to that) to
not confuse rpm maintainers.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
patch-queue: readiness to configure the pq branch name

All other gbp branches have configurable names. This commit adds the
readiness for user to configure/change the name of the patch-queue
branches, as well.

Patch-queue is defined in options as a format string, where '%(branch)s'
refers to the debian/packaging branch. If the pq-branch format string
does not contain '%(branch)s', there is only one patch-queue branch and
the debian/packaging branch is used as its base branch. That is, e.g. a
'gbp-pq switch' operation from the patch-queue branch always switches to
the debian/packaging branch.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Introduce git-import-srpm tool

Initial version of the git-import-srpm: a tool for importing source
rpms.

Unit tests: created a separate method in TestHelp for RPM-specific
commands.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Introduce gbp-pq-rpm tool

Initial version of gbp-pq-rpm: a tool for managing patch queues for rpm
packages.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pq-rpm: add 'export-rev' option

This option allows generating patches from any git tree-ish (instead of
the default that is HEAD of patch-queue branch).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pq-rpm: adopt to new pq-branch option

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Introduce git-buildpackage-rpm tool

Initial version of git-buildpackage-rpm: git-buildpackage tool for rpms.

Also adds some new options to config.py that are exclusively used in
this tool.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Introduce git-import-orig-rpm tool

Initial version of the git-import-orig-rpm: version of git-import-orig
intended for maintaining rpm packages.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
rpm: add rpm-specific example config file

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>