Show More
@@ -143,6 +143,9 b' as running ``hg histedit 836302820282``.' | |||
|
143 | 143 | repository that Mercurial does not detect to be related to the source |
|
144 | 144 | repo, you can add a ``--force`` option. |
|
145 | 145 | |
|
146 | Config | |
|
147 | ------ | |
|
148 | ||
|
146 | 149 | Histedit rule lines are truncated to 80 characters by default. You |
|
147 | 150 | can customize this behavior by setting a different length in your |
|
148 | 151 | configuration file:: |
@@ -156,6 +159,14 b' revset in your configuration file::' | |||
|
156 | 159 | |
|
157 | 160 | [histedit] |
|
158 | 161 | defaultrev = only(.) & draft() |
|
162 | ||
|
163 | By default each edited revision needs to be present in histedit commands. | |
|
164 | To remove revision you need to use ``drop`` operation. You can configure | |
|
165 | the drop to be implicit for missing commits by adding: | |
|
166 | ||
|
167 | [histedit] | |
|
168 | dropmissing = True | |
|
169 | ||
|
159 | 170 | """ |
|
160 | 171 | |
|
161 | 172 | try: |
@@ -1225,10 +1236,17 b' def verifyactions(actions, state, ctxs):' | |||
|
1225 | 1236 | ha[:12]) |
|
1226 | 1237 | seen.add(ha) |
|
1227 | 1238 | missing = sorted(expected - seen) # sort to stabilize output |
|
1228 | if missing: | |
|
1239 | ||
|
1240 | if state.repo.ui.configbool('histedit', 'dropmissing'): | |
|
1241 | drops = [drop(state, node.bin(n)) for n in missing] | |
|
1242 | # put the in the beginning so they execute immediately and | |
|
1243 | # don't show in the edit-plan in the future | |
|
1244 | actions[:0] = drops | |
|
1245 | elif missing: | |
|
1229 | 1246 | raise error.Abort(_('missing rules for changeset %s') % |
|
1230 | 1247 | missing[0][:12], |
|
1231 |
hint=_('use "drop %s" to discard |
|
|
1248 | hint=_('use "drop %s" to discard, see also: ' | |
|
1249 | '"hg help -e histedit.config"') % missing[0][:12]) | |
|
1232 | 1250 | |
|
1233 | 1251 | def newnodestoabort(state): |
|
1234 | 1252 | """process the list of replacements to return |
@@ -159,7 +159,7 b' Test that missing revisions are detected' | |||
|
159 | 159 | > pick 08d98a8350f3 4 five |
|
160 | 160 | > EOF |
|
161 | 161 | abort: missing rules for changeset c8e68270e35a |
|
162 |
(use "drop c8e68270e35a" to discard |
|
|
162 | (use "drop c8e68270e35a" to discard, see also: "hg help -e histedit.config") | |
|
163 | 163 | [255] |
|
164 | 164 | |
|
165 | 165 | Test that extra revisions are detected |
@@ -148,4 +148,26 b' Drop the last changeset' | |||
|
148 | 148 | summary: a |
|
149 | 149 | |
|
150 | 150 | |
|
151 | $ cd .. | |
|
151 | $ hg histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle | |
|
152 | > pick cb9a9f314b8b a | |
|
153 | > pick ee283cb5f2d5 e | |
|
154 | > EOF | |
|
155 | abort: missing rules for changeset a4f7421b80f7 | |
|
156 | (use "drop a4f7421b80f7" to discard, see also: "hg help -e histedit.config") | |
|
157 | $ hg --config histedit.dropmissing=True histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle | |
|
158 | > pick cb9a9f314b8b a | |
|
159 | > pick ee283cb5f2d5 e | |
|
160 | > EOF | |
|
161 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
|
162 | $ hg log --graph | |
|
163 | @ changeset: 1:e99c679bf03e | |
|
164 | | tag: tip | |
|
165 | | user: test | |
|
166 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
167 | | summary: e | |
|
168 | | | |
|
169 | o changeset: 0:cb9a9f314b8b | |
|
170 | user: test | |
|
171 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
172 | summary: a | |
|
173 |
General Comments 0
You need to be logged in to leave comments.
Login now