Closed Bug 1517643 Opened 5 years ago Closed 5 years ago

[bzexport] context lines have wrong override order

Categories

(Developer Services :: Mercurial: bzexport, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

It looks like `[diff] context` is currently winning over the more-specific `[bzexport] unified` setting. Waldo is getting 3 lines of context when exporting patches despite having [bzexport] unified = 8.
The logic is weird. The 'context' setting is retrieved from 'unified'. But the ordering was indeed backwards. This appears to fix it.

I'm not sure whether this will fix Waldo's problem, since mq patch files are uploaded unmodified.
Attachment #9034311 - Flags: review?(cmanchester)
Over in bug 1517674 I have tested this patch out to upload attachment 9034334 [details] [diff] [review], and it does the trick.  My .hgrc is *mostly* https://gist.github.com/jswalden/7d6a9c17fb0f9c48080c4496d291eb8d -- my real .hgrc has some bzapi stuffs in it that I removed here, natch -- and it has [diff] unified = 3 in it but also [bzexport] unified = 8 that appears to successfully override it.

(I suppose I ought have changed that to 9 or something, to verify the setting is being picked up and not the 8-fallback this patch establishes, but hey, I can't test-run everything.  :-) )
Comment on attachment 9034311 [details] [diff] [review]
[bzexport] unified should win over [diff] context

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

This looks like a straightforward change but it's pretty far outside my usual area to review. Connor are you willing to take a look?
Attachment #9034311 - Flags: review?(cmanchester) → review?(sheehan)
Comment on attachment 9034311 [details] [diff] [review]
[bzexport] unified should win over [diff] context

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

LGTM.
Attachment #9034311 - Flags: review?(sheehan) → review+

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/895996b39668
[bzexport] unified should win over [diff] context

Status: ASSIGNED → RESOLVED
Closed: 5 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: