Show More
@@ -273,6 +273,15 b' def unamend(ui, repo, **opts):' | |||||
273 | if len(curctx.parents()) > 1: |
|
273 | if len(curctx.parents()) > 1: | |
274 | raise error.InputError(_(b"cannot unamend merge changeset")) |
|
274 | raise error.InputError(_(b"cannot unamend merge changeset")) | |
275 |
|
275 | |||
|
276 | expected_keys = (b'amend_source', b'unamend_source') | |||
|
277 | if not any(key in curctx.extra() for key in expected_keys): | |||
|
278 | raise error.InputError( | |||
|
279 | _( | |||
|
280 | b"working copy parent was not created by 'hg amend' or " | |||
|
281 | b"'hg unamend'" | |||
|
282 | ) | |||
|
283 | ) | |||
|
284 | ||||
276 | # identify the commit to which to unamend |
|
285 | # identify the commit to which to unamend | |
277 | markers = list(predecessormarkers(curctx)) |
|
286 | markers = list(predecessormarkers(curctx)) | |
278 | if len(markers) != 1: |
|
287 | if len(markers) != 1: |
@@ -26642,7 +26642,7 b' msgstr ""' | |||||
26642 |
|
26642 | |||
26643 | msgid "" |
|
26643 | msgid "" | |
26644 | "``pullbundle``\n" |
|
26644 | "``pullbundle``\n" | |
26645 | " When set, the server will check pullbundle.manifest for bundles\n" |
|
26645 | " When set, the server will check pullbundles.manifest for bundles\n" | |
26646 | " covering the requested heads and common nodes. The first matching\n" |
|
26646 | " covering the requested heads and common nodes. The first matching\n" | |
26647 | " entry will be streamed to the client." |
|
26647 | " entry will be streamed to the client." | |
26648 | msgstr "" |
|
26648 | msgstr "" |
@@ -27460,12 +27460,12 b' msgstr ""' | |||||
27460 |
|
27460 | |||
27461 | msgid "" |
|
27461 | msgid "" | |
27462 | "``pullbundle``\n" |
|
27462 | "``pullbundle``\n" | |
27463 | " When set, the server will check pullbundle.manifest for bundles\n" |
|
27463 | " When set, the server will check pullbundles.manifest for bundles\n" | |
27464 | " covering the requested heads and common nodes. The first matching\n" |
|
27464 | " covering the requested heads and common nodes. The first matching\n" | |
27465 | " entry will be streamed to the client." |
|
27465 | " entry will be streamed to the client." | |
27466 | msgstr "" |
|
27466 | msgstr "" | |
27467 | "``pullbundle``\n" |
|
27467 | "``pullbundle``\n" | |
27468 | " Se definido, o servidor verificará pullbundle.manifest para\n" |
|
27468 | " Se definido, o servidor verificará pullbundles.manifest para\n" | |
27469 | " arquivos de bundle que contiverem as cabeças e nós comuns\n" |
|
27469 | " arquivos de bundle que contiverem as cabeças e nós comuns\n" | |
27470 | " pedidos. A primeira entrada correspondente será enviadas para\n" |
|
27470 | " pedidos. A primeira entrada correspondente será enviadas para\n" | |
27471 | " o cliente." |
|
27471 | " o cliente." |
@@ -2293,7 +2293,7 b' Controls generic server settings.' | |||||
2293 | effectively prevents concurrent pushes. |
|
2293 | effectively prevents concurrent pushes. | |
2294 |
|
2294 | |||
2295 | ``pullbundle`` |
|
2295 | ``pullbundle`` | |
2296 | When set, the server will check pullbundle.manifest for bundles |
|
2296 | When set, the server will check pullbundles.manifest for bundles | |
2297 | covering the requested heads and common nodes. The first matching |
|
2297 | covering the requested heads and common nodes. The first matching | |
2298 | entry will be streamed to the client. |
|
2298 | entry will be streamed to the client. | |
2299 |
|
2299 |
@@ -194,7 +194,7 b' Test recovery from misconfigured server ' | |||||
194 | * sending pullbundle "0.hg" (glob) |
|
194 | * sending pullbundle "0.hg" (glob) | |
195 | $ rm repo/.hg/blackbox.log |
|
195 | $ rm repo/.hg/blackbox.log | |
196 |
|
196 | |||
197 | Test processing when nodes used in the pullbundle.manifest end up being hidden |
|
197 | Test processing when nodes used in the pullbundles.manifest end up being hidden | |
198 |
|
198 | |||
199 | $ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a |
|
199 | $ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a | |
200 | 1 new obsolescence markers |
|
200 | 1 new obsolescence markers |
@@ -39,8 +39,23 b' Repo Setup' | |||||
39 | Trying to unamend when there was no amend done |
|
39 | Trying to unamend when there was no amend done | |
40 |
|
40 | |||
41 | $ hg unamend |
|
41 | $ hg unamend | |
|
42 | abort: working copy parent was not created by 'hg amend' or 'hg unamend' | |||
|
43 | [10] | |||
|
44 | $ echo "bar" >> h | |||
|
45 | ||||
|
46 | Trying to unamend when the obsmarker is missing | |||
|
47 | ||||
|
48 | $ hg amend | |||
|
49 | $ hg debugobsolete --delete 0 | |||
|
50 | deleted 1 obsolescence markers | |||
|
51 | $ hg unamend | |||
42 | abort: changeset must have one predecessor, found 0 predecessors |
|
52 | abort: changeset must have one predecessor, found 0 predecessors | |
43 | [10] |
|
53 | [10] | |
|
54 | $ hg strip tip --config extensions.strip= | |||
|
55 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
56 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c9fa1a715c1b-06e5c233-backup.hg | |||
|
57 | $ hg up tip | |||
|
58 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
44 |
|
59 | |||
45 | Unamend on clean wdir and tip |
|
60 | Unamend on clean wdir and tip | |
46 |
|
61 |
General Comments 0
You need to be logged in to leave comments.
Login now