Show More
@@ -39,6 +39,7 b' file open in your editor::' | |||||
39 | # r, roll = like fold, but discard this commit's description and date |
|
39 | # r, roll = like fold, but discard this commit's description and date | |
40 | # d, drop = remove commit from history |
|
40 | # d, drop = remove commit from history | |
41 | # m, mess = edit commit message without changing commit content |
|
41 | # m, mess = edit commit message without changing commit content | |
|
42 | # b, base = checkout changeset and apply further changesets from there | |||
42 | # |
|
43 | # | |
43 |
|
44 | |||
44 | In this file, lines beginning with ``#`` are ignored. You must specify a rule |
|
45 | In this file, lines beginning with ``#`` are ignored. You must specify a rule | |
@@ -61,6 +62,7 b' would reorganize the file to look like t' | |||||
61 | # r, roll = like fold, but discard this commit's description and date |
|
62 | # r, roll = like fold, but discard this commit's description and date | |
62 | # d, drop = remove commit from history |
|
63 | # d, drop = remove commit from history | |
63 | # m, mess = edit commit message without changing commit content |
|
64 | # m, mess = edit commit message without changing commit content | |
|
65 | # b, base = checkout changeset and apply further changesets from there | |||
64 | # |
|
66 | # | |
65 |
|
67 | |||
66 | At which point you close the editor and ``histedit`` starts working. When you |
|
68 | At which point you close the editor and ``histedit`` starts working. When you | |
@@ -815,6 +817,8 b' class fold(histeditaction):' | |||||
815 | replacements.append((ich, (n,))) |
|
817 | replacements.append((ich, (n,))) | |
816 | return repo[n], replacements |
|
818 | return repo[n], replacements | |
817 |
|
819 | |||
|
820 | @action(['base', 'b'], | |||
|
821 | _('checkout changeset and apply further changesets from there')) | |||
818 | class base(histeditaction): |
|
822 | class base(histeditaction): | |
819 |
|
823 | |||
820 | def run(self): |
|
824 | def run(self): | |
@@ -905,7 +909,6 b' def findoutgoing(ui, repo, remote=None, ' | |||||
905 | raise error.Abort(msg, hint=hint) |
|
909 | raise error.Abort(msg, hint=hint) | |
906 | return repo.lookup(roots[0]) |
|
910 | return repo.lookup(roots[0]) | |
907 |
|
911 | |||
908 |
|
||||
909 | @command('histedit', |
|
912 | @command('histedit', | |
910 | [('', 'commands', '', |
|
913 | [('', 'commands', '', | |
911 | _('read history edits from the specified file'), _('FILE')), |
|
914 | _('read history edits from the specified file'), _('FILE')), | |
@@ -938,6 +941,8 b' def histedit(ui, repo, *freeargs, **opts' | |||||
938 |
|
941 | |||
939 | - `edit` to edit this changeset (preserving date) |
|
942 | - `edit` to edit this changeset (preserving date) | |
940 |
|
943 | |||
|
944 | - `base` to checkout changeset and apply further changesets from there | |||
|
945 | ||||
941 | There are a number of ways to select the root changeset: |
|
946 | There are a number of ways to select the root changeset: | |
942 |
|
947 | |||
943 | - Specify ANCESTOR directly |
|
948 | - Specify ANCESTOR directly | |
@@ -1631,7 +1636,3 b' def extsetup(ui):' | |||||
1631 | _("use 'hg histedit --continue' or 'hg histedit --abort'")]) |
|
1636 | _("use 'hg histedit --continue' or 'hg histedit --abort'")]) | |
1632 | cmdutil.afterresolvedstates.append( |
|
1637 | cmdutil.afterresolvedstates.append( | |
1633 | ['histedit-state', _('hg histedit --continue')]) |
|
1638 | ['histedit-state', _('hg histedit --continue')]) | |
1634 | if ui.configbool("experimental", "histeditng"): |
|
|||
1635 | globals()['base'] = action(['base', 'b'], |
|
|||
1636 | _('checkout changeset and apply further changesets from there') |
|
|||
1637 | )(base) |
|
@@ -70,6 +70,7 b' Run a dummy edit to make sure we get tip' | |||||
70 | # e, edit = use commit, but stop for amending |
|
70 | # e, edit = use commit, but stop for amending | |
71 | # m, mess = edit commit message without changing commit content |
|
71 | # m, mess = edit commit message without changing commit content | |
72 | # p, pick = use commit |
|
72 | # p, pick = use commit | |
|
73 | # b, base = checkout changeset and apply further changesets from there | |||
73 | # d, drop = remove commit from history |
|
74 | # d, drop = remove commit from history | |
74 | # f, fold = use commit, but combine it with the one above |
|
75 | # f, fold = use commit, but combine it with the one above | |
75 | # r, roll = like fold, but discard this commit's description and date |
|
76 | # r, roll = like fold, but discard this commit's description and date | |
@@ -305,6 +306,7 b' Test that trimming description using mul' | |||||
305 | # e, edit = use commit, but stop for amending |
|
306 | # e, edit = use commit, but stop for amending | |
306 | # m, mess = edit commit message without changing commit content |
|
307 | # m, mess = edit commit message without changing commit content | |
307 | # p, pick = use commit |
|
308 | # p, pick = use commit | |
|
309 | # b, base = checkout changeset and apply further changesets from there | |||
308 | # d, drop = remove commit from history |
|
310 | # d, drop = remove commit from history | |
309 | # f, fold = use commit, but combine it with the one above |
|
311 | # f, fold = use commit, but combine it with the one above | |
310 | # r, roll = like fold, but discard this commit's description and date |
|
312 | # r, roll = like fold, but discard this commit's description and date | |
@@ -541,6 +543,7 b" Check that 'roll' is selected by default" | |||||
541 | # e, edit = use commit, but stop for amending |
|
543 | # e, edit = use commit, but stop for amending | |
542 | # m, mess = edit commit message without changing commit content |
|
544 | # m, mess = edit commit message without changing commit content | |
543 | # p, pick = use commit |
|
545 | # p, pick = use commit | |
|
546 | # b, base = checkout changeset and apply further changesets from there | |||
544 | # d, drop = remove commit from history |
|
547 | # d, drop = remove commit from history | |
545 | # f, fold = use commit, but combine it with the one above |
|
548 | # f, fold = use commit, but combine it with the one above | |
546 | # r, roll = like fold, but discard this commit's description and date |
|
549 | # r, roll = like fold, but discard this commit's description and date |
@@ -5,8 +5,6 b'' | |||||
5 | > tglog = log -G --template "{rev}:{node}:{phase} '{desc}'\n" |
|
5 | > tglog = log -G --template "{rev}:{node}:{phase} '{desc}'\n" | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > histedit= |
|
7 | > histedit= | |
8 | > [experimental] |
|
|||
9 | > histeditng=True |
|
|||
10 | > EOF |
|
8 | > EOF | |
11 |
|
9 | |||
12 | Create repo a: |
|
10 | Create repo a: | |
@@ -238,15 +236,6 b' base on a previously picked changeset' | |||||
238 | hg: parse error: base "d273e35dcdf2" changeset was an edited list candidate |
|
236 | hg: parse error: base "d273e35dcdf2" changeset was an edited list candidate | |
239 | (base must only use unlisted changesets) |
|
237 | (base must only use unlisted changesets) | |
240 |
|
238 | |||
241 | $ hg --config experimental.histeditng=False histedit 5 --commands - 2>&1 << EOF | fixbundle |
|
|||
242 | > base cd010b8cd998 A |
|
|||
243 | > pick d273e35dcdf2 B |
|
|||
244 | > pick 03772da75548 X |
|
|||
245 | > pick b2f90fd8aa85 I |
|
|||
246 | > pick e8c55b19d366 J |
|
|||
247 | > EOF |
|
|||
248 | hg: parse error: unknown action "base" |
|
|||
249 |
|
||||
250 | $ hg tglog |
|
239 | $ hg tglog | |
251 | @ 8:e8c55b19d366b335626e805484110d1d5f6f2ea3:draft 'J' |
|
240 | @ 8:e8c55b19d366b335626e805484110d1d5f6f2ea3:draft 'J' | |
252 | | |
|
241 | | |
@@ -76,6 +76,7 b'' | |||||
76 | # e, edit = use commit, but stop for amending |
|
76 | # e, edit = use commit, but stop for amending | |
77 | # m, mess = edit commit message without changing commit content |
|
77 | # m, mess = edit commit message without changing commit content | |
78 | # p, pick = use commit |
|
78 | # p, pick = use commit | |
|
79 | # b, base = checkout changeset and apply further changesets from there | |||
79 | # d, drop = remove commit from history |
|
80 | # d, drop = remove commit from history | |
80 | # f, fold = use commit, but combine it with the one above |
|
81 | # f, fold = use commit, but combine it with the one above | |
81 | # r, roll = like fold, but discard this commit's description and date |
|
82 | # r, roll = like fold, but discard this commit's description and date | |
@@ -132,6 +133,7 b'' | |||||
132 | # e, edit = use commit, but stop for amending |
|
133 | # e, edit = use commit, but stop for amending | |
133 | # m, mess = edit commit message without changing commit content |
|
134 | # m, mess = edit commit message without changing commit content | |
134 | # p, pick = use commit |
|
135 | # p, pick = use commit | |
|
136 | # b, base = checkout changeset and apply further changesets from there | |||
135 | # d, drop = remove commit from history |
|
137 | # d, drop = remove commit from history | |
136 | # f, fold = use commit, but combine it with the one above |
|
138 | # f, fold = use commit, but combine it with the one above | |
137 | # r, roll = like fold, but discard this commit's description and date |
|
139 | # r, roll = like fold, but discard this commit's description and date |
@@ -70,6 +70,7 b' show the edit commands offered' | |||||
70 | # e, edit = use commit, but stop for amending |
|
70 | # e, edit = use commit, but stop for amending | |
71 | # m, mess = edit commit message without changing commit content |
|
71 | # m, mess = edit commit message without changing commit content | |
72 | # p, pick = use commit |
|
72 | # p, pick = use commit | |
|
73 | # b, base = checkout changeset and apply further changesets from there | |||
73 | # d, drop = remove commit from history |
|
74 | # d, drop = remove commit from history | |
74 | # f, fold = use commit, but combine it with the one above |
|
75 | # f, fold = use commit, but combine it with the one above | |
75 | # r, roll = like fold, but discard this commit's description and date |
|
76 | # r, roll = like fold, but discard this commit's description and date | |
@@ -348,6 +349,7 b' Verify that revsetalias entries work wit' | |||||
348 | # e, edit = use commit, but stop for amending |
|
349 | # e, edit = use commit, but stop for amending | |
349 | # m, mess = edit commit message without changing commit content |
|
350 | # m, mess = edit commit message without changing commit content | |
350 | # p, pick = use commit |
|
351 | # p, pick = use commit | |
|
352 | # b, base = checkout changeset and apply further changesets from there | |||
351 | # d, drop = remove commit from history |
|
353 | # d, drop = remove commit from history | |
352 | # f, fold = use commit, but combine it with the one above |
|
354 | # f, fold = use commit, but combine it with the one above | |
353 | # r, roll = like fold, but discard this commit's description and date |
|
355 | # r, roll = like fold, but discard this commit's description and date |
@@ -476,6 +476,7 b' Attempting to fold a change into a publi' | |||||
476 | # e, edit = use commit, but stop for amending |
|
476 | # e, edit = use commit, but stop for amending | |
477 | # m, mess = edit commit message without changing commit content |
|
477 | # m, mess = edit commit message without changing commit content | |
478 | # p, fold = use commit |
|
478 | # p, fold = use commit | |
|
479 | # b, base = checkout changeset and apply further changesets from there | |||
479 | # d, drop = remove commit from history |
|
480 | # d, drop = remove commit from history | |
480 | # f, fold = use commit, but combine it with the one above |
|
481 | # f, fold = use commit, but combine it with the one above | |
481 | # r, roll = like fold, but discard this commit's description and date |
|
482 | # r, roll = like fold, but discard this commit's description and date |
@@ -132,6 +132,7 b' Base setup for the rest of the testing' | |||||
132 | # e, edit = use commit, but stop for amending |
|
132 | # e, edit = use commit, but stop for amending | |
133 | # m, mess = edit commit message without changing commit content |
|
133 | # m, mess = edit commit message without changing commit content | |
134 | # p, pick = use commit |
|
134 | # p, pick = use commit | |
|
135 | # b, base = checkout changeset and apply further changesets from there | |||
135 | # d, drop = remove commit from history |
|
136 | # d, drop = remove commit from history | |
136 | # f, fold = use commit, but combine it with the one above |
|
137 | # f, fold = use commit, but combine it with the one above | |
137 | # r, roll = like fold, but discard this commit's description and date |
|
138 | # r, roll = like fold, but discard this commit's description and date |
@@ -52,6 +52,7 b' show the edit commands offered by outgoi' | |||||
52 | # e, edit = use commit, but stop for amending |
|
52 | # e, edit = use commit, but stop for amending | |
53 | # m, mess = edit commit message without changing commit content |
|
53 | # m, mess = edit commit message without changing commit content | |
54 | # p, pick = use commit |
|
54 | # p, pick = use commit | |
|
55 | # b, base = checkout changeset and apply further changesets from there | |||
55 | # d, drop = remove commit from history |
|
56 | # d, drop = remove commit from history | |
56 | # f, fold = use commit, but combine it with the one above |
|
57 | # f, fold = use commit, but combine it with the one above | |
57 | # r, roll = like fold, but discard this commit's description and date |
|
58 | # r, roll = like fold, but discard this commit's description and date | |
@@ -86,6 +87,7 b' show the error from unrelated repos' | |||||
86 | # e, edit = use commit, but stop for amending |
|
87 | # e, edit = use commit, but stop for amending | |
87 | # m, mess = edit commit message without changing commit content |
|
88 | # m, mess = edit commit message without changing commit content | |
88 | # p, pick = use commit |
|
89 | # p, pick = use commit | |
|
90 | # b, base = checkout changeset and apply further changesets from there | |||
89 | # d, drop = remove commit from history |
|
91 | # d, drop = remove commit from history | |
90 | # f, fold = use commit, but combine it with the one above |
|
92 | # f, fold = use commit, but combine it with the one above | |
91 | # r, roll = like fold, but discard this commit's description and date |
|
93 | # r, roll = like fold, but discard this commit's description and date | |
@@ -112,6 +114,7 b' test sensitivity to branch in URL:' | |||||
112 | # e, edit = use commit, but stop for amending |
|
114 | # e, edit = use commit, but stop for amending | |
113 | # m, mess = edit commit message without changing commit content |
|
115 | # m, mess = edit commit message without changing commit content | |
114 | # p, pick = use commit |
|
116 | # p, pick = use commit | |
|
117 | # b, base = checkout changeset and apply further changesets from there | |||
115 | # d, drop = remove commit from history |
|
118 | # d, drop = remove commit from history | |
116 | # f, fold = use commit, but combine it with the one above |
|
119 | # f, fold = use commit, but combine it with the one above | |
117 | # r, roll = like fold, but discard this commit's description and date |
|
120 | # r, roll = like fold, but discard this commit's description and date |
General Comments 0
You need to be logged in to leave comments.
Login now