comparison hgext/histedit.py @ 42072:fc0095256513

chistedit: properly show verbose diffs I'm not sure if that ever worked and it's an internal API breakage, but `"verbose": True` is not correctly parsed, as most of these options are parsed by diffopts, whereas verbose is a global option. Setting the UI to verbose instead does work and does show a verbose patch, with full commit message. It also shows all files, which unfortunately are a bit hard to read on a single line in the default verbose template. Thus, we also change the default template to use the status template, which shows one file per line as well as its modification state.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Thu, 04 Apr 2019 10:41:55 -0400
parents 15d2afa31e57
children 770e87999701
comparison
equal deleted inserted replaced
42071:db72f9f6580e 42072:fc0095256513
1227 win.addstr(y, x, line) 1227 win.addstr(y, x, line)
1228 1228
1229 def patchcontents(state): 1229 def patchcontents(state):
1230 repo = state['repo'] 1230 repo = state['repo']
1231 rule = state['rules'][state['pos']] 1231 rule = state['rules'][state['pos']]
1232 repo.ui.verbose = True
1232 displayer = logcmdutil.changesetdisplayer(repo.ui, repo, { 1233 displayer = logcmdutil.changesetdisplayer(repo.ui, repo, {
1233 'patch': True, 'verbose': True 1234 "patch": True, "template": "status"
1234 }, buffered=True) 1235 }, buffered=True)
1235 displayer.show(rule.ctx) 1236 displayer.show(rule.ctx)
1236 displayer.close() 1237 displayer.close()
1237 return displayer.hunk[rule.ctx.rev()].splitlines() 1238 return displayer.hunk[rule.ctx.rev()].splitlines()
1238 1239