getpatchwork / pwclient

The command-line client for the patchwork patch tracking tool
GNU General Public License v2.0
49 stars 22 forks source link

I can't round-trip a hash/patchid #28

Open rossburton opened 1 year ago

rossburton commented 1 year ago

I appear to be unable to correctly round-trip a patch ID to hash and back again.

Using this patchwork server: https://patchwork.yoctoproject.org/project/oe-core/ and this fragment in my .pwclientrc:

[options]
default = oe-core

[oe-core]
backend = rest
url = https://patchwork.yoctoproject.org/api
token = xxx

I can request the info for a specific patch ID:

$ pwclient info 34317
Information for patch id 34317
------------------------------
- archived      : False
- commit_ref    :
- date          : 2023-11-11T18:44:32
- delegate      :
- delegate_id   :
- filename      :
- hash          : 732e487978cd2af56aaad959cae1a772448ddfed
- id            : 34317
- msgid         : <20231111184432.752939-1-raj.khem@gmail.com>
- name          : libsoup: Upgrade to 3.4.2 -> 3.4.4
- project       : OpenEmbedded Core Layer
- project_id    : 6
- state         : new
- state_id      :
- submitter     : Khem Raj <raj.khem@gmail.com>
- submitter_id  : 10

But if I try and look up the hash:

$ pwclient info -h 732e487978cd2af56aaad959cae1a772448ddfed
No patch has the hash provided

It's the enforced project argument which is causing this, and I can't figure out what project it's expecting. Neither oe-core, 6, or OpenEmbedded Core Layer are accepted, but if I delete the project argument from the API call entirely then the call succeeds.

I suspect I'm missing something obvious?

rossburton commented 1 year ago

Note that pwclient list does work:

$ pwclient list -H 732e487978cd2af56aaad959cae1a772448ddfed
ID      State        Name
--      -----        ----
33286   new          [AUH] libsoup: upgrading to 3.4.4 SUCCEEDED
34317   new          libsoup: Upgrade to 3.4.2 -> 3.4.4