bzexport cannot update commit message of checkout ancestors

RESOLVED FIXED

Status

Developer Services
Mercurial: bzexport
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: sfink, Assigned: sfink)

Tracking

Details

Attachments

(2 attachments)

(Assignee)

Description

5 months ago
Now that I've stopped mq from trying to do this (and mangling things in the process), I'd like to make it so that non-mq bzexport users can do this for real.
(Assignee)

Comment 1

5 months ago
Created attachment 8872773 [details] [diff] [review]
Allow bzexport to update patch descriptions in ancestors of the working directory

Make bzexport[non-mq] > bzexport[mq]

In talking to the people on #mercurial, it appears that a better approach would be to use evolve's metaedit command. Or copy its guts if I don't want to depend on evolve, which I don't, really.
Attachment #8872773 - Flags: review?(gps)
Comment on attachment 8872773 [details] [diff] [review]
Allow bzexport to update patch descriptions in ancestors of the working directory

Review of attachment 8872773 [details] [diff] [review]:
-----------------------------------------------------------------

I like the intent, but not the use of histedit because it is brittle.

Fortunately for you, we have a generic API for doing history rewriting like this. See pylib/mozhg/mozhg/rewrite.py. Look for usage of replacechangesets() in hgext/reviewboard/client.py and basically copy the code. There is a similar example in autoland/hgext/rewritecommitdescriptions.py if you need another example.
Attachment #8872773 - Flags: review?(gps) → review-
(Assignee)

Comment 3

5 months ago
Created attachment 8874030 [details] [diff] [review]
Allow bzexport to update patch descriptions in ancestors of the working directory

Ok, I have a feeling I'm probably going back and forth between node representations unnecessarily here, but this seems to work.
Attachment #8874030 - Flags: review?(gps)
Comment on attachment 8874030 [details] [diff] [review]
Allow bzexport to update patch descriptions in ancestors of the working directory

Review of attachment 8874030 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #8874030 - Flags: review?(gps) → review+

Comment 5

4 months ago
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/60e61aba1415
Allow bzexport to update patch descriptions in ancestors of the working directory, r=gps
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.