[RBTools] New upstream release 0.6.3
Stephen Gallagher
sgallagh at fedoraproject.org
Thu Nov 13 22:54:23 UTC 2014
commit 6fc4e4e99f30c87853362ab69ca3498515be702a
Author: Stephen Gallagher <sgallagh at redhat.com>
Date: Thu Nov 13 14:53:36 2014 -0800
New upstream release 0.6.3
- http://www.reviewboard.org/docs/releasenotes/rbtools/0.6.3/
- Include upstream patch adding 'rbt patch -C' to automatically commit a patch
to a local git repository.
.gitignore | 1 +
...dd-C-option-to-commit-patches-immediately.patch | 116 ++++++++++++++++++++
RBTools.spec | 8 +-
sources | 2 +-
4 files changed, 125 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d108655..1530807 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ RBTools-0.2.tar.gz
/RBTools-0.6.tar.gz
/RBTools-0.6.1.tar.gz
/RBTools-0.6.2.tar.gz
+/RBTools-0.6.3.tar.gz
diff --git a/0001-Add-C-option-to-commit-patches-immediately.patch b/0001-Add-C-option-to-commit-patches-immediately.patch
new file mode 100644
index 0000000..b4f8e80
--- /dev/null
+++ b/0001-Add-C-option-to-commit-patches-immediately.patch
@@ -0,0 +1,116 @@
+From d36c71ca63a841184a35041f25a400aad8c7dd5d Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh at redhat.com>
+Date: Mon, 21 Jul 2014 16:16:43 -0400
+Subject: [PATCH] Add -C option to commit patches immediately
+
+It is very useful to be able to script a series of patch
+applications all at once (such as when reviewing a patch series).
+In these cases, it is useful to be able to accept the default
+commit message for each patch.
+
+Conflicts:
+ rbtools/clients/git.py
+ rbtools/clients/mercurial.py
+ rbtools/commands/patch.py
+---
+ rbtools/clients/__init__.py | 2 +-
+ rbtools/clients/git.py | 13 +++++++++++--
+ rbtools/commands/patch.py | 12 ++++++++++--
+ 3 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/rbtools/clients/__init__.py b/rbtools/clients/__init__.py
+index 75db303767d1216c2e1aae2e7f2bfb7146a69902..b7ac8a4d7eca29a4b15deaf569e4140a928dab76 100644
+--- a/rbtools/clients/__init__.py
++++ b/rbtools/clients/__init__.py
+@@ -209,11 +209,11 @@ class SCMClient(object):
+ # is probably malformed.
+ if (patch_output == only_garbage_in_patch and
+ not patched_empty_files):
+ die('Failed to execute command: %s\n%s' % (cmd, patch_output))
+
+- def create_commit(self, message, author, files=[], all_files=False):
++ def create_commit(self, message, author, commitnow, files=[], all_files=False):
+ """Creates a commit based on the provided message and author.
+
+ Derived classes should override this method if they wish to support
+ committing changes to their repositories.
+ """
+diff --git a/rbtools/clients/git.py b/rbtools/clients/git.py
+index 51763f384dea1d4533a76e532cdf90d34707cd24..bbd5010b133cab42ae38c91a559e3e5e1e9fb6c0 100644
+--- a/rbtools/clients/git.py
++++ b/rbtools/clients/git.py
+@@ -620,12 +620,21 @@ class GitClient(SCMClient):
+ else:
+ cmd = ['git', 'apply', '--index', patch_file]
+
+ self._execute(cmd)
+
+- def create_commit(self, message, author, files=[], all_files=False):
+- modified_message = edit_text(message)
++ def create_commit(self, message, author, commitnow, files=[], all_files=False):
++ """Commits the given modified files.
++
++ This is expected to be called after applying a patch. This commits the
++ patch using information from the review request, opening the commit
++ message in $EDITOR to allow the user to update it.
++ """
++ if not commitnow:
++ modified_message = edit_text(message)
++ else:
++ modified_message = message
+
+ if all_files:
+ execute(['git', 'add', '--all', ':/'])
+ elif files:
+ execute(['git', 'add'] + files)
+diff --git a/rbtools/commands/patch.py b/rbtools/commands/patch.py
+index ec9da78b2462d2ba8e35cf7df44d4ef78ab24e6f..245b216f19834afcf3ec76fe56260d7ce2e5438c 100644
+--- a/rbtools/commands/patch.py
++++ b/rbtools/commands/patch.py
+@@ -27,10 +27,18 @@ class Patch(Command):
+ dest="commit",
+ action="store_true",
+ default=False,
+ help="Commit using information fetched "
+ "from the review request (Git only)."),
++ Option("-C", "--commitnow",
++ dest="commitnow",
++ action="store_true",
++ default=False,
++ help="Commit using information fetched "
++ "from the review request (Git/Mercurial only). "
++ "This differs from -c by not invoking the editor "
++ "to modify the commit message."),
+ Option("--diff-revision",
+ dest="diff_revision",
+ default=None,
+ help="revision id of diff to be used as patch"),
+ Option("--px",
+@@ -142,11 +150,11 @@ class Patch(Command):
+
+ tmp_patch_file = make_tempfile(diff_body)
+ self.apply_patch(repository_info, tool, request_id, diff_revision,
+ tmp_patch_file, base_dir)
+
+- if self.options.commit:
++ if self.options.commit or self.options.commitnow:
+ try:
+ review_request = api_root.get_review_request(
+ review_request_id=request_id,
+ force_text_type='plain')
+ except APIError, e:
+@@ -155,10 +163,10 @@ class Patch(Command):
+
+ message = self._extract_commit_message(review_request)
+ author = review_request.get_submitter()
+
+ try:
+- tool.create_commit(message, author)
++ tool.create_commit(message, author, self.options.commitnow)
+ print('Changes committed to current branch.')
+ except NotImplementedError:
+ raise CommandError('--commit is not supported with %s'
+ % tool.name)
+--
+2.1.0
+
diff --git a/RBTools.spec b/RBTools.spec
index 070058e..5db8568 100644
--- a/RBTools.spec
+++ b/RBTools.spec
@@ -4,7 +4,7 @@
%endif
Name: RBTools
-Version: 0.6.2
+Version: 0.6.3
Release: 1%{?dist}
Summary: Tools for use with ReviewBoard
@@ -54,6 +54,12 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/RBTools*.egg-info/
%changelog
+* Thu Nov 13 2014 Stephen Gallagher <sgallagh at redhat.com> 0.6.3-1
+- New upstream release 0.6.3
+- http://www.reviewboard.org/docs/releasenotes/rbtools/0.6.3/
+- Include upstream patch adding 'rbt patch -C' to automatically commit a patch
+ to a local git repository.
+
* Mon Jul 07 2014 Stephen Gallagher <sgallagh at redhat.com> 0.6.2-1
- New upstream release 0.6.2
- http://www.reviewboard.org/docs/releasenotes/rbtools/0.6.2/
diff --git a/sources b/sources
index a9e81ec..2174ce2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fbeae5f029d2ccd6db1c92dff9814900 RBTools-0.6.2.tar.gz
+3b3a73e6df3d2584c26e8d9c9f175ac0 RBTools-0.6.3.tar.gz
More information about the scm-commits
mailing list