Show More
@@ -405,18 +405,12 b' def newcommit(repo, phase, *args, **kwar' | |||||
405 | if phase is None: |
|
405 | if phase is None: | |
406 | if repo.ui.configbool('mq', 'secret', False): |
|
406 | if repo.ui.configbool('mq', 'secret', False): | |
407 | phase = phases.secret |
|
407 | phase = phases.secret | |
|
408 | overrides = {('ui', 'allowemptycommit'): True} | |||
408 | if phase is not None: |
|
409 | if phase is not None: | |
409 | phasebackup = repo.ui.backupconfig('phases', 'new-commit') |
|
410 | overrides[('phases', 'new-commit')] = phase | |
410 | allowemptybackup = repo.ui.backupconfig('ui', 'allowemptycommit') |
|
411 | with repo.ui.configoverride(overrides, 'mq'): | |
411 | try: |
|
|||
412 | if phase is not None: |
|
|||
413 | repo.ui.setconfig('phases', 'new-commit', phase, 'mq') |
|
|||
414 | repo.ui.setconfig('ui', 'allowemptycommit', True) |
|
412 | repo.ui.setconfig('ui', 'allowemptycommit', True) | |
415 | return repo.commit(*args, **kwargs) |
|
413 | return repo.commit(*args, **kwargs) | |
416 | finally: |
|
|||
417 | repo.ui.restoreconfig(allowemptybackup) |
|
|||
418 | if phase is not None: |
|
|||
419 | repo.ui.restoreconfig(phasebackup) |
|
|||
420 |
|
414 | |||
421 | class AbortNoCleanup(error.Abort): |
|
415 | class AbortNoCleanup(error.Abort): | |
422 | pass |
|
416 | pass |
General Comments 0
You need to be logged in to leave comments.
Login now