[PATCH] templates: Add click-to-copy patch ID ("mpe mode") to patch detail page
Similar to what we already do on the patch list page, display the patch ID on the patch detail page and make it a click-to-copy button. Closes: #115 ("Show copy-able patch ID ("mpe mode") on patch detail page") Signed-off-by: Andrew Donnellan--- patchwork/templates/patchwork/download_buttons.html | 4 1 file changed, 4 insertions(+) diff --git a/patchwork/templates/patchwork/download_buttons.html b/patchwork/templates/patchwork/download_buttons.html index 1322eed..4809db5 100644 --- a/patchwork/templates/patchwork/download_buttons.html +++ b/patchwork/templates/patchwork/download_buttons.html @@ -1,4 +1,8 @@ + + {{ submission.id }} + {% if submission.diff %} https://lists.ozlabs.org/listinfo/patchwork
Re: [PATCH v3 5/5] tools: Update to use 'hasher'
On Thu, Dec 01, 2016 at 09:46:52AM +, Stephen Finucane wrote: > The old 'parser' module used to extract diffs from their surrounding > mbox fluff before hashing this. Seeing as this was only used in the > context of an actual git repo, avoid all of that rigmarole by just using > 'git diff', which produces a plain diff, rather than 'git show'. > > Signed-off-by: Stephen Finucane> Cc: Paul Jakma > Cc: Tom Rini > --- > tools/patchwork-update-commits | 2 +- > tools/post-receive.hook| 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/patchwork-update-commits b/tools/patchwork-update-commits > index d0f63a9..61952c0 100755 > --- a/tools/patchwork-update-commits > +++ b/tools/patchwork-update-commits > @@ -29,6 +29,6 @@ fi > > git rev-list --reverse "$@" | > while read commit; do > -hash=$(git show "$commit" | python $pwpath/parser.py -#) > +hash=$(git diff "$commit~..$commit" | python $pwpath/hasher.py) > $pwpath/bin/pwclient update -s Accepted -c "$commit" -h "$hash" > done > diff --git a/tools/post-receive.hook b/tools/post-receive.hook > index a19e1b2..964 100755 > --- a/tools/post-receive.hook > +++ b/tools/post-receive.hook > @@ -38,7 +38,7 @@ trap "do_exit=1" INT > get_patchwork_hash() > { > local hash > -hash=$(git show -C $1 | python $PWDIR/parser.py --hash) > +hash=$(git diff "$1~..$1" | python $pwpath/hasher.py) copy/past error, it's PWDIR not pwpath in the hook. After fixing that and the other changes I mentioned: Tested-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
[PATCH] post-receive.hook: Handle failure to find patch number
When pwclient info -h fails to come up with the number for the change in question it will exit with a non-zero exit code. This failure will propagate upwards and exit the script there. Make our call to get_patch_id or in true so that our script here will see an empty id and we continue on with the list. Signed-off-by: Tom Rini--- tools/post-receive.hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/post-receive.hook b/tools/post-receive.hook index 42de90a3a7c2..e6b07ee9b9da 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -67,7 +67,7 @@ update_patches() { echo "E: failed to hash rev $rev." >&2 continue fi -id=$(get_patch_id $hash) +id=$(get_patch_id $hash || true) if [ -z "$id" ]; then echo "E: failed to find patch for rev $rev." >&2 continue -- 1.9.1 ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: [PATCH v3 3/5] hasher: Create hasher module
On Thu, Dec 01, 2016 at 09:46:50AM +, Stephen Finucane wrote: > This exposes the hashing functionality of Patchwork without requiring > Django or similar dependencies. > > Signed-off-by: Stephen Finucane> Cc: Paul Jakma > Cc: Tom Rini Tested-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: [PATCH v3 2/5] parser: Trivial rename of functions
On Thu, Dec 01, 2016 at 09:46:49AM +, Stephen Finucane wrote: > 'auto_delegate' doesn't actually delegate the patches - it merely finds > a suitable delegate based on the filename. Rename the function > accordingly. > > 'find_delegate' is also renamed to prevent confusion. > > Signed-off-by: Stephen Finucane> Cc: Paul Jakma > Cc: Tom Rini Tested-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: [PATCH v3 1/5] parser: Remove unused parameter
On Thu, Dec 01, 2016 at 09:46:48AM +, Stephen Finucane wrote: > The find_content function expected a 'project' parameter but never > actually used it. Remove it and clean up tests accordingly. > > Signed-off-by: Stephen Finucane> Cc: Paul Jakma > Cc: Tom Rini Tested-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: [5/5] tools: Update to use 'parsemail --hash'
On Thu, Dec 01, 2016 at 01:21:40PM +, Stephen Finucane wrote: > On Tue, 2016-11-29 at 18:53 -0500, Tom Rini wrote: > > On Fri, Nov 18, 2016 at 12:54:52AM +, Stephen Finucane wrote: > > > > > This replaces the older 'parser' main function. > > > > > > Signed-off-by: Stephen Finucane> > > Cc: Paul Jakma > > > > With this series on top of 2941d6f47fd242d53c52e966501fb09e2eb19473 I > > don't have success, but instead: > > Traceback (most recent call last): > > File "/home/trini/work/u-boot/patchwork/manage.py", line 11, in > > execute_from_command_line(sys.argv) > > File "/usr/lib/python2.7/dist- > > packages/django/core/management/__init__.py", line 399, in > > execute_from_command_line > > utility.execute() > > File "/usr/lib/python2.7/dist- > > packages/django/core/management/__init__.py", line 392, in execute > > self.fetch_command(subcommand).run_from_argv(self.argv) > > File "/usr/lib/python2.7/dist- > > packages/django/core/management/base.py", line 242, in run_from_argv > > self.execute(*args, **options.__dict__) > > File "/usr/lib/python2.7/dist- > > packages/django/core/management/base.py", line 285, in execute > > output = self.handle(*args, **options) > > File "/home/trini/work/u- > > boot/patchwork/patchwork/management/commands/parsemail.py", line 69, > > in > > handle > > infile = args[0] if args else > > options['infile'] KeyError: > > 'infile' > > > > And if I don't pass PW_PYTHON=python2: > > ./post-receive.hook: line 38: PW_PYTHON: unbound variable > > > > I also need to set DJANGO_SETTINGS_MODULE=patchwork.settings.dev > > because > > the default of 'production' assumes a bunch of other stuff has been > > setup and configured. > > > > A related tangent, as an end user I'm finding top of tree way way > > harder > > to get going with than v1.1.1. > > Does this relate to the script / hook functionality only, or are there > other usability issues you've seen in deploying 'master'? I'm just talking about the hook here, we use the ozlabs patchwork instance for patchwork on U-Boot. > > From the point of view of a script / > > hook that will be used very disconnected from the patchwork server it > > seems like things are taking a step backwards in terms of ease of > > use. > > I hear you: usage of this script on a different server from the one > that Patchwork is hosted from is a clear use case, but one I didn't > consider when writing v1 of this series. Hopefully v3 of this is more > to your liking. Let me know. Yes, this solved all of my concerns in that regard, I purged django from my system and was able to run the tools again. This is important because I don't want to install more stuff than is strictly required on the git server. Thanks! -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: [5/5] tools: Update to use 'parsemail --hash'
On Fri, Nov 18, 2016 at 12:54:52AM +, Stephen Finucane wrote: > This replaces the older 'parser' main function. > > Signed-off-by: Stephen Finucane> Cc: Paul Jakma With this series on top of 2941d6f47fd242d53c52e966501fb09e2eb19473 I don't have success, but instead: Traceback (most recent call last): File "/home/trini/work/u-boot/patchwork/manage.py", line 11, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute output = self.handle(*args, **options) File "/home/trini/work/u-boot/patchwork/patchwork/management/commands/parsemail.py", line 69, in handle infile = args[0] if args else options['infile'] KeyError: 'infile' And if I don't pass PW_PYTHON=python2: ./post-receive.hook: line 38: PW_PYTHON: unbound variable I also need to set DJANGO_SETTINGS_MODULE=patchwork.settings.dev because the default of 'production' assumes a bunch of other stuff has been setup and configured. A related tangent, as an end user I'm finding top of tree way way harder to get going with than v1.1.1. From the point of view of a script / hook that will be used very disconnected from the patchwork server it seems like things are taking a step backwards in terms of ease of use. Thanks and happy to help test things more! -- Tom signature.asc Description: Digital signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: Patchwork v2.0.0 Available
David Millerwrites: > From: Michael Ellerman > Date: Mon, 28 Aug 2017 20:12:49 +1000 > >> Jeremy Kerr writes: >> >>> Hi all, >>> Just an update: the database migration for v2.0.0 is taking a *long* time, so we'll be out for more than that one hour. I'll get things back up and running as soon as possible, but we're dependent on this migration completing first. >>> >>> OK, we're back up now. Please let me know if anything looks amiss. >> >> Thanks jk. >> >> The series support and the clickable patch ids are big time savers for >> me. :beers: > > Agreed. > > Why not take the series support a step further? Make it like a > virtual bundle, have the "download mbox" button and everything else > there as well. > > As it is designed now, I still have to create a dummy bundle just to > get that mbox file for applying the patches. > > You should be able to eliminate that step entirely. I should be able > to do everything I can do from a bundle page, from the series page. > > Once something like that is in place, I'll be using bundles very > infrequently. Because capturing a patch series was my primary use for > them. I think there exists a way to do this. Something like you ask (a series mbox) exists: http://patchwork.ozlabs.org/series//mbox For example, get all 7 patches of the linuxppc-dev 'Add RSS to DPAA 1.x Ethernet driver' series at: http://patchwork.ozlabs.org/series/21/mbox You can find the series url with any patch (for example, in the linked series, I clicked on the first patch at http://patchwork.ozlabs.org/patch/806240/ and in the 3 boxes in the righthand corner saw |diff|mbox|series| - the |series| box will show the URL). There's also a project for interacting with pw called git-pw (http://github.com/getpatchwork/git-pw) and it can be used to download and apply all the patches in a series. As an example: $ git pw \ --server http://patchwork.ozlabs.org/ \ --project netdev --username myusername \ --password mypassword \ series show 21 +++ | Property | Value | |+| | ID | 21 | | Date | 2017-08-27T13:13:36 | | Name | Add RSS to DPAA 1.x Ethernet driver | | Submitter | Madalin Bucur (madalin.bu...@nxp.com) | | Project| Linux PPC development | | Version| 4 | | Received | 7 of 7 | | Complete | True | | Cover | 806235 [v4,0/7] Add RSS to DPAA 1.x Ethernet driver | | Patches| 806240 [v4,1/7] fsl/fman: move struct fman to header file | || 806242 [v4,2/7] fsl/fman: enable FMan Keygen | || 806241 [v4,3/7] dpaa_eth: use multiple Rx frame queues | || 806243 [v4,4/7] dpaa_eth: enable Rx hashing control | || 806244 [v4,5/7] dpaa_eth: add NETIF_F_RXHASH | || 806245 [v4,6/7] Documentation: networking: add RSS information | || 806246 [v4,7/7] dpaa_eth: check allocation result | +++ $ git pw \ --server http://patchwork.ozlabs.org/ \ --project netdev --username myusername \ --password mypassword \ series apply 21 Applying: fsl/fman: move struct fman to header file Applying: fsl/fman: enable FMan Keygen Applying: dpaa_eth: use multiple Rx frame queues Applying: dpaa_eth: enable Rx hashing control Applying: dpaa_eth: add NETIF_F_RXHASH Applying: Documentation: networking: add RSS information Applying: dpaa_eth: check allocation result Hopefully I didn't misunderstand the question. ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork