Skip to content
Snippets Groups Projects
Commit f255b1811f5e authored by Jun Wu's avatar Jun Wu
Browse files

rebase: get rid of ui.backupconfig

parent 03d99d08147b
No related branches found
No related tags found
No related merge requests found
......@@ -851,10 +851,9 @@
if extrafn:
extrafn(ctx, extra)
backup = repo.ui.backupconfig('phases', 'new-commit')
try:
targetphase = max(ctx.phase(), phases.draft)
repo.ui.setconfig('phases', 'new-commit', targetphase, 'rebase')
targetphase = max(ctx.phase(), phases.draft)
overrides = {('phases', 'new-commit'): targetphase}
with repo.ui.configoverride(overrides, 'rebase'):
if keepbranch:
repo.ui.setconfig('ui', 'allowemptycommit', True)
# Commit might fail if unresolved files exist
......@@ -862,8 +861,6 @@
date = ctx.date()
newnode = repo.commit(text=commitmsg, user=ctx.user(),
date=date, extra=extra, editor=editor)
finally:
repo.ui.restoreconfig(backup)
repo.dirstate.setbranch(repo[newnode].branch())
dsguard.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment