Skip to content

Instantly share code, notes, and snippets.

@hotsphink
Created January 3, 2019 23:46
Show Gist options
  • Select an option

  • Save hotsphink/b056e82e827c3a47868227908464b0d9 to your computer and use it in GitHub Desktop.

Select an option

Save hotsphink/b056e82e827c3a47868227908464b0d9 to your computer and use it in GitHub Desktop.
mkgist-created gist
# HG changeset patch
# User Steve Fink <[email protected]>
# Date 1546559178 28800
# Thu Jan 03 15:46:18 2019 -0800
# Node ID efa0c0b415d5fd8dc86c35efe11cfc53d0904be8
# Parent 8b913817327a33e9a55513d47f9ed00cb2a5b812
[bzexport] unified should win over [diff] context
diff --git a/hgext/bzexport/__init__.py b/hgext/bzexport/__init__.py
--- a/hgext/bzexport/__init__.py
+++ b/hgext/bzexport/__init__.py
@@ -1085,23 +1085,26 @@ def bzexport(ui, repo, *args, **opts):
rev, bug = infer_arguments(ui, repo, args, opts)
if not opts['new']:
for o in ('cc', 'depends', 'blocks'):
if opts[o]:
ui.write("Warning: ignoring --%s option when not creating a bug\n" % o)
contents = StringIO()
- o = {
- 'context': ui.configint("bzexport", "unified", 8),
+ import pdb; pdb.set_trace()
+ o = opts.copy()
+ o.update({
+ 'unified': ui.configint("bzexport", "unified", None),
'showfunc': ui.configbool("bzexport", "showfunc", True),
'git': ui.configbool("bzexport", "git", True),
- }
- o.update(opts)
+ })
diffopts = patch.diffopts(ui, o)
+ if diffopts.context is None:
+ diffopts.context = 8
description_from_patch = None
revs = scmutil.revrange(repo, [rev])
if revs:
ctx = repo[revs.last()]
description_from_patch = encoding.tolocal(ctx.description())
if hasattr(cmdutil, "export"):
# TRACKING hg46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment