Show More
@@ -502,16 +502,12 b' def commitfuncfor(repo, src):' | |||||
502 | """ |
|
502 | """ | |
503 | phasemin = src.phase() |
|
503 | phasemin = src.phase() | |
504 | def commitfunc(**kwargs): |
|
504 | def commitfunc(**kwargs): | |
505 | phasebackup = repo.ui.backupconfig('phases', 'new-commit') |
|
505 | overrides = {('phases', 'new-commit'): phasemin} | |
506 | try: |
|
506 | with repo.ui.configoverride(overrides, 'histedit'): | |
507 | repo.ui.setconfig('phases', 'new-commit', phasemin, |
|
|||
508 | 'histedit') |
|
|||
509 | extra = kwargs.get('extra', {}).copy() |
|
507 | extra = kwargs.get('extra', {}).copy() | |
510 | extra['histedit_source'] = src.hex() |
|
508 | extra['histedit_source'] = src.hex() | |
511 | kwargs['extra'] = extra |
|
509 | kwargs['extra'] = extra | |
512 | return repo.commit(**kwargs) |
|
510 | return repo.commit(**kwargs) | |
513 | finally: |
|
|||
514 | repo.ui.restoreconfig(phasebackup) |
|
|||
515 | return commitfunc |
|
511 | return commitfunc | |
516 |
|
512 | |||
517 | def applychanges(ui, repo, ctx, opts): |
|
513 | def applychanges(ui, repo, ctx, opts): | |
@@ -762,14 +758,11 b' class fold(histeditaction):' | |||||
762 | # here. This is sufficient to solve issue3681 anyway. |
|
758 | # here. This is sufficient to solve issue3681 anyway. | |
763 | extra['histedit_source'] = '%s,%s' % (ctx.hex(), oldctx.hex()) |
|
759 | extra['histedit_source'] = '%s,%s' % (ctx.hex(), oldctx.hex()) | |
764 | commitopts['extra'] = extra |
|
760 | commitopts['extra'] = extra | |
765 | phasebackup = repo.ui.backupconfig('phases', 'new-commit') |
|
761 | phasemin = max(ctx.phase(), oldctx.phase()) | |
766 | try: |
|
762 | overrides = {('phases', 'new-commit'): phasemin} | |
767 | phasemin = max(ctx.phase(), oldctx.phase()) |
|
763 | with repo.ui.configoverride(overrides, 'histedit'): | |
768 | repo.ui.setconfig('phases', 'new-commit', phasemin, 'histedit') |
|
|||
769 | n = collapse(repo, ctx, repo[newnode], commitopts, |
|
764 | n = collapse(repo, ctx, repo[newnode], commitopts, | |
770 | skipprompt=self.skipprompt()) |
|
765 | skipprompt=self.skipprompt()) | |
771 | finally: |
|
|||
772 | repo.ui.restoreconfig(phasebackup) |
|
|||
773 | if n is None: |
|
766 | if n is None: | |
774 | return ctx, [] |
|
767 | return ctx, [] | |
775 | repo.ui.pushbuffer() |
|
768 | repo.ui.pushbuffer() |
General Comments 0
You need to be logged in to leave comments.
Login now