| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This change updates patchwor to the newer project struture: we've moved
the actual application out of the apps/ directory, and the
patchwork-specific templates to under the patchwork application.
This gives us the manage.py script in the top-level now.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Use the PAGER of the environment to view patches
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Examples:
# Mark patch as uperseded and archived
pwclient update -s Superseded -a yes <ID>
# List all archived patches
pwclient list -a yes
Notably, we still leave the '-s' option as required for 'pwclient
update'; so you can't *just* archive a patch without setting its state.
I couldn't quite figure out the right argparse usage to represent that
the user must include one or both of '-s' and '-a'.
And of course, the server must have an updated xmlrpc that supports the
'archived' field for list filtering (recently patched), otherwise you'll
just get an empty list.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When run with more than one patch ID, the 'apply' and 'git-am' commands
should not continue to process other patches if an earlier one failed.
We should stop so the user can address the situation.
Future work: it'd be nice to just pipe all the patches at once to
git-am, so that git's nice handling of fixup-and-continue workflow can
be used.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we could not target a particular server instance with the
apply, git-am, info, and view subcommands. Under a single-server design,
we never needed to target a particular project for a patch. We just
targeted the patch itself. But with the advent of multi-server
.pwclientrc configurations, we should allow pwclient to specify the
project for these commands.
This adds the '-p PROJECT' option to:
* apply
* git-am
* info
* view
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
The angle brackets are not really part of the message-id. Making it
possible to get the message-id without them is helpful.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Make scripting easier by letting the user specify the output format. The
format string may contain tag references to fields, such as %{id} and
%{msgid}.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The 'save' action really is called 'get' (as opposed to 'view').
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Don't generate an empty array, use for-loop instead
as noticed by Jacob E. Keller
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
dict().get() returns a default of None, use that to initialize our
internal variables.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Remove over-cautious helptext printing while at it
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we use a frozenset to remove duplicates in the patch id
list. However, this means we lose the patch ordering, which is important
for a git-am.
This change drops the frozenset, so we preserve the ordering from the
arguments.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
a386e636cc0adaa760a66b6ab042178027fc45c7 removed argparse mutual
exclusive group, so manually diagnose:
1) missing required hash_str / IDs
2) if both hash_str as well as IDs are seen
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow commands that take an ID to operate on multiple IDs.
E.g.:
update -s Superseded 1 2 3 4 5
apply 2 4 6
Reject update -c COMMIT-REF on multiple IDs though as that does not
make sense.
Implementation note:
nargs='*' instead of '?' results in (wrong/inconvenient):
mutually exclusive arguments must be optional
So remove mutual exclusive handling via argparse and instead do it by
hand. This might be implemented more conveniently in later python but we
(have to) stick with 2.7.x for the time being.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to obtain git-am '--signoff' settings from:
- the commandline
- the global option section
- per-project section
v2: handle NoOptionError
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
and obtain "action" from args.subcmd while at it
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Optionally pass --signoff to git-am
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, given the format of ~/.pwclientrc, pwclient can only
really act on a single project, as ~/pwclientrc can only contain
the configuration for a single project.
Although the -p options comes in handy to specify a project
different from the one configured in ~/.pwclientrc, this only works
if it is hosted on the same server. As soon as one needs to switch
server, it is necessary to edit ~/pwclientrc.
This can be quite inefficient when dealing with many projects, hosted
on different servers.
Change the format of ~/.pwclientrc so it is possible to define more
than one project, and for each project, specify an URL and credentials.
The new format is like:
[options]
default = project-A
[project-A]
url = http://my.patchwork.server/path/to/xmlrpc
username = that-is-me
password = secret
[other-project]
url = http://you.get/the/idea
username = someone
password = 1234
This has the advantage of not changing the options to pwclient, so
the user experience is unmodified.
If a ~/.pwclentrc exists in the old format, it is automatically
converted over to the new format, and the previous one is saved as
~/.pwclientrc.orig. Upon conversion, no action is made, pwclient just
exits (with return-code 1) to inform the user to review the conversion.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
We only support a single config file, so there is no need to have a
plural in this variable.
Also, we'll need to know what the default config file is, when we want
to save it to migrate to the new format.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes following error when redirecting 'pwclient info' output:
---8<---
andreas@dockstar % pwclient info 295268 > /tmp/test.out
Traceback (most recent call last):
File "/home/andreas/bin/pwclient", line 508, in <module>
main()
File "/home/andreas/bin/pwclient", line 471, in main
action_info(rpc, patch_id)
File "/home/andreas/bin/pwclient", line 242, in action_info
print("- %- 14s: %s" % (key, value))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 29: ordinal not in range(128)
--->8---
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
New patch IDs are now 7 digits long on patchwork.kernel.org. Give a
little more space.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
This command prints raw information that patchwork has about a patch. This can
be useful for debugging problems with patchwork.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a pwclient search option '-m' to look up a patch id given a
Message-id. This is useful for automation and mailer hooks.
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
.. to prevent ascii codec exceptions.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
This commit adds a new "pwclient git-am" action which applies given
patch ID on the current git branch using "git am". It's convenient to
keep track and authorship of patches applied locally from a patchwork
server.
Signed-off-by: David Decotigny <david.decotigny@google.com>
|
|
|
|
|
| |
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes following bug in 'list':
---8<---
# pwclient list -p uboot -w andreas.devel | grep New
Traceback (most recent call last):
File "/Users/andreas/bin/pwclient", line 463, in <module>
main()
File "/Users/andreas/bin/pwclient", line 411, in main
action_list(rpc, filt, submitter_str, delegate_str)
File "/Users/andreas/bin/pwclient", line 182, in action_list
(person['name'], person['email'])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in
position 32: ordinal not in range(128)
--->8---
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
If the xmlrpc server is using HTTPS, we need to adapt our custom
transport to use SafeTransport.make_connection
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Tested-by: Paul Mundt <lethal@linux-sh.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying `pwclient get` with a message containing UTF-8 characters you
would get the following error.
$ python -v pwclient get ID
[...]
# trying /usr/lib/python2.5/encodings/ascii.so
# trying /usr/lib/python2.5/encodings/asciimodule.so
# trying /usr/lib/python2.5/encodings/ascii.py
# /usr/lib/python2.5/encodings/ascii.pyc matches /usr/lib/python2.5/encodings/ascii.py
import encodings.ascii # precompiled from /usr/lib/python2.5/encodings/ascii.pyc
Failed to write to subject.patch
[...]
You can reproduce it with
$ pwclient get http://patchwork.openembedded.org/patch/1440/
and the fix is the same as in 4fc6a16910e595401e919abde28cca436193e0dd
by Mauro Carvalho Chehab.
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
patch_get_by_project_hash isn't in older xmlrpc interfaces, so
fall back to patch_get_by_hash if we see an xmlrpc fault when
calling this function.
Reported-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We may see the same hash for two patches if one is sent to two lists
tracked by patchwork.
This change adds a new xmlrpc method, patch_get_by_project_hash, which
adds the linkname parameter to the lookup. We need to add a new method
instead of replacing patch_get_by_hash, to avoid breaking existing
pwclient apps.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pwclient works fine viewing utf-8 messages, if you don't try to redirect stdout.
However, if you do things like pwclient view 5063 >/tmp/patch, it fails
due to the weird character handling logic in python:
Traceback (most recent call last):
File "/usr/local/bin/pwclient", line 446, in ?
main()
File "/usr/local/bin/pwclient", line 411, in main
print s
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 249: ordinal not in range(128)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was erroneously doing some string substitutions so that it
would find project names with an underscore in the name. It
was only necessary due to a side effect of a bug fixed in commit
35241d528c3699b982730a333e236d57dc6451b6 (find project by linkname,
not full name). In my test case, I had an underscore in the linkname,
but a dash in the full name.
No such string replacement is necessary, and actually breaks
filtering by projects with an underscore in the name now that
we're searching by linkname properly.
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|