Show More
@@ -874,5 +874,5 b' def summaryhook(ui, repo):' | |||
|
874 | 874 | def extsetup(ui): |
|
875 | 875 | cmdutil.summaryhooks.add('histedit', summaryhook) |
|
876 | 876 | cmdutil.unfinishedstates.append( |
|
877 | ['histedit-state', False, _('histedit in progress'), | |
|
877 | ['histedit-state', False, True, _('histedit in progress'), | |
|
878 | 878 | _("use 'hg histedit --continue' or 'hg histedit --abort'")]) |
@@ -800,5 +800,5 b' def uisetup(ui):' | |||
|
800 | 800 | _("specify merge tool for rebase"))) |
|
801 | 801 | cmdutil.summaryhooks.add('rebase', summaryhook) |
|
802 | 802 | cmdutil.unfinishedstates.append( |
|
803 | ['rebasestate', False, _('rebase in progress'), | |
|
803 | ['rebasestate', False, False, _('rebase in progress'), | |
|
804 | 804 | _("use 'hg rebase --continue' or 'hg rebase --abort'")]) |
@@ -685,7 +685,7 b' def extsetup(ui):' | |||
|
685 | 685 | revset.symbols['transplanted'] = revsettransplanted |
|
686 | 686 | templatekw.keywords['transplanted'] = kwtransplanted |
|
687 | 687 | cmdutil.unfinishedstates.append( |
|
688 | ['series', True, _('transplant in progress'), | |
|
688 | ['series', True, False, _('transplant in progress'), | |
|
689 | 689 | _("use 'hg transplant --continue' or 'hg update' to abort")]) |
|
690 | 690 | |
|
691 | 691 | # tell hggettext to extract docstrings from these functions: |
@@ -2107,20 +2107,22 b' summaryhooks = util.hooks()' | |||
|
2107 | 2107 | # A list of state files kept by multistep operations like graft. |
|
2108 | 2108 | # Since graft cannot be aborted, it is considered 'clearable' by update. |
|
2109 | 2109 | # note: bisect is intentionally excluded |
|
2110 | # (state file, clearable, error, hint) | |
|
2110 | # (state file, clearable, allowcommit, error, hint) | |
|
2111 | 2111 | unfinishedstates = [ |
|
2112 | ('graftstate', True, _('graft in progress'), | |
|
2112 | ('graftstate', True, False, _('graft in progress'), | |
|
2113 | 2113 | _("use 'hg graft --continue' or 'hg update' to abort")), |
|
2114 | ('updatestate', True, _('last update was interrupted'), | |
|
2114 | ('updatestate', True, False, _('last update was interrupted'), | |
|
2115 | 2115 | _("use 'hg update' to get a consistent checkout")) |
|
2116 | 2116 | ] |
|
2117 | 2117 | |
|
2118 | def checkunfinished(repo): | |
|
2118 | def checkunfinished(repo, commit=False): | |
|
2119 | 2119 | '''Look for an unfinished multistep operation, like graft, and abort |
|
2120 | 2120 | if found. It's probably good to check this right before |
|
2121 | 2121 | bailifchanged(). |
|
2122 | 2122 | ''' |
|
2123 | for f, clearable, msg, hint in unfinishedstates: | |
|
2123 | for f, clearable, allowcommit, msg, hint in unfinishedstates: | |
|
2124 | if commit and allowcommit: | |
|
2125 | continue | |
|
2124 | 2126 | if repo.vfs.exists(f): |
|
2125 | 2127 | raise util.Abort(msg, hint=hint) |
|
2126 | 2128 | |
@@ -2128,9 +2130,9 b' def clearunfinished(repo):' | |||
|
2128 | 2130 | '''Check for unfinished operations (as above), and clear the ones |
|
2129 | 2131 | that are clearable. |
|
2130 | 2132 | ''' |
|
2131 | for f, clearable, msg, hint in unfinishedstates: | |
|
2133 | for f, clearable, allowcommit, msg, hint in unfinishedstates: | |
|
2132 | 2134 | if not clearable and repo.vfs.exists(f): |
|
2133 | 2135 | raise util.Abort(msg, hint=hint) |
|
2134 | for f, clearable, msg, hint in unfinishedstates: | |
|
2136 | for f, clearable, allowcommit, msg, hint in unfinishedstates: | |
|
2135 | 2137 | if clearable and repo.vfs.exists(f): |
|
2136 | 2138 | util.unlink(repo.join(f)) |
@@ -1336,7 +1336,7 b' def commit(ui, repo, *pats, **opts):' | |||
|
1336 | 1336 | # Save this for restoring it later |
|
1337 | 1337 | oldcommitphase = ui.config('phases', 'new-commit') |
|
1338 | 1338 | |
|
1339 | cmdutil.checkunfinished(repo) | |
|
1339 | cmdutil.checkunfinished(repo, commit=True) | |
|
1340 | 1340 | |
|
1341 | 1341 | branch = repo[None].branch() |
|
1342 | 1342 | bheads = repo.branchheads(branch) |
@@ -73,8 +73,8 b' Go at a random point and try to continue' | |||
|
73 | 73 | (use 'hg histedit --continue' or 'hg histedit --abort') |
|
74 | 74 | [255] |
|
75 | 75 | |
|
76 | commit, then edit the revision (temporarily disable histedit to allow commit) | |
|
77 | $ hg ci -m 'wat' --config 'extensions.histedit=!' | |
|
76 | commit, then edit the revision | |
|
77 | $ hg ci -m 'wat' | |
|
78 | 78 | created new head |
|
79 | 79 | $ echo a > e |
|
80 | 80 | $ HGEDITOR='echo foobaz > ' hg histedit --continue 2>&1 | fixbundle |
General Comments 0
You need to be logged in to leave comments.
Login now