summaryrefslogtreecommitdiff
path: root/gbp
AgeCommit message (Collapse)Author
2014-05-07Handle version format errors more gracefullyGuido Günther
So far if a package claimed to be non native but the version number didn't contain a '-' we failed like: Traceback (most recent call last): File "/usr/bin/gbp", line 9, in <module> load_entry_point('gbp==0.6.13', 'console_scripts', 'gbp')() File "/usr/lib/python2.7/dist-packages/gbp/scripts/supercommand.py", line 82, in supercommand return module.main(args) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 541, in main output_dir) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 96, in prepare_upstream_tarball upstream_tree = git_archive_build_orig(repo, cp, output_dir, options) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 270, in git_archive_build_orig upstream_tree = get_upstream_tree(repo, cp, options) File "/usr/lib/python2.7/dist-packages/gbp/scripts/buildpackage.py", line 245, in get_upstream_tree cp['Upstream-Version']) File "/usr/lib/python2.7/dist-packages/gbp/deb/git.py", line 107, in version_to_tag return format % dict(version=DebianGitRepository._sanitize_version(version)) File "/usr/lib/python2.7/dist-packages/gbp/deb/git.py", line 122, in _sanitize_version return version.replace('~', '_').replace(':', '%') It shouldn't be like that.
2014-04-04Slightly improve usage outputGuido Günther
2014-04-03config: add decorator to add_option_* functionsGuido Günther
This allows us to build an internal list of valid options and print these.
2014-04-03Import command not moduleGuido Günther
This matches the function name
2014-04-02Revert "GitRepository/add_remote_repo: fix the 'tags' argument"Markus Lehtonen
Which caused an unwanted behavior of not fetching refs/heads at all -- only tags were fetched. This reverts commit 5dd598fb8f2a9109189fad6cf631811f12ce2130 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-04-01Add minimal 'config' commandGuido Günther
This only allows to print single config values so far. Closes: #733470
2014-04-01Test option parser fallbacks more thoroughlyGuido Günther
revealing another bug where we overwrote parsed values with defaults Closes: #733759
2014-03-29Use a much simpler version to fix the command name in --helpGuido Günther
mostly reverting e1780f0. Closes: #742907
2014-03-27Fix command outputGuido Günther
The first line lacked the subcommand like: $ gbp pull --help Usage: gbp [options] - safely update a repository from remote instead of $ gbp pull --help Usage: gbp pull [options] - safely update a repository from remote ^^^^
2014-03-27pq: minor log message typo fixMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-03-27GitRepository/add_remote_repo: fix the 'tags' argumentMarkus Lehtonen
Explicitly use --tags in git arguments - otherwise tags might not be fetched. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-03-27GitRepository/get_commit_info: correctly handle file renames/copiesMarkus Lehtonen
Use the '--no-renames' git command line option in order to prevent two filenames per entry. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-02-23import_dsc: Create missing debian branch with --create-missing-branchesGuido Günther
Closes: #739888
2014-02-19config: Don't pull in config defaults twiceGuido Günther
This would otherwise overwrite values set in the legacy config sections. Closes: #733759
2014-02-18config: Don't pull in config defaults twiceGuido Günther
This would otherwise overwrite values set in the legacy config sections. Closes: #733759
2014-01-07import_orig: test error paths of find_sourceGuido Günther
2014-01-05Change the default of cleaner to /bin/trueGuido Günther
Running a clean command within version control by default nowadays causes more trouble than it helps. It's unnecessary with pbuilder/cowbuilder/sbuild and with export-dir. So change the default from 'debuild clean' to a noop ('/bin/true'). Closes: #670624
2014-01-05Make parsing config file sections symmetricGuido Günther
Always read the legacy command's config file section prior to the subcommand's config file section. Until now 'gbp <subcommand>' would read '[subcommand]' as well as '[gbp-<subcommand>]' sections while 'gbp-<subcommand>' would only read '[gbp-<subcommand>]' sections. Closes: #733759
2014-01-05Avoid backtrace on config file parse errorsGuido Günther
"gbp buildpackage" did this already but others didn't Closes: #733759
2013-12-20Determine changes file name based on dpkg-buildpackage optionsGuido Günther
Closes: #732678
2013-11-06log: add error and warning aliasesGuido Günther
since I tend to use them instead of err and warn. Closes: #728896
2013-11-06import-dsc; Merge upstream version by tagGuido Günther
instead of simply using the upstream branch name. THis makes sure we also merge upstream versions that were imported previously with e.g. "gbp import-orig". Closes: #698222
2013-11-05import-dsc: allow to skip Debian tag creationGuido Günther
Closes: #636368
2013-10-31pq: support 'Topic' patch-export commandMarkus Lehtonen
Topic can be defined with either 'Gbp: Topic <topic>' or 'Gbp-Pq: Topic <topic>' in the commit message. This is to replace the "gbp-pq-topic: <topic>" command. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: listen to 'Gbp-Pq:' commands, tooMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: add format_diff() functionMarkus Lehtonen
For generating a patch file from a diff between two arbitrary commits. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: support patch-export commandsMarkus Lehtonen
Support giving commands to pq as a meta tag in commit message. The format is "Gbp: <command> [args]". Currently, only one command is supported. namely 'ignore'. That is, one can use 'Gbp: Ignore' in the commit message for ignoring the commit in patch-generation. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: properly generate non-ascii patch filesMarkus Lehtonen
Encode non-ascii email headers properly. Also, set MIME headers correctly for the message body if the commit message body contains non-ascii characters. The reason for constructing the message in a little bit "clumsy" way is the intention is to match the output of git-format-patch as closely as possible. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq.format_patch: support file path filteringMarkus Lehtonen
Implements a filter option that allows filtering out changes to certain files/paths in the patch-generation. A commit is totally ignored if all files would be filtered out. The path filter is given as a Python regexp. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-31pq: rewrite patch export functionalityMarkus Lehtonen
Use our own function for constructing the patch files instead of using the format-patch command of git. This way, we get the desired output format directly, without the need for the error-prone "format-patch, parse patch files, mangle and re-write patch files" cycle. Also, fix patch naming in patch generation when '--no-patch-numbers' is used. Previously, multiple commits with the same subject resulted in multiple patches having the same filename. This lead into broken series with missing patches as patch files were overwritten by the topmost commit. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-22gbp-clone: support cloning to a specific directoryGuan Junchun
Closes: #725666 Signed-off-by: Guan Junchun <junchunx.guan@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-22gbp-clone: support repo URLs like "host:repo.git"Guan Junchun
Previously, gbp didn't correctly parse this kind of URL and clone failed. Signed-off-by: Guan Junchun <junchunx.guan@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-10-16Be more robust about git status output changesGuido Günther
by using --porcelain. Heavily based on a patch by rian m. carlson Closes: #726260
2013-09-16pq: Only print number or tries if we try more than onceGuido Günther
2013-09-16pq: print which patch failed to applyGuido Günther
2013-09-10GitRepository: deprecate the get_remote_repos methodMarkus Lehtonen
Superceded byt the get_remotes() method. Change-Id: I34f9e8b8188b5a40ce21d2f74e6068f2aaec9e60 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.has_remote_repo: use get_remotes methodMarkus Lehtonen
Use the new get_remotes() method Change-Id: Ic34cf590a6f36e6fa0af2ffbe932c8ae3a198944 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10git: new class and method for remote repositoriesMarkus Lehtonen
Add a new GitRemote class for representing git remote repositories. The initial, very limited, version only contains information about the fetch and push URLs of the remote repository. Also, add a new GitRepository.get_remotes() method for getting remote repositories as instances of the new GitRemote class. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.pull: Add 'all_remotes' optionLingchaox Xin
Also changes the method to utilize the GitArgs class. Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.push: Add 'tags' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.push: Add 'force' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.list_tree: add 'paths' optionMarkus Lehtonen
Change-Id: I9331fec6fcd0e58dad7cb4a571a683e09ce08011 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10GitRepository.diff: add 'ignore_submodules' optionMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-10common/buildpackage: fix handling of empty tarball prefixMarkus Lehtonen
Previously empty prefix in tarball generation introduced a leading slash in all filenames in the archive. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-05Remove unused importGuido Günther
2013-09-05GitRepository.diff: prevent usage of external diffMarkus Lehtonen
External diff might break patch generation, for example. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-05GitRepository.diff: add 'text' optionMarkus Lehtonen
For generating textual diffs. Useful for Pq - for example, the 'patch' utility does not support git binary diffs. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository: Add clean() methodMarkus Lehtonen
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository.fetch: Add 'all_remotes' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository.fetch: Add 'refspec' optionLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>