summaryrefslogtreecommitdiff
path: root/gbp
AgeCommit message (Collapse)Author
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>
2013-09-04GitRepository.describe: add 'tags' and 'extra-match' optionsLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository.has_treeish: minor pylint fixLingchaox Xin
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04import-orig: import readline in the common moduleMarkus Lehtonen
Useful common functionality. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04GitRepository/diff: add 'stat' and 'summary' optionsMarkus Lehtonen
For getting diffstat and summary in the output. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-09-04config: restore mangled env in doctestsMarkus Lehtonen
Otherwise the mangled GBP_CONF_FILES affects also other doctests when run with python-nose. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-08-28Use open() instead of file()Guido Günther
since the later doesn't exist in python3
2013-08-24pq: exclude patches from Debian packaging branchGuido Günther
When regenerating the patch queue including patches from the Debian branch is not useful. Addresses parts of See #680705. Thanks: Benjamin Cama for the detailed analysis
2013-08-24GitRepository: allow to use '..' instead of '...'Guido Günther
The symmetric difference isn't always useful since it includes changes from both branches. See #680705.
2013-08-22Minor docstring updatesGuido Günther
2013-08-21dch: make automatic adding of new sections more robustGuido Günther
This code that determined if we found a snapshot header was obuscated by the code that determines the commits to add. Split those and better document their purpose. Also always return the commit to start from so we don't need to repeat the logic in the uper levels.
2013-07-04GitRepository.set_upstream_branch: use --set-upstream-to if availableGuido Günther
since --set-upstream is deprecated.
2013-07-04GitRepository.set_upstream_branch: Catch errors to set upstream branchGuido Günther
2013-07-04GitRepository.set_upstream_branch: don't try to set upstream twiceGuido Günther
Move setting of the upstream branch out of the loop. This worked by accident.
2013-06-29gbp.git.GitRepository.has_branch(): use _git_commandGuido Günther
instead of the deprecated _git_getoutput
2013-06-29gbp.git.Repository.get_branch(): use _git_commandGuido Günther
instead of the deprecated _git_inout and clarify the return codes and exceptions raised.
2013-06-29Git.Repository.__git_inout: Close all other file descriptorsGuido Günther
No need to leak fds to the child.
2013-06-29Git.Repository.__git_inout: properly set stdinGuido Günther
We should set stdin to subprocess.PIPE when piping input according to the subprocess docs.
2013-06-27Use has_keyGuido Günther
It's shorter and get's rid of the unused dummy variable.
2013-06-26import-dsc: print filename instead of object nameGuido Günther
2013-06-26config: Don't fill in the parser with all defaultsGuido Günther
There's no need to fill the parser with all the built in defaults since we can simply copy them to the config from the class dict. This allows us to first set the values from the old {git,gbp}-* commands and then only overwrite changed values from the newer "gbp <command>" versions. Otherwise we'd overwite all old style config with the new style one. This also fixes the problem where the default section wouldn't be read at all if the command doesn't even have an empty section in any gbp.conf file.