##// END OF EJS Templates
histedit: fix --edit-plan...
Durham Goode -
r24920:b5eb0150 stable
parent child Browse files
Show More
@@ -747,7 +747,8 b' def _histedit(ui, repo, state, *freeargs'
747 elif goal == 'edit-plan':
747 elif goal == 'edit-plan':
748 state.read()
748 state.read()
749 if not rules:
749 if not rules:
750 comment = editcomment % (state.parentctx, node.short(state.topmost))
750 comment = editcomment % (node.short(state.parentctxnode),
751 node.short(state.topmost))
751 rules = ruleeditor(repo, ui, state.rules, comment)
752 rules = ruleeditor(repo, ui, state.rules, comment)
752 else:
753 else:
753 if rules == '-':
754 if rules == '-':
@@ -70,12 +70,51 b' edit the history'
70 Make changes as needed, you may commit or record as needed now.
70 Make changes as needed, you may commit or record as needed now.
71 When you are finished, run hg histedit --continue to resume.
71 When you are finished, run hg histedit --continue to resume.
72
72
73 edit the plan
73 edit the plan via the editor
74 $ cat >> ../editplan.sh <<EOF
75 > cat > \$1 <<EOF2
76 > drop e860deea161a e
77 > drop 652413bf663e f
78 > drop 3c6a8ed2ebe8 g
79 > EOF2
80 > EOF
81 $ chmod a+x ../editplan.sh
82 $ HGEDITOR=../editplan.sh hg histedit --edit-plan
83 $ cat .hg/histedit-state
84 v1
85 055a42cdd88768532f9cf79daa407fc8d138de9b
86 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
87 False
88 3
89 drop
90 e860deea161a2f77de56603b340ebbb4536308ae
91 drop
92 652413bf663ef2a641cab26574e46d5f5a64a55a
93 drop
94 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
95 0
96 strip-backup/177f92b77385-0ebe6a8f-histedit.hg
97
98 edit the plan via --commands
74 $ hg histedit --edit-plan --commands - 2>&1 << EOF
99 $ hg histedit --edit-plan --commands - 2>&1 << EOF
75 > edit e860deea161a e
100 > edit e860deea161a e
76 > pick 652413bf663e f
101 > pick 652413bf663e f
77 > drop 3c6a8ed2ebe8 g
102 > drop 3c6a8ed2ebe8 g
78 > EOF
103 > EOF
104 $ cat .hg/histedit-state
105 v1
106 055a42cdd88768532f9cf79daa407fc8d138de9b
107 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
108 False
109 3
110 edit
111 e860deea161a2f77de56603b340ebbb4536308ae
112 pick
113 652413bf663ef2a641cab26574e46d5f5a64a55a
114 drop
115 3c6a8ed2ebe862cc949d2caa30775dd6f16fb799
116 0
117 strip-backup/177f92b77385-0ebe6a8f-histedit.hg
79
118
80 Go at a random point and try to continue
119 Go at a random point and try to continue
81
120
General Comments 0
You need to be logged in to leave comments. Login now