Mercurial > evolve
annotate tests/test-rewind.t @ 5592:95949b06bd48
evolvecmd: simplify code for moving bookmarks when relocating node
We had very similar code for updating bookmarks to handle the case
when the relocation resulted in no changes and for the normal
case. This restructures the code a bit so the common part is better
reused.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 24 Sep 2020 16:34:04 -0700 |
parents | 0bb75a6c29b1 |
children | ba8bc1b0acd2 |
rev | line source |
---|---|
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
1 $ . $TESTDIR/testlib/common.sh |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 Global setup |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 ============ |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
6 $ cat >> $HGRCPATH << EOF |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 > [phases] |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
8 > publish = false |
4722
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
9 > [alias] |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
10 > glf = log -GT "{rev}: {desc} ({files})" |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 > [extensions] |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 > evolve = |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 > EOF |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 $ hg init rewind-testing-base |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 $ cd rewind-testing-base |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 $ echo a > root |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
18 $ hg ci -qAm 'c_ROOT' |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 $ echo a > A |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
20 $ hg ci -qAm 'c_A0' |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 $ echo a > B |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
22 $ hg ci -qAm 'c_B0' |
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
23 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 $ hg log -G |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 @ changeset: 2:7e594302a05d |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 o changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 $ cd .. |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
44 Rewinding to a single changeset |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
45 =============================== |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 |
5448
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
47 $ hg clone rewind-testing-base rewind-testing-single-prunes |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 updating to branch default |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5448
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
50 $ cd rewind-testing-single-prunes |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 Prune changeset unrelated to the working copy |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 --------------------------------------------- |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
55 update to an unrelated changeset |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 $ hg up 'desc("c_ROOT")' |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
60 prune the head |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 $ hg prune -r 'desc("c_B0")' |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 1 changesets pruned |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 $ hg log -G |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 @ changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
77 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
78 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
79 $ hg rewind --hidden --to 'desc("c_B0")' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
80 rewinding a pruned commit to 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
81 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
82 actual rewind |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 $ hg rewind --hidden --to 'desc("c_B0")' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
85 rewound to 1 changesets |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 $ hg debugobsolete |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
89 $ hg obslog -r 'desc("c_B0")' --no-origin |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
90 o 073989a581cf (3) c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 x 7e594302a05d (2) c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
94 meta-changed(meta) as 073989a581cf using rewind by test (Thu Jan 01 00:00:00 1970 +0000) |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
96 $ hg obslog -r 'desc("c_B0")' |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
97 o 073989a581cf (3) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
98 | meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
99 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
100 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
101 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
102 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 $ hg log -G |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
104 o changeset: 3:073989a581cf |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
105 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
106 | parent: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
107 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
108 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
109 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
110 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
113 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
114 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
116 @ changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
117 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
118 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
119 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
120 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
121 XXX-TODO: fix the obsfate from "meta-changed as 3" to "identical" or something. |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
122 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
123 $ hg log -G --hidden |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
124 o changeset: 3:073989a581cf |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
125 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 | parent: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
128 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
129 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
130 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
131 | x changeset: 2:7e594302a05d |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 |/ user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
133 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 | obsolete: meta-changed using rewind as 3:073989a581cf |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
135 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
137 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
138 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
139 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
140 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 @ changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
143 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
147 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
148 Other independent rewind creates a different revision |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
149 ----------------------------------------------------- |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
150 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
151 note: we use "default-date" to make it a "different rewind" |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
152 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
153 $ echo '[devel]' >> $HGRCPATH |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 $ echo 'default-date = 1 0' >> $HGRCPATH |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
155 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
156 $ hg prune 'desc("c_B0")' |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
157 1 changesets pruned |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
158 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
159 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
160 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
161 $ hg rewind --hidden --to 'min(desc("c_B0"))' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
162 rewinding a pruned commit to 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
163 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
164 actual rewind |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
165 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
166 $ hg rewind --hidden --to 'min(desc("c_B0"))' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
167 rewound to 1 changesets |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
168 $ hg debugobsolete |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
169 7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
170 7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
171 073989a581cf430a844192364fa37606357cbbc2 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} |
4899 | 172 7e594302a05d3769b27be88fc3cdfd39d7498498 b13b032065ef57a68d9a4cead38ba0f34f95529b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
173 $ hg obslog -r 'desc("c_B0")' --all --no-origin |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
174 x 073989a581cf (3) c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
175 | pruned using prune by test (Thu Jan 01 00:00:01 1970 +0000) |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
176 | |
4899 | 177 | o b13b032065ef (4) c_B0 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
178 |/ |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
179 x 7e594302a05d (2) c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
180 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
181 meta-changed(meta) as 073989a581cf using rewind by test (Thu Jan 01 00:00:00 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
182 meta-changed(meta) as b13b032065ef using rewind by test (Thu Jan 01 00:00:01 1970 +0000) |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
183 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
184 $ hg obslog -r 'desc("c_B0")' --all |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
185 x 073989a581cf (3) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
186 | meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
187 | pruned using prune by test (Thu Jan 01 00:00:01 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
188 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
189 | o b13b032065ef (4) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
190 |/ meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:01 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
191 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
192 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
193 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
194 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
195 $ hg log -G |
4899 | 196 o changeset: 4:b13b032065ef |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
197 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
198 | parent: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
199 | user: test |
4899 | 200 | date: Thu Jan 01 00:00:00 1970 +0000 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
201 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
202 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
203 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
204 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
205 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
206 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
207 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
208 @ changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
209 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
210 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
211 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
212 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
213 $ hg log -G --hidden |
4899 | 214 o changeset: 4:b13b032065ef |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
215 | tag: tip |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
216 | parent: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
217 | user: test |
4899 | 218 | date: Thu Jan 01 00:00:00 1970 +0000 |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
219 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
220 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
221 | x changeset: 3:073989a581cf |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
222 |/ parent: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
223 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
225 | obsolete: pruned using prune |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
226 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
227 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
228 | x changeset: 2:7e594302a05d |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
229 |/ user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
230 | date: Thu Jan 01 00:00:00 1970 +0000 |
4899 | 231 | obsolete: meta-changed using rewind as 4:b13b032065ef |
3858
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
232 | obsolete: meta-changed using rewind as 3:073989a581cf |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
233 | summary: c_B0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
234 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
235 o changeset: 1:579f120ba918 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
236 | user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
237 | date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
238 | summary: c_A0 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
239 | |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
240 @ changeset: 0:eba9c2249fe7 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
241 user: test |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
242 date: Thu Jan 01 00:00:00 1970 +0000 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
243 summary: c_ROOT |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
244 |
bb4f5ad63877
rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
245 $ cd .. |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
246 |
5448
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
247 $ hg clone rewind-testing-base rewind-testing-single-amends |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
248 updating to branch default |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
249 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
250 $ cd rewind-testing-single-amends |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
251 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
252 Rewind a simple amend - creating content-divergence |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
253 --------------------------------------------------- |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
254 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
255 $ echo BB > B |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
256 $ hg amend -m 'c_B1' |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
257 $ hg log -G |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
258 @ changeset: 3:25c8f5ab0c3b |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
259 | tag: tip |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
260 | parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
261 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
262 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
263 | summary: c_B1 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
264 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
265 o changeset: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
266 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
267 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
268 | summary: c_A0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
269 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
270 o changeset: 0:eba9c2249fe7 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
271 user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
272 date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
273 summary: c_ROOT |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
274 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
275 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
276 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
277 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
278 $ hg rewind --from 'desc("c_B1")' --as-divergence --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
279 recreating 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
280 $ hg rewind --hidden --to 'desc("c_B0")' --as-divergence --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
281 recreating 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
282 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
283 actual rewind |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
284 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
285 $ hg rewind --hidden --to 'desc("c_B0")' --as-divergence |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
286 2 new content-divergent changesets |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
287 rewound to 1 changesets |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
288 $ hg debugobsolete |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
289 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
4899 | 290 7e594302a05d3769b27be88fc3cdfd39d7498498 b13b032065ef57a68d9a4cead38ba0f34f95529b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
291 $ hg obslog --rev 'desc("c_B0")' --no-origin |
4899 | 292 * b13b032065ef (4) c_B0 |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
293 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
294 x 7e594302a05d (2) c_B0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
295 rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
296 meta-changed(meta) as b13b032065ef using rewind by test (Thu Jan 01 00:00:01 1970 +0000) |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
297 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
298 $ hg obslog --rev 'desc("c_B0")' |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
299 * b13b032065ef (4) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
300 | meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:01 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
301 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
302 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
303 |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
304 $ hg log -G |
4899 | 305 * changeset: 4:b13b032065ef |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
306 | tag: tip |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
307 | parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
308 | user: test |
4899 | 309 | date: Thu Jan 01 00:00:00 1970 +0000 |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
310 | instability: content-divergent |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
311 | summary: c_B0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
312 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
313 | @ changeset: 3:25c8f5ab0c3b |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
314 |/ parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
315 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
316 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
317 | instability: content-divergent |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
318 | summary: c_B1 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
319 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
320 o changeset: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
321 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
322 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
323 | summary: c_A0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
324 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
325 o changeset: 0:eba9c2249fe7 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
326 user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
327 date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
328 summary: c_ROOT |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
329 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
330 $ hg log -G --hidden |
4899 | 331 * changeset: 4:b13b032065ef |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
332 | tag: tip |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
333 | parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
334 | user: test |
4899 | 335 | date: Thu Jan 01 00:00:00 1970 +0000 |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
336 | instability: content-divergent |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
337 | summary: c_B0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
338 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
339 | @ changeset: 3:25c8f5ab0c3b |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
340 |/ parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
341 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
342 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
343 | instability: content-divergent |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
344 | summary: c_B1 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
345 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
346 | x changeset: 2:7e594302a05d |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
347 |/ user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
348 | date: Thu Jan 01 00:00:00 1970 +0000 |
4899 | 349 | obsolete: meta-changed using rewind as 4:b13b032065ef |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
350 | obsolete: rewritten using amend as 3:25c8f5ab0c3b |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
351 | summary: c_B0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
352 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
353 o changeset: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
354 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
355 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
356 | summary: c_A0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
357 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
358 o changeset: 0:eba9c2249fe7 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
359 user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
360 date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
361 summary: c_ROOT |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
362 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
363 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
364 rewind --dry-run output when rewinding with relevant divergence |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
365 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
366 $ hg rewind --to 'min(desc("c_B0"))' --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
367 abort: rewind confused by divergence on 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
368 (solve divergence first or use "--as-divergence") |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
369 [255] |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
370 $ hg rewind --to 'min(desc("c_B0"))' --hidden --as-divergence --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
371 recreating 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
372 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
373 cleanup |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
374 |
3860
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
375 $ hg prune 'max(desc("c_B0"))' |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
376 1 changesets pruned |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
377 $ hg log -G |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
378 @ changeset: 3:25c8f5ab0c3b |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
379 | tag: tip |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
380 | parent: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
381 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
382 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
383 | summary: c_B1 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
384 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
385 o changeset: 1:579f120ba918 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
386 | user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
388 | summary: c_A0 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
389 | |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
390 o changeset: 0:eba9c2249fe7 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
391 user: test |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
392 date: Thu Jan 01 00:00:00 1970 +0000 |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
393 summary: c_ROOT |
fa184c5edfe8
rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3859
diff
changeset
|
394 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
395 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
396 Rewind a simple amend - obsoleting the current latest successor |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
397 --------------------------------------------------------------- |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
398 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
399 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
400 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
401 $ hg rewind --hidden --to 'min(desc("c_B0"))' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
402 rewinding 25c8f5ab0c3b to 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
403 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
404 actual rewind |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
405 |
5446
5fc54b8f3f84
tests: move default-date manipulation closer to the commands that need it
Anton Shestakov <av6@dwimlabs.net>
parents:
5445
diff
changeset
|
406 $ echo 'default-date = 2 0' >> $HGRCPATH |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
407 $ hg rewind --hidden --to 'min(desc("c_B0"))' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
408 rewound to 1 changesets |
3862
8d3eed113b77
rewind: add a message about obsolete changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3861
diff
changeset
|
409 (1 changesets obsoleted) |
4899 | 410 working directory is now at 837cd997bb05 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
411 $ hg debugobsolete |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
412 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
4899 | 413 7e594302a05d3769b27be88fc3cdfd39d7498498 b13b032065ef57a68d9a4cead38ba0f34f95529b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
414 b13b032065ef57a68d9a4cead38ba0f34f95529b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} | |
415 7e594302a05d3769b27be88fc3cdfd39d7498498 837cd997bb05a27f8ed7d1ba3ff1e8422b9b464e 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
416 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 837cd997bb05a27f8ed7d1ba3ff1e8422b9b464e 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
417 $ hg obslog --rev 'desc("c_B0")' --no-origin |
4899 | 418 @ 837cd997bb05 (5) c_B0 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
419 |\ |
3863
c31be22d1d90
rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3862
diff
changeset
|
420 x | 25c8f5ab0c3b (3) c_B1 |
4899 | 421 |/ rewritten(description, meta, content) as 837cd997bb05 using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
422 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
423 x 7e594302a05d (2) c_B0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
424 rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
425 meta-changed(meta) as 837cd997bb05 using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
426 meta-changed(meta) as b13b032065ef using rewind by test (Thu Jan 01 00:00:01 1970 +0000) |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
427 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
428 $ hg obslog --rev 'desc("c_B0")' |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
429 @ 837cd997bb05 (5) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
430 |\ rewritten(description, meta, content) from 25c8f5ab0c3b using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
431 | | meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
432 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
433 x | 25c8f5ab0c3b (3) c_B1 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
434 |/ rewritten(description, content) from 7e594302a05d using amend by test (Thu Jan 01 00:00:01 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
435 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
436 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
437 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
438 $ hg log -G |
4899 | 439 @ changeset: 5:837cd997bb05 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
440 | tag: tip |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
441 | parent: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
442 | user: test |
4899 | 443 | date: Thu Jan 01 00:00:00 1970 +0000 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
444 | summary: c_B0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
445 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
446 o changeset: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
447 | user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
448 | date: Thu Jan 01 00:00:00 1970 +0000 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
449 | summary: c_A0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
450 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
451 o changeset: 0:eba9c2249fe7 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
452 user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
453 date: Thu Jan 01 00:00:00 1970 +0000 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
454 summary: c_ROOT |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
455 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
456 $ hg log -G --hidden |
4899 | 457 @ changeset: 5:837cd997bb05 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
458 | tag: tip |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
459 | parent: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
460 | user: test |
4899 | 461 | date: Thu Jan 01 00:00:00 1970 +0000 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
462 | summary: c_B0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
463 | |
4899 | 464 | x changeset: 4:b13b032065ef |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
465 |/ parent: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
466 | user: test |
4899 | 467 | date: Thu Jan 01 00:00:00 1970 +0000 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
468 | obsolete: pruned using prune |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
469 | summary: c_B0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
470 | |
3863
c31be22d1d90
rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3862
diff
changeset
|
471 | x changeset: 3:25c8f5ab0c3b |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
472 |/ parent: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
473 | user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
474 | date: Thu Jan 01 00:00:00 1970 +0000 |
4899 | 475 | obsolete: rewritten using rewind as 5:837cd997bb05 |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
476 | summary: c_B1 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
477 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
478 | x changeset: 2:7e594302a05d |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
479 |/ user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
480 | date: Thu Jan 01 00:00:00 1970 +0000 |
4899 | 481 | obsolete: meta-changed using rewind as 4:b13b032065ef |
482 | obsolete: meta-changed using rewind as 5:837cd997bb05 | |
3861
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
483 | obsolete: rewritten using amend as 3:25c8f5ab0c3b |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
484 | summary: c_B0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
485 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
486 o changeset: 1:579f120ba918 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
487 | user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
488 | date: Thu Jan 01 00:00:00 1970 +0000 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
489 | summary: c_A0 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
490 | |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
491 o changeset: 0:eba9c2249fe7 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
492 user: test |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
493 date: Thu Jan 01 00:00:00 1970 +0000 |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
494 summary: c_ROOT |
bbe635dfd75c
rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3860
diff
changeset
|
495 |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
496 $ cd .. |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
497 |
5448
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
498 $ hg clone rewind-testing-base rewind-testing-single-split-fold |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
499 updating to branch default |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
500 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
501 $ cd rewind-testing-single-split-fold |
a0e0352f96e0
tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5447
diff
changeset
|
502 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
503 Rewind a simple split |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
504 --------------------- |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
505 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
506 $ echo C > C |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
507 $ echo D > D |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
508 $ hg ci -qAm 'c_CD0' |
5449
ab5e857506ef
tests: shorten and simplify global setup section in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5448
diff
changeset
|
509 $ hg split --config ui.interactive=yes << EOF |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
510 > y |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
511 > f |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
512 > d |
4294
8974a05a49fa
split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4293
diff
changeset
|
513 > c |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
514 > EOF |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
515 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
516 adding C |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
517 adding D |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
518 diff --git a/C b/C |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
519 new file mode 100644 |
4712
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
520 examine changes to 'C'? |
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
521 (enter ? for help) [Ynesfdaq?] y |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
522 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
523 @@ -0,0 +1,1 @@ |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
524 +C |
4712
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
525 record change 1/2 to 'C'? |
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
526 (enter ? for help) [Ynesfdaq?] f |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
527 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
528 diff --git a/D b/D |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
529 new file mode 100644 |
4712
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
530 examine changes to 'D'? |
e2c548cc83b5
tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents:
4624
diff
changeset
|
531 (enter ? for help) [Ynesfdaq?] d |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
532 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
533 created new head |
4294
8974a05a49fa
split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4293
diff
changeset
|
534 continue splitting? [Ycdq?] c |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
535 $ hg log -G |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
536 @ changeset: 5:9576e80d6851 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
537 | tag: tip |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
538 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
539 | date: Thu Jan 01 00:00:02 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
540 | summary: c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
541 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
542 o changeset: 4:a0316c4c5417 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
543 | parent: 2:7e594302a05d |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
544 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
545 | date: Thu Jan 01 00:00:02 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
546 | summary: c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
547 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
548 o changeset: 2:7e594302a05d |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
549 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
550 | date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
551 | summary: c_B0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
552 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
553 o changeset: 1:579f120ba918 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
554 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
555 | date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
556 | summary: c_A0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
557 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
558 o changeset: 0:eba9c2249fe7 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
559 user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
560 date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
561 summary: c_ROOT |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
562 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
563 $ hg debugobsolete |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
564 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'operation': 'split', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
565 $ hg obslog --all --no-origin |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
566 @ 9576e80d6851 (5) c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
567 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
568 | o a0316c4c5417 (4) c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
569 |/ |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
570 x 49fb7d900906 (3) c_CD0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
571 split(parent, content) as 9576e80d6851, a0316c4c5417 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
572 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
573 $ hg obslog --all |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
574 @ 9576e80d6851 (5) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
575 | split(parent, content) from 49fb7d900906 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
576 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
577 | o a0316c4c5417 (4) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
578 |/ split(parent, content) from 49fb7d900906 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
579 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
580 x 49fb7d900906 (3) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
581 |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
582 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
583 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
584 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
585 $ hg rewind --from 'desc("c_CD0")' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
586 rewinding a0316c4c5417 9576e80d6851 to 1 changesets: 49fb7d900906 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
587 $ hg rewind --hidden --to 'min(desc("c_CD0"))' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
588 rewinding a0316c4c5417 9576e80d6851 to 1 changesets: 49fb7d900906 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
589 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
590 actual rewind |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
591 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
592 $ hg rewind --hidden --to 'min(desc("c_CD0"))' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
593 rewound to 1 changesets |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
594 (2 changesets obsoleted) |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
595 working directory is now at 4535d0af405c |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
596 $ hg debugobsolete |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
597 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'operation': 'split', 'user': 'test'} |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
598 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
599 9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'operation': 'rewind', 'user': 'test'} |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
600 a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'operation': 'rewind', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
601 $ hg obslog --no-origin |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
602 @ 4535d0af405c (6) c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
603 |\ |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
604 | \ |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
605 | |\ |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
606 | x | 9576e80d6851 (5) c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
607 |/ / rewritten(meta, parent, content) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
608 | | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
609 | x a0316c4c5417 (4) c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
610 |/ rewritten(meta, content) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
611 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
612 x 49fb7d900906 (3) c_CD0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
613 meta-changed(meta) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
614 split(parent, content) as 9576e80d6851, a0316c4c5417 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
615 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
616 $ hg obslog |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
617 @ 4535d0af405c (6) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
618 |\ meta-changed(meta) from 49fb7d900906 using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
619 | | rewritten(meta, parent, content) from 9576e80d6851 using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
620 | | rewritten(meta, content) from a0316c4c5417 using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
621 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
622 | \ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
623 | |\ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
624 | x | 9576e80d6851 (5) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
625 |/ / split(parent, content) from 49fb7d900906 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
626 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
627 | x a0316c4c5417 (4) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
628 |/ split(parent, content) from 49fb7d900906 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
629 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
630 x 49fb7d900906 (3) c_CD0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
631 |
3864
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
632 $ hg log -G |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
633 @ changeset: 6:4535d0af405c |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
634 | tag: tip |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
635 | parent: 2:7e594302a05d |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
636 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
637 | date: Thu Jan 01 00:00:02 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
638 | summary: c_CD0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
639 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
640 o changeset: 2:7e594302a05d |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
641 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
642 | date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
643 | summary: c_B0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
644 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
645 o changeset: 1:579f120ba918 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
646 | user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
647 | date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
648 | summary: c_A0 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
649 | |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
650 o changeset: 0:eba9c2249fe7 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
651 user: test |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
652 date: Thu Jan 01 00:00:00 1970 +0000 |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
653 summary: c_ROOT |
0254c96ce108
rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3863
diff
changeset
|
654 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
655 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
656 Rewind a fold |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
657 ------------- |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
658 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
659 $ echo 'default-date = 3 0' >> $HGRCPATH |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
660 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
661 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
662 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
663 $ hg rewind --from . --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
664 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
665 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
666 $ hg rewind --to '9576e80d6851+a0316c4c5417' --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
667 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
668 $ hg rewind --to '9576e80d6851' --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
669 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
670 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
671 XXX this should also give us 2 changesets |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
672 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
673 $ hg rewind --to 'a0316c4c5417' --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
674 rewinding 4535d0af405c to 1 changesets: a0316c4c5417 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
675 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
676 $ hg rewind --to '9576e80d6851' --exact --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
677 rewinding 4535d0af405c to 1 changesets: 9576e80d6851 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
678 $ hg rewind --to 'a0316c4c5417' --exact --hidden --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
679 rewinding 4535d0af405c to 1 changesets: a0316c4c5417 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
680 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
681 actual rewind |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
682 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
683 $ hg rewind --to '9576e80d6851+a0316c4c5417' --hidden |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
684 rewound to 2 changesets |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
685 (1 changesets obsoleted) |
4899 | 686 working directory is now at 95d72d892df7 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
687 $ hg debugobsolete |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
688 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'operation': 'split', 'user': 'test'} |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
689 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
690 9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'operation': 'rewind', 'user': 'test'} |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
691 a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'operation': 'rewind', 'user': 'test'} |
4899 | 692 a0316c4c54179357e71d068fb8884678ebc7c351 e76375de0bfc9c59bdd91067c901f3eed7d6c8fe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
693 9576e80d6851ce79cd535e2dc5fa01b444d89a39 95d72d892df7fec59107e10914c5729bdf03665f 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
694 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b e76375de0bfc9c59bdd91067c901f3eed7d6c8fe 95d72d892df7fec59107e10914c5729bdf03665f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '14', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
695 $ hg obslog -r -2: --no-origin |
4899 | 696 @ 95d72d892df7 (8) c_CD0 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
697 |\ |
4899 | 698 +---o e76375de0bfc (7) c_CD0 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
699 | | | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
700 x---+ 4535d0af405c (6) c_CD0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
701 |\| | split(meta, parent, content) as 95d72d892df7, e76375de0bfc using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
702 | | | |
4899 | 703 | x | 9576e80d6851 (5) c_CD0 |
704 |/ / rewritten(meta, parent, content) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) | |
705 | | rewritten(meta, parent) as 95d72d892df7 using rewind by test (Thu Jan 01 00:00:03 1970 +0000) | |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
706 | | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
707 | x a0316c4c5417 (4) c_CD0 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
708 |/ rewritten(meta, content) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
709 | meta-changed(meta) as e76375de0bfc using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
710 | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
711 x 49fb7d900906 (3) c_CD0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
712 meta-changed(meta) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
713 split(parent, content) as 9576e80d6851, a0316c4c5417 using split by test (Thu Jan 01 00:00:02 1970 +0000) |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
714 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
715 $ hg log -G |
4899 | 716 @ changeset: 8:95d72d892df7 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
717 | tag: tip |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
718 | user: test |
4899 | 719 | date: Thu Jan 01 00:00:02 1970 +0000 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
720 | summary: c_CD0 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
721 | |
4899 | 722 o changeset: 7:e76375de0bfc |
3866
de42d00d6ee2
rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3865
diff
changeset
|
723 | parent: 2:7e594302a05d |
de42d00d6ee2
rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3865
diff
changeset
|
724 | user: test |
4899 | 725 | date: Thu Jan 01 00:00:02 1970 +0000 |
3866
de42d00d6ee2
rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3865
diff
changeset
|
726 | summary: c_CD0 |
3865
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
727 | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
728 o changeset: 2:7e594302a05d |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
729 | user: test |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
730 | date: Thu Jan 01 00:00:00 1970 +0000 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
731 | summary: c_B0 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
732 | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
733 o changeset: 1:579f120ba918 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
734 | user: test |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
735 | date: Thu Jan 01 00:00:00 1970 +0000 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
736 | summary: c_A0 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
737 | |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
738 o changeset: 0:eba9c2249fe7 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
739 user: test |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
740 date: Thu Jan 01 00:00:00 1970 +0000 |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
741 summary: c_ROOT |
b945f2dae587
rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3864
diff
changeset
|
742 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
743 $ cd .. |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
744 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
745 Rewinding a stack |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
746 ================= |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
747 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
748 $ hg clone rewind-testing-base rewind-testing-stack |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
749 updating to branch default |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
750 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
751 $ cd rewind-testing-stack |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
752 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
753 Rewinding the top of the stack only |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
754 ----------------------------------- |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
755 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
756 $ hg up 'desc("c_A0")' |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
757 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
758 $ echo AA >> A |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
759 $ hg amend -m 'c_A1' |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
760 1 new orphan changesets |
5450
64ff1b7c0481
tests: remove unnecessary command flags from test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5449
diff
changeset
|
761 $ hg evolve --update |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
762 move:[2] c_B0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
763 atop:[3] c_A1 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
764 working directory is now at a65fceb2324a |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
765 $ hg debugobsolete |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
766 579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
767 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
768 $ hg obslog -r 'desc("c_A1")::' --no-origin |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
769 @ a65fceb2324a (4) c_B0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
770 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
771 | o d952d1794ff6 (3) c_A1 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
772 | | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
773 | x 579f120ba918 (1) c_A0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
774 | rewritten(description, content) as d952d1794ff6 using amend by test (Thu Jan 01 00:00:03 1970 +0000) |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
775 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
776 x 7e594302a05d (2) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
777 rebased(parent) as a65fceb2324a using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
778 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
779 $ hg obslog -r 'desc("c_A1")::' |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
780 @ a65fceb2324a (4) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
781 | rebased(parent) from 7e594302a05d using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
782 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
783 | o d952d1794ff6 (3) c_A1 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
784 | | rewritten(description, content) from 579f120ba918 using amend by test (Thu Jan 01 00:00:03 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
785 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
786 | x 579f120ba918 (1) c_A0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
787 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
788 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
789 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
790 $ hg log -G |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
791 @ changeset: 4:a65fceb2324a |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
792 | tag: tip |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
793 | user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
794 | date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
795 | summary: c_B0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
796 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
797 o changeset: 3:d952d1794ff6 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
798 | parent: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
799 | user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
800 | date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
801 | summary: c_A1 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
802 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
803 o changeset: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
804 user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
805 date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
806 summary: c_ROOT |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
807 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
808 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
809 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
810 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
811 $ hg rewind --hidden --to 'min(desc(c_B0))' --exact --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
812 rewinding a65fceb2324a to 1 changesets: 7e594302a05d |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
813 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
814 actual rewind |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
815 |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
816 $ hg rewind --hidden --to 'min(desc(c_B0))' --exact |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
817 1 new orphan changesets |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
818 rewound to 1 changesets |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
819 (1 changesets obsoleted) |
4899 | 820 working directory is now at ac979e0aac4e |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
821 $ hg debugobsolete |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
822 579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
823 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} |
4899 | 824 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
825 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
826 $ hg obslog --no-origin |
4899 | 827 @ ac979e0aac4e (5) c_B0 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
828 |\ |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
829 | x a65fceb2324a (4) c_B0 |
4899 | 830 |/ rewritten(meta, parent) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
831 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
832 x 7e594302a05d (2) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
833 rebased(parent) as a65fceb2324a using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
834 meta-changed(meta) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
835 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
836 $ hg obslog |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
837 @ ac979e0aac4e (5) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
838 |\ meta-changed(meta) from 7e594302a05d using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
839 | | rewritten(meta, parent) from a65fceb2324a using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
840 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
841 | x a65fceb2324a (4) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
842 |/ rebased(parent) from 7e594302a05d using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
843 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
844 x 7e594302a05d (2) c_B0 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
845 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
846 $ hg log -G |
4899 | 847 @ changeset: 5:ac979e0aac4e |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
848 | tag: tip |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
849 | parent: 1:579f120ba918 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
850 | user: test |
4899 | 851 | date: Thu Jan 01 00:00:00 1970 +0000 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
852 | instability: orphan |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
853 | summary: c_B0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
854 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
855 | o changeset: 3:d952d1794ff6 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
856 | | parent: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
857 | | user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
858 | | date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
859 | | summary: c_A1 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
860 | | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
861 x | changeset: 1:579f120ba918 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
862 |/ user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
863 | date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
864 | obsolete: rewritten using amend as 3:d952d1794ff6 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
865 | summary: c_A0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
866 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
867 o changeset: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
868 user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
869 date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
870 summary: c_ROOT |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
871 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
872 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
873 Testing the defaults |
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
874 -------------------- |
3872
bbc3cfdfe42b
rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3871
diff
changeset
|
875 |
5536
9f9f04301df0
tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5450
diff
changeset
|
876 rewind with no arguments should be equivalent to `--from .` |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
877 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
878 $ echo 'default-date = 4 0' >> $HGRCPATH |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
879 $ hg rewind --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
880 rewinding ac979e0aac4e to 1 changesets: a65fceb2324a |
5447
ce56d29c3382
tests: actually test what the header promises to test
Anton Shestakov <av6@dwimlabs.net>
parents:
5446
diff
changeset
|
881 $ hg rewind |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
882 rewound to 1 changesets |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
883 (1 changesets obsoleted) |
4899 | 884 working directory is now at a5dd64adbb2a |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
885 $ hg log -G |
4899 | 886 @ changeset: 6:a5dd64adbb2a |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
887 | tag: tip |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
888 | parent: 3:d952d1794ff6 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
889 | user: test |
4899 | 890 | date: Thu Jan 01 00:00:00 1970 +0000 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
891 | summary: c_B0 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
892 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
893 o changeset: 3:d952d1794ff6 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
894 | parent: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
895 | user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
896 | date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
897 | summary: c_A1 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
898 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
899 o changeset: 0:eba9c2249fe7 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
900 user: test |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
901 date: Thu Jan 01 00:00:00 1970 +0000 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
902 summary: c_ROOT |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
903 |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
904 $ hg debugobsolete |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
905 579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
906 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} |
4899 | 907 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
908 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
909 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
910 ac979e0aac4e63ccbbf88ac33942192942302766 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
911 $ hg obslog --no-origin |
4899 | 912 @ a5dd64adbb2a (6) c_B0 |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
913 |\ |
4899 | 914 | x ac979e0aac4e (5) c_B0 |
915 |/| rewritten(meta, parent) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) | |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
916 | | |
4899 | 917 x | a65fceb2324a (4) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
918 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) |
4899 | 919 | rewritten(meta, parent) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
920 | |
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
921 x 7e594302a05d (2) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
922 rebased(parent) as a65fceb2324a using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
923 meta-changed(meta) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3867
339b05c3e929
rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3866
diff
changeset
|
924 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
925 Automatically rewinding the full stack (with --to) |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
926 -------------------------------------------------- |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
927 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
928 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
929 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
930 $ hg rewind --hidden --to 'predecessors(.)' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
931 rewinding d952d1794ff6 to 1 changesets: 579f120ba918 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
932 rewinding a5dd64adbb2a to 1 changesets: ac979e0aac4e |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
933 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
934 actual rewind |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
935 |
5446
5fc54b8f3f84
tests: move default-date manipulation closer to the commands that need it
Anton Shestakov <av6@dwimlabs.net>
parents:
5445
diff
changeset
|
936 $ echo 'default-date = 5 0' >> $HGRCPATH |
4624
c9798965b1f4
revset: switch internal uses and tests to `predecessors` from legacy name
Matt Harbison <matt_harbison@yahoo.com>
parents:
4576
diff
changeset
|
937 $ hg rewind --hidden --to 'predecessors(.)' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
938 rewound to 2 changesets |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
939 (2 changesets obsoleted) |
4899 | 940 working directory is now at 3f2d8862657d |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
941 $ hg debugobsolete |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
942 579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
943 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} |
4899 | 944 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
945 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
946 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
947 ac979e0aac4e63ccbbf88ac33942192942302766 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
948 579f120ba91885449adc92eedf48ef3569742cee 9c28b7ed3951fd15b20ab75449c1e0fdec445958 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
949 ac979e0aac4e63ccbbf88ac33942192942302766 3f2d8862657d20af331f0c0531f5228eef4d36c5 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
950 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 3f2d8862657d20af331f0c0531f5228eef4d36c5 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
951 d952d1794ff657f5c2a82225d2e6307ed930b32f 9c28b7ed3951fd15b20ab75449c1e0fdec445958 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
952 $ hg obslog --no-origin |
4899 | 953 @ 3f2d8862657d (8) c_B0 |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
954 |\ |
4899 | 955 x | a5dd64adbb2a (6) c_B0 |
956 |\| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000) | |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
957 | | |
4899 | 958 | x ac979e0aac4e (5) c_B0 |
959 |/| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000) | |
960 | | rewritten(meta, parent) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) | |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
961 | | |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
962 x | a65fceb2324a (4) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
963 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) |
4899 | 964 | rewritten(meta, parent) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
965 | |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
966 x 7e594302a05d (2) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
967 rebased(parent) as a65fceb2324a using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
968 meta-changed(meta) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
969 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
970 $ hg log -G |
4899 | 971 @ changeset: 8:3f2d8862657d |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
972 | tag: tip |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
973 | user: test |
4899 | 974 | date: Thu Jan 01 00:00:00 1970 +0000 |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
975 | summary: c_B0 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
976 | |
4899 | 977 o changeset: 7:9c28b7ed3951 |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
978 | parent: 0:eba9c2249fe7 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
979 | user: test |
4899 | 980 | date: Thu Jan 01 00:00:00 1970 +0000 |
3868
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
981 | summary: c_A0 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
982 | |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
983 o changeset: 0:eba9c2249fe7 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
984 user: test |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
985 date: Thu Jan 01 00:00:00 1970 +0000 |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
986 summary: c_ROOT |
1742254d1190
rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3867
diff
changeset
|
987 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
988 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
989 Automatically rewinding the full stack (with --from) |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
990 ---------------------------------------------------- |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
991 |
5544
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
992 target selection |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
993 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
994 $ hg rewind --from '.' --dry-run |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
995 rewinding 9c28b7ed3951 to 1 changesets: d952d1794ff6 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
996 rewinding 3f2d8862657d to 1 changesets: a5dd64adbb2a |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
997 |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
998 actual rewind |
0bb75a6c29b1
rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents:
5536
diff
changeset
|
999 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1000 $ echo 'default-date = 6 0' >> $HGRCPATH |
5450
64ff1b7c0481
tests: remove unnecessary command flags from test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5449
diff
changeset
|
1001 $ hg rewind --from '.' |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
1002 rewound to 2 changesets |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1003 (2 changesets obsoleted) |
4899 | 1004 working directory is now at d36d6d267714 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1005 $ hg debugobsolete |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1006 579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1007 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} |
4899 | 1008 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
1009 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1010 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
1011 ac979e0aac4e63ccbbf88ac33942192942302766 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1012 579f120ba91885449adc92eedf48ef3569742cee 9c28b7ed3951fd15b20ab75449c1e0fdec445958 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
1013 ac979e0aac4e63ccbbf88ac33942192942302766 3f2d8862657d20af331f0c0531f5228eef4d36c5 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1014 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 3f2d8862657d20af331f0c0531f5228eef4d36c5 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1015 d952d1794ff657f5c2a82225d2e6307ed930b32f 9c28b7ed3951fd15b20ab75449c1e0fdec445958 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'} | |
1016 d952d1794ff657f5c2a82225d2e6307ed930b32f fef4355b4cc9e2d3ddc154f60e4f4f1a286e9ce7 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} | |
1017 a5dd64adbb2af2e646859b35d0d7128daa73cb2b d36d6d267714108384f31762b6193c32f9f97514 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1018 3f2d8862657d20af331f0c0531f5228eef4d36c5 d36d6d267714108384f31762b6193c32f9f97514 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'} | |
1019 9c28b7ed3951fd15b20ab75449c1e0fdec445958 fef4355b4cc9e2d3ddc154f60e4f4f1a286e9ce7 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'} | |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1020 $ hg obslog --no-origin |
4899 | 1021 @ d36d6d267714 (10) c_B0 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1022 |\ |
4899 | 1023 x | 3f2d8862657d (8) c_B0 |
1024 |\| rewritten(meta, parent) as d36d6d267714 using rewind by test (Thu Jan 01 00:00:06 1970 +0000) | |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1025 | | |
4899 | 1026 | x a5dd64adbb2a (6) c_B0 |
1027 |/| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000) | |
1028 | | rewritten(meta, parent) as d36d6d267714 using rewind by test (Thu Jan 01 00:00:06 1970 +0000) | |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1029 | | |
4899 | 1030 x | ac979e0aac4e (5) c_B0 |
1031 |\| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000) | |
1032 | | rewritten(meta, parent) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) | |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1033 | | |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1034 | x a65fceb2324a (4) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
1035 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000) |
4899 | 1036 | rewritten(meta, parent) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1037 | |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1038 x 7e594302a05d (2) c_B0 |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
1039 rebased(parent) as a65fceb2324a using evolve by test (Thu Jan 01 00:00:03 1970 +0000) |
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
1040 meta-changed(meta) as ac979e0aac4e using rewind by test (Thu Jan 01 00:00:03 1970 +0000) |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1041 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1042 $ hg log -G |
4899 | 1043 @ changeset: 10:d36d6d267714 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1044 | tag: tip |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1045 | user: test |
4899 | 1046 | date: Thu Jan 01 00:00:00 1970 +0000 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1047 | summary: c_B0 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1048 | |
4899 | 1049 o changeset: 9:fef4355b4cc9 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1050 | parent: 0:eba9c2249fe7 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1051 | user: test |
4899 | 1052 | date: Thu Jan 01 00:00:00 1970 +0000 |
3871
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1053 | summary: c_A1 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1054 | |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1055 o changeset: 0:eba9c2249fe7 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1056 user: test |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1057 date: Thu Jan 01 00:00:00 1970 +0000 |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1058 summary: c_ROOT |
2e32a1ef0c60
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3870
diff
changeset
|
1059 |
3873
b81fd1487e04
rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3872
diff
changeset
|
1060 $ cd .. |
b81fd1487e04
rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3872
diff
changeset
|
1061 |
4820
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1062 Merge commits |
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1063 ============= |
3873
b81fd1487e04
rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3872
diff
changeset
|
1064 |
4820
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1065 $ hg clone -q rewind-testing-base rewind-merge |
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1066 $ cd rewind-merge |
4722
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1067 |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1068 $ hg up --clean .^ |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1069 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1070 $ echo foo > foo |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1071 $ hg ci -qAm foo |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1072 |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1073 $ hg merge |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1074 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1075 (branch merge, don't forget to commit) |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1076 $ hg ci -m merge |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1077 $ hg st --change . |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1078 A B |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1079 |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1080 $ echo bar > foo |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1081 $ hg amend -m 'merge, but foo is now bar' |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1082 $ hg st --change . |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1083 M foo |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1084 A B |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1085 |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1086 $ hg rewind --from . |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
1087 rewound to 1 changesets |
4722
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1088 (1 changesets obsoleted) |
4820
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1089 working directory is now at 9d325190bd87 |
4722
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1090 $ hg st --change . |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1091 A B |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1092 |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1093 $ hg glf -r '. + allpredecessors(.) + parents(.)' --hidden |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1094 @ 6: merge () |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1095 |\ |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1096 +---x 5: merge, but foo is now bar (foo) |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1097 | |/ |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1098 +---x 4: merge () |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1099 | |/ |
4820
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1100 | o 3: foo (foo) |
4722
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1101 | | |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1102 | ~ |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1103 o 2: c_B0 (B) |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1104 | |
7839720c7c75
rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents:
4712
diff
changeset
|
1105 ~ |
4820
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1106 |
d842a4c6fc4a
tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents:
4722
diff
changeset
|
1107 $ cd .. |
4821
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1108 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1109 Rewind --keep |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1110 ============= |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1111 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1112 $ hg init rewind-keep |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1113 $ cd rewind-keep |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1114 $ echo root > root |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1115 $ hg ci -qAm 'root' |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1116 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1117 $ echo apple > a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1118 $ echo banana > b |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1119 $ hg ci -qAm initial |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1120 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1121 $ hg rm b |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1122 $ echo apricot > a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1123 $ echo coconut > c |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1124 $ hg add c |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1125 $ hg status |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1126 M a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1127 A c |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1128 R b |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1129 $ hg amend -m amended |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1130 $ hg glf --hidden |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1131 @ 2: amended (a c) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1132 | |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1133 | x 1: initial (a b) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1134 |/ |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1135 o 0: root (root) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1136 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1137 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1138 Clean wdir |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1139 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1140 $ hg rewind --keep --to 'desc("initial")' --hidden |
5445
d0b0ef0ba094
rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
1141 rewound to 1 changesets |
4821
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1142 (1 changesets obsoleted) |
5275
417503ef667d
tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents:
5123
diff
changeset
|
1143 $ hg debugobsolete |
417503ef667d
tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents:
5123
diff
changeset
|
1144 30704102d912d9d35a3d51400c4c93ad1e8bc7f3 2ea5be2f87510c7d26d5866dec83b57a7d939c4a 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} |
417503ef667d
tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents:
5123
diff
changeset
|
1145 30704102d912d9d35a3d51400c4c93ad1e8bc7f3 b4c97fddc16aa57693fa0a730d4b44ceb75bb35c 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'} |
417503ef667d
tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents:
5123
diff
changeset
|
1146 2ea5be2f87510c7d26d5866dec83b57a7d939c4a b4c97fddc16aa57693fa0a730d4b44ceb75bb35c 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'} |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1147 $ hg obslog --no-origin |
4821
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1148 @ b4c97fddc16a (3) initial |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1149 |\ |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1150 x | 2ea5be2f8751 (2) amended |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1151 |/ rewritten(description, meta, content) as b4c97fddc16a using rewind by test (Thu Jan 01 00:00:06 1970 +0000) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1152 | |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1153 x 30704102d912 (1) initial |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1154 rewritten(description, content) as 2ea5be2f8751 using amend by test (Thu Jan 01 00:00:06 1970 +0000) |
5123
900668a93629
obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents:
4899
diff
changeset
|
1155 meta-changed(meta) as b4c97fddc16a using rewind by test (Thu Jan 01 00:00:06 1970 +0000) |
4821
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1156 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1157 $ hg obslog |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1158 @ b4c97fddc16a (3) initial |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1159 |\ rewritten(description, meta, content) from 2ea5be2f8751 using rewind by test (Thu Jan 01 00:00:06 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1160 | | meta-changed(meta) from 30704102d912 using rewind by test (Thu Jan 01 00:00:06 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1161 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1162 x | 2ea5be2f8751 (2) amended |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1163 |/ rewritten(description, content) from 30704102d912 using amend by test (Thu Jan 01 00:00:06 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1164 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1165 x 30704102d912 (1) initial |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5275
diff
changeset
|
1166 |
4821
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1167 $ hg glf --hidden |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1168 @ 3: initial (a b) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1169 | |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1170 | x 2: amended (a c) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1171 |/ |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1172 | x 1: initial (a b) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1173 |/ |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1174 o 0: root (root) |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1175 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1176 $ hg st |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1177 M a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1178 A c |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1179 R b |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1180 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1181 Making wdir even more dirty |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1182 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1183 $ echo avocado > a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1184 $ echo durian > d |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1185 $ hg st |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1186 M a |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1187 A c |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1188 R b |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1189 ? d |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1190 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1191 No rewinding without --keep |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1192 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1193 $ hg rewind --to 'desc("amended")' --hidden |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1194 abort: uncommitted changes |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1195 [255] |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1196 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1197 XXX: Unfortunately, even with --keep it's not allowed |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1198 |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1199 $ hg rewind --keep --to 'desc("amended")' --hidden |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1200 abort: uncommitted changes |
d8e36e60aea0
rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents:
4820
diff
changeset
|
1201 [255] |