Skip to contentSkip to conversation

A way to change the status of the whole series on Patchwork ?

U-Boot Masahiro Yamada 5 participants 16 messages Jul 17, 2014 – Jul 24, 2014

lore
Share & tools
lore
#0 lore raw

Hi.

When I change the status of patches,
I always do it one by one.

But it is painful if the series consists
of a bunch of patches.

Does Patchwork have any good way to change the status of the whole series?

Best Regards
Masahiro Yamada

#1 lore raw
Quoted 8 lines · Masahiro Yamada

When I change the status of patches,
I always do it one by one.

But it is painful if the series consists
of a bunch of patches.

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

#2 lore raw

Hi Brian,
(Sorry for my late reply.)

Quoted 7 lines · On Wed, 16 Jul 2014 19:49:09 -0700 Brian Norris <[email protected]>…
Quoted 6 lines · Masahiro Yamada

When I change the status of patches,
I always do it one by one.

But it is painful if the series consists
of a bunch of patches.

Quoted 8 lines
Quoted 2 lines

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

From the web interface, you can also select multiple patch checkboxes, then use the "Change state" drop down at the bottom of the page.

Thanks for your advice.
I am trying the web interface and I see multiple checkboxes at the left-hand side of the page. But I don't see any "Change state" drop down at the bottom.

(Instead, I see "Bundling" stuff such as "Create bundle" and "Add to bundle" boxes at the bottom of the page.)

What is missing from my operation?

Thanks

Best Regards
Masahiro Yamada

#3 lore raw
Quoted 12 lines · Masahiro Yamada
Quoted 9 lines · On Wed, 16 Jul 2014 19:49:09 -0700 Brian Norris <[email protected]>…
Quoted 2 lines · Masahiro Yamada

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

From the web interface, you can also select multiple patch checkboxes, then use the "Change state" drop down at the bottom of the page.

Quoted 6 lines

Thanks for your advice.
I am trying the web interface and I see multiple checkboxes at the left-hand side of the page. But I don't see any "Change state" drop down at the bottom.

(Instead, I see "Bundling" stuff such as "Create bundle" and "Add to bundle" boxes at the bottom of the page.)

I see "Bundling" too, but I also have a similar box labeled "Properties" on my view. Notably, I only see the "Properties" (with "Change State", "Delegate to" and "Archive" drop-downs) on linux-mtd [1] for which I'm a maintainer. But I don't see it on uboot [2], for which I'm not a maintainer.

My best guess is that some functions are reserved for project maintainers, and the web interface only gives access to maintainers (I believe non-maintainers are typically given permission to change the status of their own patches, but this portion of the UI may have been overlooked). Maybe Jeremy knows better.

Regards,
Brian

[1] http://patchwork.ozlabs.org/project/linux-mtd/list/
[2] http://patchwork.ozlabs.org/project/uboot/list/

#5 lore raw
In reply to Brian Norris
Quoted 4 lines · Brian Norris
Quoted 3 lines · Masahiro Yamada

When I change the status of patches,
I always do it one by one.

Quoted 8 lines
Quoted 5 lines

But it is painful if the series consists
of a bunch of patches.

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

Oooh, can you share? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140722/2e027127/attachment.pgp>
#6 lore raw
Quoted 9 lines · Tom Rini
Quoted 6 lines · Brian Norris
Quoted 2 lines · Masahiro Yamada

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

Oooh, can you share? Thanks!

It's kind of an ugly patchwork (pun!) of Python, shell, etc., so it's not beautiful to share. But the core of it is that I pipe an email to a Python script to extract the Message-ID, then pipe that to pwclient for tasks. Note that the patch "hash" [1] is severely unreliable [2], since it's easy to have collisions; this left me with using e-mail Message-ID, which is much more likely to be unique.

The Python tidbit simplifies to this:

import sys
from email import message_from_file print message_from_file(sys.stdin)['Message-Id']

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

After which you can do your magic with:

pwclient <action> <patchwork ID>

Unfortunately, this is two round trips to the patchwork server, but that's the best I have for now.

My .muttrc has bindings like this:

set pipe_split=yes
macro index,pager A "<pipe-message>~/scripts/mutt-patchwork-apply<enter>" macro index,pager S "<pipe-message>~/scripts/mutt-patchwork-status<enter>" macro index,pager I "<pipe-message>~/scripts/mutt-patchwork-info<enter>"

HTH.

Brian

[1] patchwork.git has a parser script (apps/patchwork/parser.py), which can give you the patchwork patch hash:

parser.py --hash

[2] I note the problem with hash collisions here, but I didn't get any

    response:

      https://lists.ozlabs.org/pipermail/patchwork/2014-May/001019.html
#4 lore raw
In reply to Brian Norris

Hi Brian,

Quoted 17 lines · On Mon, 21 Jul 2014 19:52:22 -0700 Brian Norris <[email protected]>…
Quoted 16 lines · Masahiro Yamada
Quoted 9 lines · On Wed, 16 Jul 2014 19:49:09 -0700 Brian Norris <[email protected]>…
Quoted 2 lines · Masahiro Yamada

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

From the web interface, you can also select multiple patch checkboxes, then use the "Change state" drop down at the bottom of the page.

Thanks for your advice.
I am trying the web interface and I see multiple checkboxes at the left-hand side of the page. But I don't see any "Change state" drop down at the bottom.

Quoted 8 lines
Quoted 2 lines

(Instead, I see "Bundling" stuff such as "Create bundle" and "Add to bundle" boxes at the bottom of the page.)

I see "Bundling" too, but I also have a similar box labeled "Properties" on my view. Notably, I only see the "Properties" (with "Change State", "Delegate to" and "Archive" drop-downs) on linux-mtd [1] for which I'm a maintainer. But I don't see it on uboot [2], for which I'm not a maintainer.

I am not a maintainer of any projects.
That's why I cannot see "Change State" drop down.

I will try another choice, pwclient.

Thanks,

Masahiro Yamada

#7 lore raw
In reply to Brian Norris
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

Investigating a bit more it seems like only filter by delegate which is broken.

Ian.

#15 lore raw
In reply to Brian Norris

Hi Brian, Jeremy,

Quoted 4 lines · On Wed, 16 Jul 2014 19:49:09 -0700 Brian Norris <[email protected]>…
Quoted 3 lines · Masahiro Yamada

When I change the status of patches,
I always do it one by one.

Quoted 8 lines
Quoted 5 lines

But it is painful if the series consists
of a bunch of patches.

Does Patchwork have any good way to change the status of the whole series?

You can use pwclient via scripts. (I wrote my own hooks for mutt so I can do quicker management straight from my mailbox.)

I tried pwclient.

It worked fine from home.

But it is not working at the office which is behind proxy.

Does pwclient support the access thru proxy?

Best Regards
Masahiro Yamada

#8 lore raw
In reply to Ian Campbell
Quoted 8 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use?

I was using the version from about a month ago (before the .pwclientrc changes), pulled from ozlabs.org. It matches the client from patchwork.git commit 5ccc2d9900f691ac6e3000836d052f60e0d1e726.

Quoted 2 lines

The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m.

I just tried it. It worked for me...

No comment on the other compatibility questions. I'm aware of the .pwclientrc / pwclient changes, but I haven't noticed them affect my work (after converting my .pwclientrc). I don't use 'delegate' though.

Regards,
Brian

#10 lore raw
In reply to Ian Campbell

Dear Ian Campell,

Quoted 20 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Quoted 2 lines

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

this is a known bug. No one cared about it for a year or so:
http://thread.gmane.org/gmane.comp.version-control.patchwork/706

Best regards

Andreas Bie?mann

#9 lore raw
In reply to Brian Norris
Quoted 10 lines · Brian Norris
Quoted 8 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use?

Quoted 8 lines

I was using the version from about a month ago (before the .pwclientrc changes), pulled from ozlabs.org. It matches the client from patchwork.git commit 5ccc2d9900f691ac6e3000836d052f60e0d1e726.

Quoted 2 lines

The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m.

I just tried it. It worked for me...

And I can now see the support is there where I was sure it wasn't before. I think I must have been confused about where the binary I was looking at came from. Or its been recently updated -- but more likely I'm confused ;-)

Ian.

#11 lore raw
In reply to Andreas Bießmann
Quoted 23 lines · Andreas Bie?mann

Dear Ian Campell,

Quoted 20 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Quoted 5 lines
Quoted 2 lines

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

this is a known bug. No one cared about it for a year or so:
http://thread.gmane.org/gmane.comp.version-control.patchwork/706

Got it, thanks, I just won't use that feature then!

Ian.

#12 lore raw

Dear Ian Campell,

Quoted 24 lines · Ian Campbell
Quoted 23 lines · Andreas Bie?mann

Dear Ian Campell,

Quoted 20 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

this is a known bug. No one cared about it for a year or so:
http://thread.gmane.org/gmane.comp.version-control.patchwork/706

Got it, thanks, I just won't use that feature then!

well, I use it rarely. Until Jeremy provides a fix in the RPC API I use this hack on my side:

---8<---

apps/patchwork/bin/pwclient +0 -0
index dfbea30..5db29ff 100755
@@ -192,6 +192,13 @@ def action_list(rpc, filter, submitter_str,

delegate_str):

         return

     if delegate_str != "":
+        if delegate_str == "me":
+            print "Patches delegated to me:"
+            f = filter
+            f.add("delegate_id", 6342)
+            patches = rpc.patch_list(f.d)
+            list_patches(patches)
+            return
         ids = person_ids_by_name(rpc, delegate_str)
         if len(ids) == 0:
             sys.stderr.write("Note: Nobody found matching *%s*\n" % \

--->8---

The delegate_id is extracted from the web UI, The delegate drop-down box contains it.

Best regards

Andreas Bie?mann

#14 lore raw
In reply to Ian Campbell
Quoted 24 lines · Ian Campbell
Quoted 23 lines · Andreas Bie?mann

Dear Ian Campell,

Quoted 20 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

this is a known bug. No one cared about it for a year or so:
http://thread.gmane.org/gmane.comp.version-control.patchwork/706

Got it, thanks, I just won't use that feature then!

FWIW I made a local bodge. Here it is in case anyone wants to use it:

In action list under 'if delegate_str != "":'

if delegate_str == "ME":
f = filter
f.add("delegate_id", "54431")
patches = rpc.patch_list(f.d)
list_patches(patches)
return

Now "pwclient -d ME" does what I need.

Substitute your own ID of course (I got mine from "pwclient info" on a patch which is delegated to me).

Ian.

#13 lore raw
In reply to Andreas Bießmann
Quoted 30 lines · Andreas Bie?mann

Dear Ian Campell,

Quoted 27 lines · Ian Campbell
Quoted 26 lines · Andreas Bie?mann

Dear Ian Campell,

Quoted 22 lines · Ian Campbell
Quoted 4 lines · Brian Norris

Then some sort of grepping/regex/etc. can get you the patchwork ID from the Message-ID. e.g.:

pwclient list -m "$MESSAGEID" | awk '{print $1;}' | grep '[0-9][0-9]*'

Which version of pwclient do you use? The one from
http://patchwork.ozlabs.org/help/pwclient/ doesn't support -m. It's also incompatible with the example .pwclientrc from
http://patchwork.ozlabs.org/project/uboot/pwclientrc/

I did find an updated one (not sure where from now) which understands the newer pwclientrc syntax and seems to know the -m but neither of them seem to work fully. e.ge list -d doesn't work so
pwclient list -d 'Ian Campbell'
returns an empty list for each of the 3 email addresses of mine it seems to know about, despite me currently having 3 patches delegated (including 371710 for example).

Things like "pwclient list -p uboot -s New" do work though, and includes the patches which are delegated to me in the list.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

this is a known bug. No one cared about it for a year or so:
http://thread.gmane.org/gmane.comp.version-control.patchwork/706

Got it, thanks, I just won't use that feature then!

well, I use it rarely. Until Jeremy provides a fix in the RPC API I use this hack on my side:

Great minds think alike -- I just posted the exact same thing!