summaryrefslogtreecommitdiff
path: root/gbp/git
AgeCommit message (Collapse)Author
2015-01-31repository: fix head docstringGuido Günther
head is not a function so it doesn't _return_ anything Gbp-Dch: Ignore
2015-01-22vfs: remove wrong docstringGuido Günther
Gbp-Dch: Ignore
2014-12-05GitRepository: Implement status methodEd Bartosh
Simple wrapper to the git-status command. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05GitRepository.create_branch: add 'force' optionMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-12-05GitRepository: add diff_status methodMarkus Lehtonen
This is a method of getting the filename and status information of a diff. That is, a list of files that changed and their status, "added", "modified" etc. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2014-10-29git.vfs: fix close methodGuido Günther
Preventing a infinite recursion which can be triggered by gbp pq export --commit.
2014-05-16Fix comitter vs committer typosGuido Günther
Thanks: Sandro Tosi Closes: #748339
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-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>
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-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-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-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-08-28Use open() instead of file()Guido Günther
since the later doesn't exist in python3
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-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-13GitRepository/diff: allow single objectMarkus Lehtonen
Allow diffing a single object, e.g. getting diff from single commit. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-11GitRepository.get_subject: use get_commit_infoGuido Günther
This kills another _git_getoutput. Also deprecate the method since we don't need to special case the subject.
2013-06-06GitRepository/get_commit_info: add patchname to infoMarkus Lehtonen
Add a new 'patchname' field to the information returned by get_commit_info. That is, the subject in a sanitized format, similar to what git-format-patch uses. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-06gitmodifier: make the datetime object always have timezoneMarkus Lehtonen
To be consistent with the date property and for easier compatibility with git dates. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-05-08GitRepository: Use LC_ALL=C when checking featuresGuido Günther
This fixes the doctest and also makes sure we use an up to date manpage. Thanks: Daniel Dehennin for the report
2013-05-02GitRepository Use _git_inout in get_branchGuido Günther
to suppress the confusiong "fatal: ref HEAD is not a symbolic ref". We alrady put out a more descriptive error message. This makes using --ignore-branch look far less dangerous.
2013-04-27GitRepository.has_feature: capture stderrGuido Günther
to avoid spurious output on the console and add the error message to the exception intead.
2013-04-27GitRepository.commit_dir: raise GitRepositoryError instead of GbpErrorGuido Günther
and make sure the callers forward the error properly
2013-04-27Silence GitRepository.write_treeGuido Günther
but add any error output to the exception instead. All callers have been audited to properly output the message if needed.
2013-04-27Silence GitRepository.grep_logGuido Günther
None of the gbp script rely on the output being printed. In fact we improve the exception by appending the stderr output.
2013-04-27Silence GitRepository.set_upstream_branchGuido Günther
It's not used within gbp itself so no command line tool expects an error message to be printed.
2013-04-26Silence GitRepository.has_treeishGuido Günther
This also silences 10_test_get_upstream_tree