##// END OF EJS Templates
histedit: change string literals to constants in goal naming...
Kostia Balytskyi -
r28144:ed6d650b default
parent child Browse files
Show More
@@ -982,14 +982,19 b' def histedit(ui, repo, *freeargs, **opts'
982 982 finally:
983 983 release(state.lock, state.wlock)
984 984
985 goalcontinue = 'continue'
986 goalabort = 'abort'
987 goaleditplan = 'edit-plan'
988 goalnew = 'new'
989
985 990 def _getgoal(opts):
986 991 if opts.get('continue'):
987 return 'continue'
992 return goalcontinue
988 993 if opts.get('abort'):
989 return 'abort'
994 return goalabort
990 995 if opts.get('edit_plan'):
991 return 'edit-plan'
992 return 'new'
996 return goaleditplan
997 return goalnew
993 998
994 999 def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs):
995 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 1050 _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs)
1046 1051
1047 1052 # rebuild state
1048 if goal == 'continue':
1053 if goal == goalcontinue:
1049 1054 state.read()
1050 1055 state = bootstrapcontinue(ui, state, opts)
1051 elif goal == 'edit-plan':
1056 elif goal == goaleditplan:
1052 1057 _editplanaction(ui, repo, state, rules)
1053 1058 return
1054 elif goal == 'abort':
1059 elif goal == goalabort:
1055 1060 _abortaction(ui, repo, state)
1056 1061 return
1057 1062 else:
1063 # goal == goalnew
1058 1064 _newaction(ui, repo, state, revs, freeargs, opts)
1059 1065
1060 1066 _continueaction(ui, repo, state)
General Comments 0
You need to be logged in to leave comments. Login now