Closed Bug 991862 Opened 10 years ago Closed 4 years ago

Allow exporting unapplied patches

Categories

(Developer Services :: Mercurial: bzexport, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/835] )

Attachments

(1 file, 1 obsolete file)

I found myself wanting to bzexport an unapplied (and unappliable) patch. It was heavily bitrotten, but I wanted to upload it into a new bug to record it for whenever I (or perhaps a mentee) next get around to it.
This does end up changing the existing bug/revision inference logic a bit.
Attachment #8401503 - Flags: review?(emorley)
Comment on attachment 8401503 [details] [diff] [review]
Allow exporting unapplied patches

Unfortunately this doesn't seem to apply cleanly against version-control-tools tip, I don't suppose you would mind rebasing so I can test it out?

applying bug-991862-unapplied
patching file hgext/bzexport/__init__.py
Hunk #2 FAILED at 808
1 out of 3 hunks FAILED -- saving rejects to file hgext/bzexport/__init__.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh bug-991862-unapplied
Attachment #8401503 - Flags: review?(emorley)
Comment on attachment 8401503 [details] [diff] [review]
Allow exporting unapplied patches

Ah, sorry. I have an |hg pushed| command that does much of the same things as mcmerge does, and it touches a lot of code. I'll reshuffle my queue.
I was wrong. The conflicts had nothing to do with the additional command. I had to rebase over a bunch of other stuff. Maybe it was a restyling commit? Dunno.
Attachment #8403063 - Flags: review?(emorley)
Attachment #8401503 - Attachment is obsolete: true
Comment on attachment 8403063 [details] [diff] [review]
Allow exporting unapplied patches

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

Looks good - the only thing that needs updating is:

        # Failing that try looking in the commit description for a bug number,
        # since orig_desc could have come from the command line instead.
        if not desc_bug_number:
            commit_firstline = repo[rev].description().decode('utf-8').split('\n', 1)[0]

-> this should now use the first line from description_from_patch, since the current patch won't find a bug number if opts['description'] is set but with no bug. This also fixes the duplication that was already present & I'd been wanting to fix anyway :-)

(In reply to Steve Fink [:sfink] from comment #4)
> I was wrong. The conflicts had nothing to do with the additional command. I
> had to rebase over a bunch of other stuff. Maybe it was a restyling commit?

It was the fix for bug 978034 afaict :-)
Attachment #8403063 - Flags: review?(emorley) → review+
Product: Other Applications → Developer Services
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/100]
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/100] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/835] [kanban:engops:https://kanbanize.com/ctrl_board/6/100]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/835] [kanban:engops:https://kanbanize.com/ctrl_board/6/100] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/835]

I think this may have landed. But I have since removed mq support from bzexport, so this bug is no longer valid anyway.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: