Hello community,

here is the log from the commit of package git-pw for openSUSE:Factory checked 
in at 2020-03-16 10:19:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/git-pw (Old)
 and      /work/SRC/openSUSE:Factory/.git-pw.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "git-pw"

Mon Mar 16 10:19:23 2020 rev:4 rq:785222 version:1.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/git-pw/git-pw.changes    2019-12-02 
11:30:26.834584949 +0100
+++ /work/SRC/openSUSE:Factory/.git-pw.new.3160/git-pw.changes  2020-03-16 
10:20:21.959636790 +0100
@@ -1,0 +2,8 @@
+Sun Mar 15 07:24:31 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.8.0:
+  * no changelog
+- Set out proper dependencies
+- Fix build without python2
+
+-------------------------------------------------------------------

Old:
----
  git-pw-1.7.0.tar.gz

New:
----
  git-pw-1.8.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ git-pw.spec ++++++
--- /var/tmp/diff_new_pack.d7IkYp/_old  2020-03-16 10:20:23.047637233 +0100
+++ /var/tmp/diff_new_pack.d7IkYp/_new  2020-03-16 10:20:23.051637235 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package git-pw
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,28 +18,30 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           git-pw
-Version:        1.7.0
+Version:        1.8.0
 Release:        0
 Summary:        A tool for integrating Git with Patchwork
 License:        MIT
-Group:          Development/Tools/Version Control
 URL:            https://github.com/getpatchwork/%{name}
 Source:         
https://files.pythonhosted.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz
-BuildRequires:  %{python_module arrow}
-BuildRequires:  %{python_module click}
+BuildRequires:  %{python_module arrow >= 0.10}
+BuildRequires:  %{python_module click >= 6.0}
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pbr}
-BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module requests}
+BuildRequires:  %{python_module pytest >= 3.0}
+BuildRequires:  %{python_module requests > 2.0}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module tabulate}
+BuildRequires:  %{python_module six >= 1.12}
+BuildRequires:  %{python_module tabulate >= 0.8}
+BuildRequires:  fdupes
 BuildRequires:  git-core
 BuildRequires:  python-rpm-macros
 Requires:       git-core
-Requires:       python-arrow
-Requires:       python-click
-Requires:       python-requests
-Requires:       python-tabulate
+Requires:       python-arrow >= 0.10
+Requires:       python-click >= 6.0
+Requires:       python-requests > 2.0
+Requires:       python-six >= 1.12
+Requires:       python-tabulate >= 0.8
 %python_subpackages
 
 %description
@@ -54,16 +56,17 @@
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 export LC_ALL=en_US.UTF-8
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
py.test-%{$python_bin_suffix}
+%pytest
 
 %files %{python_files}
 %license LICENSE
 %doc README.rst
 %python3_only %{_bindir}/git-pw
 %{python_sitelib}/git_pw
-%{python_sitelib}/git_pw-%{version}-py%{py_ver}.egg-info
+%{python_sitelib}/git_pw-%{version}-py%{python_version}.egg-info
 
 %changelog

++++++ git-pw-1.7.0.tar.gz -> git-pw-1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/.pre-commit-config.yaml 
new/git-pw-1.8.0/.pre-commit-config.yaml
--- old/git-pw-1.7.0/.pre-commit-config.yaml    1970-01-01 01:00:00.000000000 
+0100
+++ new/git-pw-1.8.0/.pre-commit-config.yaml    2019-12-08 15:37:53.000000000 
+0100
@@ -0,0 +1,10 @@
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+  rev: v2.3.0
+  hooks:
+  - id: check-executables-have-shebangs
+  - id: check-merge-conflict
+  - id: check-yaml
+  - id: end-of-file-fixer
+  - id: flake8
+  - id: trailing-whitespace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/ChangeLog new/git-pw-1.8.0/ChangeLog
--- old/git-pw-1.7.0/ChangeLog  2019-09-22 00:38:23.000000000 +0200
+++ new/git-pw-1.8.0/ChangeLog  2019-12-08 15:38:16.000000000 +0100
@@ -1,6 +1,15 @@
 CHANGES
 =======
 
+1.8.0
+-----
+
+* Fix mypy
+* Add auto-complete of '--state' argument
+* Integrate 'pre-commit'
+* tox: Run flake8 on 'docs' too
+* README: Clarify how to choose an API version
+
 1.7.0
 -----
 
@@ -73,8 +82,3 @@
 
 * docs: Split into multiple pages
 * tests: Validate unescaped arguments
-* tox: Start running unit tests in Travis
-* Display warning when using multiple filters with API v1.0
-* tests: Move to top-level directory
-* Add swp files to .gitignore
-* tests: Add 'bundle' tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/PKG-INFO new/git-pw-1.8.0/PKG-INFO
--- old/git-pw-1.7.0/PKG-INFO   2019-09-22 00:38:23.000000000 +0200
+++ new/git-pw-1.8.0/PKG-INFO   2019-12-08 15:38:16.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: git-pw
-Version: 1.7.0
+Version: 1.8.0
 Summary: Git-Patchwork integration tool
 Home-page: https://github.com/getpatchwork/git-pw
 Author: Stephen Finucane
@@ -90,7 +90,8 @@
         
           You can discover the API version supported by your instance by 
comparing the
           server version, found at ``/about``, with the API versions provided 
in the
-          `documentation`__.
+          `documentation`__. For example, if your server is running Patchwork 
version
+          2.1.x, you should use API version 1.1.
         
           __ 
https://patchwork.readthedocs.io/en/stable-2.1/api/rest/#rest-api-versions
         
@@ -112,6 +113,15 @@
         ``pw.password``
           The password for your Patchwork account.
         
+        The following settings are **optional** and may need to be set 
depending on
+        your Patchwork instance's configuration:
+        
+        ``pw.states``
+          The states that can be applied to a patch using the ``git pw patch 
update``
+          command. Should be provided in slug form (``changes-requested`` 
instead of
+          ``Changes Requested``). Only required if your Patchwork instance uses
+          non-default states.
+        
         You can set these settings using the ``git config`` command. This 
should be
         done in the repo in which you intend to apply patches. For example, to
         configure the Patchwork project, run:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/README.rst new/git-pw-1.8.0/README.rst
--- old/git-pw-1.7.0/README.rst 2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/README.rst 2019-12-08 15:37:53.000000000 +0100
@@ -79,7 +79,8 @@
 
   You can discover the API version supported by your instance by comparing the
   server version, found at ``/about``, with the API versions provided in the
-  `documentation`__.
+  `documentation`__. For example, if your server is running Patchwork version
+  2.1.x, you should use API version 1.1.
 
   __ https://patchwork.readthedocs.io/en/stable-2.1/api/rest/#rest-api-versions
 
@@ -101,6 +102,15 @@
 ``pw.password``
   The password for your Patchwork account.
 
+The following settings are **optional** and may need to be set depending on
+your Patchwork instance's configuration:
+
+``pw.states``
+  The states that can be applied to a patch using the ``git pw patch update``
+  command. Should be provided in slug form (``changes-requested`` instead of
+  ``Changes Requested``). Only required if your Patchwork instance uses
+  non-default states.
+
 You can set these settings using the ``git config`` command. This should be
 done in the repo in which you intend to apply patches. For example, to
 configure the Patchwork project, run:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/docs/conf.py 
new/git-pw-1.8.0/docs/conf.py
--- old/git-pw-1.7.0/docs/conf.py       2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/docs/conf.py       2019-12-08 15:37:53.000000000 +0100
@@ -5,7 +5,7 @@
 import git_pw
 
 try:
-    import sphinx_rtd_theme
+    import sphinx_rtd_theme  # noqa
     has_rtd_theme = True
 except ImportError:
     has_rtd_theme = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw/api.py 
new/git-pw-1.8.0/git_pw/api.py
--- old/git-pw-1.7.0/git_pw/api.py      2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/git_pw/api.py      2019-12-08 15:37:53.000000000 +0100
@@ -143,9 +143,9 @@
         # TODO(stephenfin): We only use a subset of the types possible for
         # 'params' (namely a list of tuples) but it doesn't seem possible to
         # indicate this
-        rsp = requests.get(  # type: ignore
-            url, auth=_get_auth(), headers=_get_headers(), params=params,
-            stream=stream)
+        rsp = requests.get(
+            url, auth=_get_auth(), headers=_get_headers(), stream=stream,
+            params=params)  # type: ignore
         rsp.raise_for_status()
     except requests.exceptions.RequestException as exc:
         _handle_error('fetch', exc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw/config.py 
new/git-pw-1.8.0/git_pw/config.py
--- old/git-pw-1.7.0/git_pw/config.py   2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/git_pw/config.py   2019-12-08 15:37:53.000000000 +0100
@@ -7,11 +7,6 @@
 from git_pw import utils
 
 LOG = logging.getLogger(__name__)
-# TODO(stephenfin): We should eventually download and store these
-# automagically
-DEFAULT_STATES = [
-    'new', 'under-review', 'accepted', 'rejected', 'rfc', 'not-applicable',
-    'changes-requested', 'awaiting-upstream', 'superseded', 'deferred']
 
 
 class Config(object):
@@ -21,7 +16,10 @@
 
     def __getattribute__(self, name):
         # attempt to use any attributes first
-        value = object.__getattribute__(self, name)
+        try:
+            value = super(Config, self).__getattribute__(name)
+        except AttributeError:
+            value = None
         if value:
             LOG.debug("Retrieved '{}' setting from cache".format(name))
             return value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw/patch.py 
new/git-pw-1.8.0/git_pw/patch.py
--- old/git-pw-1.7.0/git_pw/patch.py    2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/git_pw/patch.py    2019-12-08 15:37:53.000000000 +0100
@@ -10,13 +10,19 @@
 import click
 
 from git_pw import api
+from git_pw import config
 from git_pw import utils
 
+CONF = config.CONF
 LOG = logging.getLogger(__name__)
 
-_list_headers = ('ID', 'Date', 'Name', 'Submitter', 'State', 'Archived',
-                 'Delegate')
-_sort_fields = ('id', '-id', 'name', '-name', 'date', '-date')
+_list_headers = (
+    'ID', 'Date', 'Name', 'Submitter', 'State', 'Archived', 'Delegate')
+_sort_fields = (
+    'id', '-id', 'name', '-name', 'date', '-date')
+_default_states = (
+    'new', 'under-review', 'accepted', 'rejected', 'rfc', 'not-applicable',
+    'changes-requested', 'awaiting-upstream', 'superseded', 'deferred')
 
 
 @click.command(name='apply', context_settings=dict(
@@ -135,13 +141,18 @@
     _show_patch(patch, fmt)
 
 
+def _get_states():
+    return CONF.states.split(',') if CONF.states else _default_states
+
+
 @click.command(name='update')
 @click.argument('patch_ids', type=click.INT, nargs=-1, required=True)
 @click.option('--commit-ref', metavar='COMMIT_REF',
               help='Set the patch commit reference hash')
[email protected]('--state', metavar='STATE',
-              help='Set the patch state. Should be a slugified representation '
-              'of a state. The available states are instance dependant.')
[email protected]('--state', metavar='STATE', type=click.Choice(_get_states()),
+              help="Set the patch state. Should be a slugified representation "
+              "of a state. The available states are instance dependant and "
+              "can be configured using 'git config pw.states'.")
 @click.option('--delegate', metavar='DELEGATE',
               help='Set the patch delegate. Should be unique user identifier: '
               'either a username or a user\'s email address.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw.egg-info/PKG-INFO 
new/git-pw-1.8.0/git_pw.egg-info/PKG-INFO
--- old/git-pw-1.7.0/git_pw.egg-info/PKG-INFO   2019-09-22 00:38:23.000000000 
+0200
+++ new/git-pw-1.8.0/git_pw.egg-info/PKG-INFO   2019-12-08 15:38:16.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: git-pw
-Version: 1.7.0
+Version: 1.8.0
 Summary: Git-Patchwork integration tool
 Home-page: https://github.com/getpatchwork/git-pw
 Author: Stephen Finucane
@@ -90,7 +90,8 @@
         
           You can discover the API version supported by your instance by 
comparing the
           server version, found at ``/about``, with the API versions provided 
in the
-          `documentation`__.
+          `documentation`__. For example, if your server is running Patchwork 
version
+          2.1.x, you should use API version 1.1.
         
           __ 
https://patchwork.readthedocs.io/en/stable-2.1/api/rest/#rest-api-versions
         
@@ -112,6 +113,15 @@
         ``pw.password``
           The password for your Patchwork account.
         
+        The following settings are **optional** and may need to be set 
depending on
+        your Patchwork instance's configuration:
+        
+        ``pw.states``
+          The states that can be applied to a patch using the ``git pw patch 
update``
+          command. Should be provided in slug form (``changes-requested`` 
instead of
+          ``Changes Requested``). Only required if your Patchwork instance uses
+          non-default states.
+        
         You can set these settings using the ``git config`` command. This 
should be
         done in the repo in which you intend to apply patches. For example, to
         configure the Patchwork project, run:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw.egg-info/SOURCES.txt 
new/git-pw-1.8.0/git_pw.egg-info/SOURCES.txt
--- old/git-pw-1.7.0/git_pw.egg-info/SOURCES.txt        2019-09-22 
00:38:23.000000000 +0200
+++ new/git-pw-1.8.0/git_pw.egg-info/SOURCES.txt        2019-12-08 
15:38:16.000000000 +0100
@@ -1,4 +1,5 @@
 .mailmap
+.pre-commit-config.yaml
 .travis.yml
 AUTHORS
 ChangeLog
@@ -66,6 +67,7 @@
 releasenotes/notes/issue-48-694495f722119fed.yaml
 releasenotes/notes/issue-49-865c4f1657b97fce.yaml
 releasenotes/notes/passthrough-git-am-arguments-23cd0b292304d648.yaml
+releasenotes/notes/patch-states-b88240569f8474f1.yaml
 releasenotes/notes/random-fixes-3da473a63c253f2d.yaml
 releasenotes/notes/remove-python-3-2-3-3-support-8987031bed2c0333.yaml
 releasenotes/notes/require-server-version-93ac0818c293b85e.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/git_pw.egg-info/pbr.json 
new/git-pw-1.8.0/git_pw.egg-info/pbr.json
--- old/git-pw-1.7.0/git_pw.egg-info/pbr.json   2019-09-22 00:38:23.000000000 
+0200
+++ new/git-pw-1.8.0/git_pw.egg-info/pbr.json   2019-12-08 15:38:16.000000000 
+0100
@@ -1 +1 @@
-{"git_version": "0562167", "is_release": true}
\ No newline at end of file
+{"git_version": "cbc304c", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-bundle-apply.1 
new/git-pw-1.8.0/man/git-pw-bundle-apply.1
--- old/git-pw-1.7.0/man/git-pw-bundle-apply.1  2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-bundle-apply.1  2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW BUNDLE APPLY" "1" "21-Sep-2019" "1.7.0" "git-pw bundle apply 
Manual"
+.TH "GIT-PW BUNDLE APPLY" "1" "08-Dec-2019" "1.8.0" "git-pw bundle apply 
Manual"
 .SH NAME
 git-pw\-bundle\-apply \- Apply bundle.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-bundle-download.1 
new/git-pw-1.8.0/man/git-pw-bundle-download.1
--- old/git-pw-1.7.0/man/git-pw-bundle-download.1       2019-09-22 
00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/man/git-pw-bundle-download.1       2019-12-08 
15:37:53.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW BUNDLE DOWNLOAD" "1" "21-Sep-2019" "1.7.0" "git-pw bundle download 
Manual"
+.TH "GIT-PW BUNDLE DOWNLOAD" "1" "08-Dec-2019" "1.8.0" "git-pw bundle download 
Manual"
 .SH NAME
 git-pw\-bundle\-download \- Download bundle in mbox format.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-bundle-list.1 
new/git-pw-1.8.0/man/git-pw-bundle-list.1
--- old/git-pw-1.7.0/man/git-pw-bundle-list.1   2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-bundle-list.1   2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW BUNDLE LIST" "1" "21-Sep-2019" "1.7.0" "git-pw bundle list Manual"
+.TH "GIT-PW BUNDLE LIST" "1" "08-Dec-2019" "1.8.0" "git-pw bundle list Manual"
 .SH NAME
 git-pw\-bundle\-list \- List bundles.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-bundle-show.1 
new/git-pw-1.8.0/man/git-pw-bundle-show.1
--- old/git-pw-1.7.0/man/git-pw-bundle-show.1   2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-bundle-show.1   2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW BUNDLE SHOW" "1" "21-Sep-2019" "1.7.0" "git-pw bundle show Manual"
+.TH "GIT-PW BUNDLE SHOW" "1" "08-Dec-2019" "1.8.0" "git-pw bundle show Manual"
 .SH NAME
 git-pw\-bundle\-show \- Show information about bundle.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-bundle.1 
new/git-pw-1.8.0/man/git-pw-bundle.1
--- old/git-pw-1.7.0/man/git-pw-bundle.1        2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-bundle.1        2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW BUNDLE" "1" "21-Sep-2019" "1.7.0" "git-pw bundle Manual"
+.TH "GIT-PW BUNDLE" "1" "08-Dec-2019" "1.8.0" "git-pw bundle Manual"
 .SH NAME
 git-pw\-bundle \- Interact with bundles.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch-apply.1 
new/git-pw-1.8.0/man/git-pw-patch-apply.1
--- old/git-pw-1.7.0/man/git-pw-patch-apply.1   2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-patch-apply.1   2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH APPLY" "1" "21-Sep-2019" "1.7.0" "git-pw patch apply Manual"
+.TH "GIT-PW PATCH APPLY" "1" "08-Dec-2019" "1.8.0" "git-pw patch apply Manual"
 .SH NAME
 git-pw\-patch\-apply \- Apply patch.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch-download.1 
new/git-pw-1.8.0/man/git-pw-patch-download.1
--- old/git-pw-1.7.0/man/git-pw-patch-download.1        2019-09-22 
00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/man/git-pw-patch-download.1        2019-12-08 
15:37:53.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH DOWNLOAD" "1" "21-Sep-2019" "1.7.0" "git-pw patch download 
Manual"
+.TH "GIT-PW PATCH DOWNLOAD" "1" "08-Dec-2019" "1.8.0" "git-pw patch download 
Manual"
 .SH NAME
 git-pw\-patch\-download \- Download patch in diff or mbox format.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch-list.1 
new/git-pw-1.8.0/man/git-pw-patch-list.1
--- old/git-pw-1.7.0/man/git-pw-patch-list.1    2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-patch-list.1    2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH LIST" "1" "21-Sep-2019" "1.7.0" "git-pw patch list Manual"
+.TH "GIT-PW PATCH LIST" "1" "08-Dec-2019" "1.8.0" "git-pw patch list Manual"
 .SH NAME
 git-pw\-patch\-list \- List patches.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch-show.1 
new/git-pw-1.8.0/man/git-pw-patch-show.1
--- old/git-pw-1.7.0/man/git-pw-patch-show.1    2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-patch-show.1    2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH SHOW" "1" "21-Sep-2019" "1.7.0" "git-pw patch show Manual"
+.TH "GIT-PW PATCH SHOW" "1" "08-Dec-2019" "1.8.0" "git-pw patch show Manual"
 .SH NAME
 git-pw\-patch\-show \- Show information about patch.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch-update.1 
new/git-pw-1.8.0/man/git-pw-patch-update.1
--- old/git-pw-1.7.0/man/git-pw-patch-update.1  2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-patch-update.1  2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH UPDATE" "1" "21-Sep-2019" "1.7.0" "git-pw patch update 
Manual"
+.TH "GIT-PW PATCH UPDATE" "1" "08-Dec-2019" "1.8.0" "git-pw patch update 
Manual"
 .SH NAME
 git-pw\-patch\-update \- Update one or more patches.
 .SH SYNOPSIS
@@ -15,7 +15,7 @@
 Set the patch commit reference hash
 .TP
 \fB\-\-state\fP STATE
-Set the patch state. Should be a slugified representation of a state. The 
available states are instance dependant.
+Set the patch state. Should be a slugified representation of a state. The 
available states are instance dependant and can be configured using 'git config 
pw.states'.
 .TP
 \fB\-\-delegate\fP DELEGATE
 Set the patch delegate. Should be unique user identifier: either a username or 
a user's email address.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-patch.1 
new/git-pw-1.8.0/man/git-pw-patch.1
--- old/git-pw-1.7.0/man/git-pw-patch.1 2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/man/git-pw-patch.1 2019-12-08 15:37:53.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW PATCH" "1" "21-Sep-2019" "1.7.0" "git-pw patch Manual"
+.TH "GIT-PW PATCH" "1" "08-Dec-2019" "1.8.0" "git-pw patch Manual"
 .SH NAME
 git-pw\-patch \- Interact with patches.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-series-apply.1 
new/git-pw-1.8.0/man/git-pw-series-apply.1
--- old/git-pw-1.7.0/man/git-pw-series-apply.1  2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-series-apply.1  2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW SERIES APPLY" "1" "21-Sep-2019" "1.7.0" "git-pw series apply 
Manual"
+.TH "GIT-PW SERIES APPLY" "1" "08-Dec-2019" "1.8.0" "git-pw series apply 
Manual"
 .SH NAME
 git-pw\-series\-apply \- Apply series.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-series-download.1 
new/git-pw-1.8.0/man/git-pw-series-download.1
--- old/git-pw-1.7.0/man/git-pw-series-download.1       2019-09-22 
00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/man/git-pw-series-download.1       2019-12-08 
15:37:53.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW SERIES DOWNLOAD" "1" "21-Sep-2019" "1.7.0" "git-pw series download 
Manual"
+.TH "GIT-PW SERIES DOWNLOAD" "1" "08-Dec-2019" "1.8.0" "git-pw series download 
Manual"
 .SH NAME
 git-pw\-series\-download \- Download series in mbox format.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-series-list.1 
new/git-pw-1.8.0/man/git-pw-series-list.1
--- old/git-pw-1.7.0/man/git-pw-series-list.1   2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-series-list.1   2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW SERIES LIST" "1" "21-Sep-2019" "1.7.0" "git-pw series list Manual"
+.TH "GIT-PW SERIES LIST" "1" "08-Dec-2019" "1.8.0" "git-pw series list Manual"
 .SH NAME
 git-pw\-series\-list \- List series.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-series-show.1 
new/git-pw-1.8.0/man/git-pw-series-show.1
--- old/git-pw-1.7.0/man/git-pw-series-show.1   2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-series-show.1   2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW SERIES SHOW" "1" "21-Sep-2019" "1.7.0" "git-pw series show Manual"
+.TH "GIT-PW SERIES SHOW" "1" "08-Dec-2019" "1.8.0" "git-pw series show Manual"
 .SH NAME
 git-pw\-series\-show \- Show information about series.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw-series.1 
new/git-pw-1.8.0/man/git-pw-series.1
--- old/git-pw-1.7.0/man/git-pw-series.1        2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/man/git-pw-series.1        2019-12-08 15:37:53.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW SERIES" "1" "21-Sep-2019" "1.7.0" "git-pw series Manual"
+.TH "GIT-PW SERIES" "1" "08-Dec-2019" "1.8.0" "git-pw series Manual"
 .SH NAME
 git-pw\-series \- Interact with series.
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/man/git-pw.1 
new/git-pw-1.8.0/man/git-pw.1
--- old/git-pw-1.7.0/man/git-pw.1       2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/man/git-pw.1       2019-12-08 15:37:53.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "GIT-PW" "1" "21-Sep-2019" "1.7.0" "git-pw Manual"
+.TH "GIT-PW" "1" "08-Dec-2019" "1.8.0" "git-pw Manual"
 .SH NAME
 git-pw \- git-pw is a tool for integrating Git with...
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/git-pw-1.7.0/releasenotes/notes/patch-states-b88240569f8474f1.yaml 
new/git-pw-1.8.0/releasenotes/notes/patch-states-b88240569f8474f1.yaml
--- old/git-pw-1.7.0/releasenotes/notes/patch-states-b88240569f8474f1.yaml      
1970-01-01 01:00:00.000000000 +0100
+++ new/git-pw-1.8.0/releasenotes/notes/patch-states-b88240569f8474f1.yaml      
2019-12-08 15:37:53.000000000 +0100
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    The ``--state`` option of the ``git pw patch update`` command now supports
+    auto-complete for the default set of states provided by Patchwork. If
+    necessary, these states can be overridden using the ``pw.states``
+    ``git config`` setting.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/tests/test_patch.py 
new/git-pw-1.8.0/tests/test_patch.py
--- old/git-pw-1.7.0/tests/test_patch.py        2019-09-22 00:38:01.000000000 
+0200
+++ new/git-pw-1.8.0/tests/test_patch.py        2019-12-08 15:37:53.000000000 
+0100
@@ -211,6 +211,7 @@
 
 @mock.patch('git_pw.api.update')
 @mock.patch.object(patch, '_show_patch')
[email protected](patch, '_get_states')
 class UpdateTestCase(unittest.TestCase):
 
     @staticmethod
@@ -223,7 +224,7 @@
         rsp.update(**kwargs)
         return rsp
 
-    def test_update_no_arguments(self, mock_show, mock_update):
+    def test_update_no_arguments(self, mock_states, mock_show, mock_update):
         """Validate behavior with no arguments."""
 
         runner = CLIRunner()
@@ -233,9 +234,11 @@
         mock_update.assert_called_once_with('patches', 123, [])
         mock_show.assert_called_once_with(mock_update.return_value, None)
 
-    def test_update_with_arguments(self, mock_show, mock_update):
+    def test_update_with_arguments(self, mock_states, mock_show, mock_update):
         """Validate behavior with all arguments except delegate."""
 
+        mock_states.return_value = ['new']
+
         runner = CLIRunner()
         result = runner.invoke(patch.update_cmd, [
             '123', '--commit-ref', '3ed8fb12', '--state', 'new',
@@ -246,8 +249,22 @@
             ('commit_ref', '3ed8fb12'), ('state', 'new'), ('archived', True)])
         mock_show.assert_called_once_with(mock_update.return_value, 'table')
 
+    def test_update_with_invalid_state(
+            self, mock_states, mock_show, mock_update):
+        """Validate behavior with invalid state."""
+
+        mock_states.return_value = ['foo']
+
+        runner = CLIRunner()
+        result = runner.invoke(patch.update_cmd, [
+            '123', '--state', 'bar'])
+
+        assert result.exit_code == 2, result
+        assert 'Invalid value for "--state"' in result.output, result
+
     @mock.patch('git_pw.api.index')
-    def test_update_with_delegate(self, mock_index, mock_show, mock_update):
+    def test_update_with_delegate(
+            self, mock_index, mock_states, mock_show, mock_update):
         """Validate behavior with delegate argument."""
 
         mock_index.return_value = [self._get_person()]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-pw-1.7.0/tox.ini new/git-pw-1.8.0/tox.ini
--- old/git-pw-1.7.0/tox.ini    2019-09-22 00:38:01.000000000 +0200
+++ new/git-pw-1.8.0/tox.ini    2019-12-08 15:37:53.000000000 +0100
@@ -15,7 +15,7 @@
 deps =
   flake8
 commands =
-  flake8 {posargs:git_pw tests}
+  flake8 {posargs:git_pw tests docs}
 
 [testenv:mypy]
 deps=


Reply via email to