Closed
Bug 1135625
Opened 10 years ago
Closed 10 years ago
bzexport fails to obsolete a previous version of the patch being attached
Categories
(Developer Services :: Mercurial: bzexport, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1033394
People
(Reporter: jfkthame, Unassigned)
Details
I've had several cases in the past few days where I've used bzexport to upload a newer version of a previously-exported patch that had been attached and marked for review, and the operation has ended with an error message as below:
$ hg bzexport --no-take-bug -c "This is the version of the test I really meant to attach; and the correct try run is https://tbpl.mozilla.org/?tree=Try&rev=6c37a39541ca. Sorry about the churn." -r :xidorn ruby-justify-test
Requesting review from quanxunzhen@gmail.com
ruby-justify-test uploaded as https://bugzilla.mozilla.org/attachment.cgi?id=8567883&action=edit
Error: There is no flag with the id '1105779'.
abort: Could not update attachment 8567875 [details] [diff] [review]: HTTP Error 400: Bad Request
Note that the new patch *WAS* successfully uploaded and marked for review; the failure only relates to obsoleting the older version of the patch. I had to manually mark the old patch obsolete, once I realized what had happened here.
This has worked for me in the past; I'm not sure when it started failing, but it's been at least a few days.
Comment 1•10 years ago
|
||
Are you using mq? Can you provide STR with local Mercurial commands?
If you are feeling adventurous, you can have a go at creating a test. See https://hg.mozilla.org/hgcustom/version-control-tools/file/b466c86050b5/hgext/bzexport/tests/test-patch-create.t for inspiration.
Flags: needinfo?(jfkthame)
Reporter | ||
Comment 2•10 years ago
|
||
Yes, I'm using mq.
I'm not sure I understand what STR you're looking for; I expect I could probably reproduce this by updating a patch on b.m.o again, but I'm reluctant to cause bugzilla churn. The sequence that gave me this error earlier today was:
(1) Create a patch in mq; set commit message (including bug number) with hg qref:
$ hg qref -m "Bug 1135361 - Reftest for ruby positioning in justified vertical text."
(2) Export and mark for review:
$ hg bzexport --no-take-bug -r :xidorn ruby-justify-test
(3) Edit files, qrefresh the patch, qpop and qpush various patches, qref again...
(4) Export patch again to replace the previously-uploaded version:
$ hg bzexport --no-take-bug -c "This is the version of the test I really meant to attach; and the correct try run is https://tbpl.mozilla.org/?tree=Try&rev=6c37a39541ca. Sorry about the churn." -r :xidorn ruby-justify-test
And that's what failed, as per comment 0.
Flags: needinfo?(jfkthame)
Comment 3•10 years ago
|
||
You have an out of date bzexport.
The legacy bzapi server (which your version of bzexport is using) now redirects to the new bzapi compatibility layer, and this shim has a bug (bug 1105433). Newer bzexport works around this problem by switching to the native REST API instead of bzapi.
Use |mach mercurial-setup| to keep your extensions up to date - or manually update the version-control-tools checkout :-)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Comment 4•10 years ago
|
||
(In reply to Ed Morley [:edmorley] from comment #3)
> The legacy bzapi server (which your version of bzexport is using) now
> redirects to the new bzapi compatibility layer
(The work for this occurred in bug 1098342, and the switch was made ~2 weeks ago)
You need to log in
before you can comment on or make changes to this bug.
Description
•