Show More
@@ -982,14 +982,19 b' def histedit(ui, repo, *freeargs, **opts' | |||||
982 | finally: |
|
982 | finally: | |
983 | release(state.lock, state.wlock) |
|
983 | release(state.lock, state.wlock) | |
984 |
|
984 | |||
|
985 | goalcontinue = 'continue' | |||
|
986 | goalabort = 'abort' | |||
|
987 | goaleditplan = 'edit-plan' | |||
|
988 | goalnew = 'new' | |||
|
989 | ||||
985 | def _getgoal(opts): |
|
990 | def _getgoal(opts): | |
986 | if opts.get('continue'): |
|
991 | if opts.get('continue'): | |
987 |
return |
|
992 | return goalcontinue | |
988 | if opts.get('abort'): |
|
993 | if opts.get('abort'): | |
989 |
return |
|
994 | return goalabort | |
990 | if opts.get('edit_plan'): |
|
995 | if opts.get('edit_plan'): | |
991 |
return |
|
996 | return goaleditplan | |
992 |
return |
|
997 | return goalnew | |
993 |
|
998 | |||
994 | def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs): |
|
999 | def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs): | |
995 | # TODO only abort if we try to histedit mq patches, not just |
|
1000 | # TODO only abort if we try to histedit mq patches, not just | |
@@ -1045,16 +1050,17 b' def _histedit(ui, repo, state, *freeargs' | |||||
1045 | _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs) |
|
1050 | _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs) | |
1046 |
|
1051 | |||
1047 | # rebuild state |
|
1052 | # rebuild state | |
1048 |
if goal == |
|
1053 | if goal == goalcontinue: | |
1049 | state.read() |
|
1054 | state.read() | |
1050 | state = bootstrapcontinue(ui, state, opts) |
|
1055 | state = bootstrapcontinue(ui, state, opts) | |
1051 |
elif goal == |
|
1056 | elif goal == goaleditplan: | |
1052 | _editplanaction(ui, repo, state, rules) |
|
1057 | _editplanaction(ui, repo, state, rules) | |
1053 | return |
|
1058 | return | |
1054 |
elif goal == |
|
1059 | elif goal == goalabort: | |
1055 | _abortaction(ui, repo, state) |
|
1060 | _abortaction(ui, repo, state) | |
1056 | return |
|
1061 | return | |
1057 | else: |
|
1062 | else: | |
|
1063 | # goal == goalnew | |||
1058 | _newaction(ui, repo, state, revs, freeargs, opts) |
|
1064 | _newaction(ui, repo, state, revs, freeargs, opts) | |
1059 |
|
1065 | |||
1060 | _continueaction(ui, repo, state) |
|
1066 | _continueaction(ui, repo, state) |
General Comments 0
You need to be logged in to leave comments.
Login now