annotate tests/test-rewind.t @ 6769:365bdacd7f6a mercurial-4.9

test-compat: merge mercurial-5.0 into mercurial-4.9
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Apr 2024 17:57:48 -0300
parents 67fc03f42d92
children be8f7eb3f3a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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})"
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
11 > glhf = log -GT "{rev}:{node|short} {desc} ({files})"
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
12 > [extensions]
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
13 > evolve =
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
14 > EOF
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
15
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
16 $ 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
17 $ cd rewind-testing-base
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
18 $ 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
19 $ 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
20 $ 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
21 $ 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
22 $ 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
23 $ 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
24
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
25 $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
26 @ changeset: 2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
27 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
28 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
29 | 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
30 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
31 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
32 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
33 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
34 | 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
35 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
36 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
37 o changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
38 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
39 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
40 summary: c_ROOT
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
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
43 $ cd ..
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
44
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
45 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
46 ===============================
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
47
5448
a0e0352f96e0 tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5447
diff changeset
48 $ 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
49 updating to branch default
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
50 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
51 $ 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
52
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
53 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
54 ---------------------------------------------
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
55
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
56 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
57
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
58 $ 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
59 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
60
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
61 prune the head
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
62
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
63 $ 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
64 1 changesets pruned
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
65 $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
66 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
67 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
68 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
69 | 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
70 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
71 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
72 @ changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
73 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
74 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
75 summary: c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
76
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
77
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
78 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
79
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
80 $ 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
81 rewinding a pruned commit to 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
82
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
83 actual rewind
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
84
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
85 $ 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
86 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
87 $ hg debugobsolete
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
88 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
89 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
90 $ 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
91 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
92 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
93 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
94 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
95 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
96
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
97 $ hg obslog -r 'desc("c_B0")'
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
98 o 073989a581cf (3) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
99 | 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
100 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
101 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
102 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
103
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
104 $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
105 o changeset: 3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
106 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
107 | parent: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
108 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
109 | 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
110 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
111 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
112 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
113 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
114 | 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
115 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
116 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
117 @ changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
118 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
119 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
120 summary: c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
121
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
122 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
123
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
124 $ hg log -G --hidden
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
125 o changeset: 3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
126 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
127 | parent: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
128 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
129 | 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
130 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
131 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
132 | x changeset: 2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
133 |/ user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
134 | 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
135 | 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
136 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
137 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
138 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
139 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
140 | 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
141 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
142 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
143 @ changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
144 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
145 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
146 summary: c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
147
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
148
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
149 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
150 -----------------------------------------------------
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
151
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
152 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
153
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
154 $ echo '[devel]' >> $HGRCPATH
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
155 $ 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
156
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
157 $ 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
158 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
159
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
160 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
161
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
162 $ 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
163 rewinding a pruned commit to 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
164
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
165 actual rewind
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
166
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
167 $ 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
168 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
169 $ hg debugobsolete
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
170 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
171 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
172 073989a581cf430a844192364fa37606357cbbc2 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
173 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
174 $ 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
175 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
176 | 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
177 |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
178 | 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
179 |/
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
180 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
181 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
182 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
183 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
184
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
185 $ hg obslog -r 'desc("c_B0")' --all
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
186 x 073989a581cf (3) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
187 | 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
188 | 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
189 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
190 | o b13b032065ef (4) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
191 |/ 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
192 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
193 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
194 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
195
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
196 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
197 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
198 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
199 | parent: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
200 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
201 | 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
202 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
203 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
204 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
205 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
206 | 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
207 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
208 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
209 @ changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
210 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
211 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
212 summary: c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
213
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
214 $ hg log -G --hidden
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
215 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
216 | tag: tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
217 | parent: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
218 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
219 | 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
220 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
221 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
222 | x changeset: 3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
223 |/ parent: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
224 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
225 | 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
226 | obsolete: pruned using prune
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
227 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
228 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
229 | x changeset: 2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
230 |/ user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
231 | date: Thu Jan 01 00:00:00 1970 +0000
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
232 | 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
233 | 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
234 | summary: c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
235 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
236 o changeset: 1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
237 | user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
238 | 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
239 | summary: c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
240 |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
241 @ changeset: 0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
242 user: test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
243 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
244 summary: c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
245
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
246 $ cd ..
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
247
5448
a0e0352f96e0 tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5447
diff changeset
248 $ 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
249 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
250 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
251 $ 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
252
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
253 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
254 ---------------------------------------------------
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
255
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
256 $ echo BB > B
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
257 $ hg amend -m 'c_B1'
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
258 $ hg log -G
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
259 @ changeset: 3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
260 | tag: tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
261 | parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
262 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
263 | 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
264 | summary: c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
265 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
266 o changeset: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
267 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
268 | 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
269 | summary: c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
270 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
271 o changeset: 0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
272 user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
273 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
274 summary: c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
275
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
276
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
277 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
278
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
279 $ 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
280 recreating 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
281 $ 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
282 recreating 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
283
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
284 actual rewind
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
285
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
286 $ 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
287 2 new content-divergent changesets
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
288 rewound to 1 changesets
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
289 $ hg debugobsolete
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
290 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
291 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
292 $ hg obslog --rev 'desc("c_B0")' --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
293 * b13b032065ef (4) c_B0
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
294 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
295 x 7e594302a05d (2) c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
296 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
297 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
298
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
299 $ hg obslog --rev 'desc("c_B0")'
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
300 * b13b032065ef (4) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
301 | 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
302 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
303 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
304
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
305 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
306 * changeset: 4:b13b032065ef
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
307 | tag: tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
308 | parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
309 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
310 | 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
311 | instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
312 | summary: c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
313 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
314 | @ changeset: 3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
315 |/ parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
316 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
317 | 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
318 | instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
319 | summary: c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
320 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
321 o changeset: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
322 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
323 | 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
324 | summary: c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
325 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
326 o changeset: 0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
327 user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
328 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
329 summary: c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
330
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
331 $ hg log -G --hidden
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
332 * changeset: 4:b13b032065ef
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
333 | tag: tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
334 | parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
335 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
336 | 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
337 | instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
338 | summary: c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
339 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
340 | @ changeset: 3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
341 |/ parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
342 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
343 | 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
344 | instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
345 | summary: c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
346 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
347 | x changeset: 2:7e594302a05d
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
348 |/ user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
349 | date: Thu Jan 01 00:00:00 1970 +0000
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
350 | 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
351 | 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
352 | summary: c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
353 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
354 o changeset: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
355 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
356 | 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
357 | summary: c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
358 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
359 o changeset: 0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
360 user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
361 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
362 summary: c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
363
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
364
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
365 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
366
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
367 $ 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
368 abort: rewind confused by divergence on 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
369 (solve divergence first or use "--as-divergence")
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
370 [255]
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
371 $ 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
372 recreating 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
373
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
374 cleanup
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
375
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
376 $ 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
377 1 changesets pruned
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
378 $ hg log -G
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
379 @ changeset: 3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
380 | tag: tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
381 | parent: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
382 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
383 | 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
384 | summary: c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
385 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
386 o changeset: 1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
387 | user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
388 | 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
389 | summary: c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
390 |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
391 o changeset: 0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
392 user: test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
393 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
394 summary: c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
395
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
396
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
397 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
398 ---------------------------------------------------------------
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
399
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
400 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
401
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
402 $ 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
403 rewinding 25c8f5ab0c3b to 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
404
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
405 actual rewind
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
406
5446
5fc54b8f3f84 tests: move default-date manipulation closer to the commands that need it
Anton Shestakov <av6@dwimlabs.net>
parents: 5445
diff changeset
407 $ 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
408 $ 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
409 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
410 (1 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
411 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
412 $ hg debugobsolete
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
413 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
414 7e594302a05d3769b27be88fc3cdfd39d7498498 b13b032065ef57a68d9a4cead38ba0f34f95529b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
415 b13b032065ef57a68d9a4cead38ba0f34f95529b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
416 7e594302a05d3769b27be88fc3cdfd39d7498498 837cd997bb05a27f8ed7d1ba3ff1e8422b9b464e 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
417 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
418 $ hg obslog --rev 'desc("c_B0")' --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
419 @ 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
420 |\
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
421 x | 25c8f5ab0c3b (3) c_B1
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
422 |/ 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
423 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
424 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
425 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
426 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
427 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
428
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
429 $ hg obslog --rev 'desc("c_B0")'
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
430 @ 837cd997bb05 (5) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
431 |\ 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
432 | | 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
433 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
434 x | 25c8f5ab0c3b (3) c_B1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
435 |/ 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
436 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
437 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
438
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
439 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
440 @ changeset: 5:837cd997bb05
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
441 | tag: tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
442 | parent: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
443 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
444 | 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
445 | summary: c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
446 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
447 o changeset: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
448 | user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
449 | 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
450 | summary: c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
451 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
452 o changeset: 0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
453 user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
454 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
455 summary: c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
456
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
457 $ hg log -G --hidden
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
458 @ changeset: 5:837cd997bb05
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
459 | tag: tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
460 | parent: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
461 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
462 | 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
463 | summary: c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
464 |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
465 | 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
466 |/ parent: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
467 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
468 | 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
469 | obsolete: pruned using prune
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
470 | summary: c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
471 |
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
472 | 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
473 |/ parent: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
474 | user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
475 | date: Thu Jan 01 00:00:00 1970 +0000
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
476 | 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
477 | summary: c_B1
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
478 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
479 | x changeset: 2:7e594302a05d
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
480 |/ user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
481 | date: Thu Jan 01 00:00:00 1970 +0000
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
482 | obsolete: meta-changed using rewind as 4:b13b032065ef
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
483 | 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
484 | 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
485 | summary: c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
486 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
487 o changeset: 1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
488 | user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
489 | 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
490 | summary: c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
491 |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
492 o changeset: 0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
493 user: test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
494 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
495 summary: c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
496
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
497 $ cd ..
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
498
5448
a0e0352f96e0 tests: move hg clone above case description in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5447
diff changeset
499 $ 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
500 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
501 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
502 $ 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
503
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
504 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
505 ---------------------
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
506
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
507 $ echo C > C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
508 $ 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
509 $ 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
510 $ 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
511 > y
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
512 > f
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
513 > d
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
514 > c
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
515 > EOF
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
516 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
517 adding C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
518 adding D
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
519 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
520 new file mode 100644
4777
ff452675566c test-compat: reverte output change from f802a75da585 (hg-5.1)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4722
diff changeset
521 examine changes to 'C'? [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
4777
ff452675566c test-compat: reverte output change from f802a75da585 (hg-5.1)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4722
diff changeset
525 record change 1/2 to 'C'? [Ynesfdaq?] f
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
526
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
527 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
528 new file mode 100644
4777
ff452675566c test-compat: reverte output change from f802a75da585 (hg-5.1)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4722
diff changeset
529 examine changes to 'D'? [Ynesfdaq?] d
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
530
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
531 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
532 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
533 $ hg log -G
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
534 @ changeset: 5:9576e80d6851
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
535 | tag: tip
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
536 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
537 | 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
538 | summary: c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
539 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
540 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
541 | parent: 2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
542 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
543 | 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
544 | summary: c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
545 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
546 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
547 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
548 | 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
549 | summary: c_B0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
550 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
551 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
552 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
553 | 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
554 | summary: c_A0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
555 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
556 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
557 user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
558 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
559 summary: c_ROOT
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
560
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
561 $ hg debugobsolete
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
562 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
563 $ 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
564 @ 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
565 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
566 | 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
567 |/
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
568 x 49fb7d900906 (3) c_CD0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
569 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
570
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
571 $ hg obslog --all
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
572 @ 9576e80d6851 (5) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
573 | 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
574 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
575 | o a0316c4c5417 (4) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
576 |/ 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
577 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
578 x 49fb7d900906 (3) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
579
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
580
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
581 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
582
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
583 $ hg rewind --from 'desc("c_CD0")' --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
584 rewinding a0316c4c5417 9576e80d6851 to 1 changesets: 49fb7d900906
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
585 $ 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
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
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
588 actual rewind
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
589
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
590 $ 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
591 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
592 (2 changesets obsoleted)
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
593 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
594 $ hg debugobsolete
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
595 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
596 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
597 9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'fold-id': 'eeda726b', 'fold-idx': '1', 'fold-size': '2', 'operation': 'rewind', 'user': 'test'}
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
598 a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'fold-id': 'eeda726b', 'fold-idx': '2', 'fold-size': '2', 'operation': 'rewind', 'user': 'test'}
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
599 $ 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
600 @ 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
601 |\
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
602 | \
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 | x | 9576e80d6851 (5) c_CD0
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
605 |/ / folded(meta, parent, content) as 4535d0af405c using rewind 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
606 | |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
607 | x a0316c4c5417 (4) c_CD0
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
608 |/ folded(meta, content) as 4535d0af405c using rewind 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
609 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
610 x 49fb7d900906 (3) c_CD0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
611 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
612 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
613
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
614 $ hg obslog
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
615 @ 4535d0af405c (6) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
616 |\ meta-changed(meta) from 49fb7d900906 using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
617 | | folded(meta, parent, content) from 9576e80d6851, a0316c4c5417 using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
618 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
619 | \
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
620 | |\
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
621 | x | 9576e80d6851 (5) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
622 |/ / 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
623 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
624 | x a0316c4c5417 (4) 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 49fb7d900906 (3) c_CD0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
628
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
629 $ hg log -G
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
630 @ changeset: 6:4535d0af405c
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
631 | tag: tip
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
632 | parent: 2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
633 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
634 | 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
635 | summary: c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
636 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
637 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
638 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
639 | 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
640 | summary: c_B0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
641 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
642 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
643 | user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
644 | 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
645 | summary: c_A0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
646 |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
647 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
648 user: test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
649 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
650 summary: c_ROOT
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
651
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
652
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
653 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
654 -------------
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
655
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
656 $ 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
657
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
658 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
659
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
660 $ hg rewind --from . --hidden --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
661 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851
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 --to '9576e80d6851+a0316c4c5417' --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 $ hg rewind --to '9576e80d6851' --hidden --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
666 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
667 $ hg rewind --to 'a0316c4c5417' --hidden --dry-run
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
668 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
669
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
670 $ hg rewind --to '9576e80d6851' --exact --hidden --dry-run
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
671 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
672 $ hg rewind --to 'a0316c4c5417' --exact --hidden --dry-run
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
673 rewinding 4535d0af405c to 2 changesets: a0316c4c5417 9576e80d6851
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
674
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
675 actual rewind
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
676
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
677 $ hg rewind --to '9576e80d6851+a0316c4c5417' --hidden
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
678 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
679 (1 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
680 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
681 $ hg debugobsolete
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
682 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
683 49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
684 9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'fold-id': 'eeda726b', 'fold-idx': '1', 'fold-size': '2', 'operation': 'rewind', 'user': 'test'}
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
685 a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'fold-id': 'eeda726b', 'fold-idx': '2', 'fold-size': '2', 'operation': 'rewind', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
686 a0316c4c54179357e71d068fb8884678ebc7c351 e76375de0bfc9c59bdd91067c901f3eed7d6c8fe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
687 9576e80d6851ce79cd535e2dc5fa01b444d89a39 95d72d892df7fec59107e10914c5729bdf03665f 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
688 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
689 $ hg obslog -r -2: --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
690 @ 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
691 |\
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
692 +---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
693 | | |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
694 x---+ 4535d0af405c (6) c_CD0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
695 |\| | 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
696 | | |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
697 | x | 9576e80d6851 (5) c_CD0
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
698 |/ / folded(meta, parent, content) as 4535d0af405c using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
699 | | 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
700 | |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
701 | x a0316c4c5417 (4) c_CD0
5599
ba8bc1b0acd2 rewind: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents: 5544
diff changeset
702 |/ folded(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
703 | 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
704 |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
705 x 49fb7d900906 (3) c_CD0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
706 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
707 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
708
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
709 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
710 @ 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
711 | tag: tip
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
712 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
713 | 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
714 | summary: c_CD0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
715 |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
716 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
717 | parent: 2:7e594302a05d
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
718 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
719 | 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
720 | 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
721 |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
722 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
723 | user: test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
724 | 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
725 | summary: c_B0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
726 |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
727 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
728 | user: test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
729 | 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
730 | summary: c_A0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
731 |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
732 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
733 user: test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
734 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
735 summary: c_ROOT
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
736
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
737 $ cd ..
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
738
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
739 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
740 =================
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
741
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
742 $ 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
743 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
744 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
745 $ 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
746
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
747 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
748 -----------------------------------
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
749
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
750 $ 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
751 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
752 $ 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
753 $ 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
754 1 new orphan changesets
5450
64ff1b7c0481 tests: remove unnecessary command flags from test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5449
diff changeset
755 $ 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
756 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
757 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
758 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
759 $ hg debugobsolete
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
760 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
761 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
762 $ 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
763 @ 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
764 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
765 | 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
766 | |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
767 | 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
768 | 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
769 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
770 x 7e594302a05d (2) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
771 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
772
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
773 $ hg obslog -r 'desc("c_A1")::'
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
774 @ a65fceb2324a (4) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
775 | 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
776 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
777 | o d952d1794ff6 (3) c_A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
778 | | 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
779 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
780 | x 579f120ba918 (1) c_A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
781 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
782 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
783
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
784 $ 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
785 @ 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
786 | tag: tip
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
787 | user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
788 | 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
789 | 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
790 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
791 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
792 | 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
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_A1
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: 0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
798 user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
799 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
800 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
801
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
802
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
803 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
804
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
805 $ 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
806 rewinding a65fceb2324a to 1 changesets: 7e594302a05d
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
807
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
808 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
809
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
810 $ 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
811 1 new orphan changesets
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
812 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
813 (1 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
814 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
815 $ hg debugobsolete
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
816 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
817 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
818 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
819 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
820 $ hg obslog --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
821 @ 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
822 |\
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
823 | x a65fceb2324a (4) c_B0
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
824 |/ 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
825 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
826 x 7e594302a05d (2) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
827 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
828 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
829
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
830 $ hg obslog
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
831 @ ac979e0aac4e (5) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
832 |\ 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
833 | | 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
834 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
835 | x a65fceb2324a (4) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
836 |/ 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
837 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
838 x 7e594302a05d (2) c_B0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
839
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
840 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
841 @ 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
842 | tag: tip
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
843 | 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
844 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
845 | 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
846 | instability: orphan
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
847 | 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
848 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
849 | 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
850 | | 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
851 | | user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
852 | | 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
853 | | 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
854 | |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
855 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
856 |/ user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
857 | 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
858 | 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
859 | 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
860 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
861 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
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 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
865
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
866
5801
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
867 $ hg rewind --hidden --to 'allpredecessors(desc("c_B0"))' --dry-run
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
868 abort: not rewinding, a65fceb2324a is a successor of 7e594302a05d
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
869 (pick only one of these changesets, possibly with --exact)
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
870 [255]
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
871 $ hg rewind --hidden --to 'allpredecessors(desc("c_B0"))' --dry-run --exact
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
872 abort: not rewinding, a65fceb2324a is a successor of 7e594302a05d
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
873 (pick only one of these changesets, possibly with --exact)
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
874 [255]
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
875 $ hg rewind --hidden --to 'allpredecessors(desc("c_B0"))' --dry-run --as-divergence
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
876 abort: not rewinding, a65fceb2324a is a successor of 7e594302a05d
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
877 (pick only one of these changesets, possibly with --exact)
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
878 [255]
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
879
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
880 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
881 --------------------
3872
bbc3cfdfe42b rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3871
diff changeset
882
5536
9f9f04301df0 tests: less words and less markup to maintain in test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5450
diff changeset
883 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
884
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
885 $ echo 'default-date = 4 0' >> $HGRCPATH
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
886 $ hg rewind --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
887 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
888 $ hg rewind
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
889 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
890 (1 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
891 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
892 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
893 @ 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
894 | tag: tip
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
895 | 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
896 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
897 | 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
898 | 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
899 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
900 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
901 | 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
902 | user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
903 | 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
904 | 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
905 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
906 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
907 user: test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
908 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
909 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
910
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
911 $ hg debugobsolete
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
912 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
913 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
914 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
915 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
916 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
917 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
918 $ hg obslog --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
919 @ 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
920 |\
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
921 | x ac979e0aac4e (5) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
922 |/| 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
923 | |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
924 x | a65fceb2324a (4) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
925 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
926 | 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
927 |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
928 x 7e594302a05d (2) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
929 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
930 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
931
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
932 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
933 --------------------------------------------------
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
934
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
935 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
936
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
937 $ hg rewind --hidden --to 'predecessors(.)' --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
938 rewinding d952d1794ff6 to 1 changesets: 579f120ba918
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
939 rewinding a5dd64adbb2a to 1 changesets: ac979e0aac4e
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
940
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
941 actual rewind
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
942
5446
5fc54b8f3f84 tests: move default-date manipulation closer to the commands that need it
Anton Shestakov <av6@dwimlabs.net>
parents: 5445
diff changeset
943 $ 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
944 $ hg rewind --hidden --to 'predecessors(.)'
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
945 rewound to 2 changesets
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
946 (2 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
947 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
948 $ hg debugobsolete
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
949 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
950 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
951 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
952 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
953 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
954 ac979e0aac4e63ccbbf88ac33942192942302766 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
955 579f120ba91885449adc92eedf48ef3569742cee 9c28b7ed3951fd15b20ab75449c1e0fdec445958 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
956 ac979e0aac4e63ccbbf88ac33942192942302766 3f2d8862657d20af331f0c0531f5228eef4d36c5 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
957 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 3f2d8862657d20af331f0c0531f5228eef4d36c5 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
958 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
959 $ hg obslog --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
960 @ 3f2d8862657d (8) c_B0
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
961 |\
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
962 x | a5dd64adbb2a (6) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
963 |\| 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
964 | |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
965 | x ac979e0aac4e (5) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
966 |/| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000)
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
967 | | 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
968 | |
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
969 x | a65fceb2324a (4) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
970 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
971 | 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
972 |
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
973 x 7e594302a05d (2) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
974 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
975 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
976
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
977 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
978 @ changeset: 8:3f2d8862657d
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
979 | tag: tip
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
980 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
981 | 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
982 | summary: c_B0
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
983 |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
984 o changeset: 7:9c28b7ed3951
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
985 | parent: 0:eba9c2249fe7
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
986 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
987 | 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
988 | summary: c_A0
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
989 |
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
990 o changeset: 0:eba9c2249fe7
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
991 user: test
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
992 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
993 summary: c_ROOT
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
994
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
995
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
996 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
997 ----------------------------------------------------
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
998
5544
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
999 target selection
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1000
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1001 $ hg rewind --from '.' --dry-run
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1002 rewinding 9c28b7ed3951 to 1 changesets: d952d1794ff6
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1003 rewinding 3f2d8862657d to 1 changesets: a5dd64adbb2a
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1004
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1005 actual rewind
0bb75a6c29b1 rewind: add a --dry-run flag
Anton Shestakov <av6@dwimlabs.net>
parents: 5536
diff changeset
1006
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1007 $ 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
1008 $ hg rewind --from '.'
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
1009 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
1010 (2 changesets obsoleted)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1011 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
1012 $ hg debugobsolete
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1013 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
1014 7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1015 7e594302a05d3769b27be88fc3cdfd39d7498498 ac979e0aac4e63ccbbf88ac33942192942302766 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1016 a65fceb2324ae1eb1231610193d24a5fa02c7c0e ac979e0aac4e63ccbbf88ac33942192942302766 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1017 a65fceb2324ae1eb1231610193d24a5fa02c7c0e a5dd64adbb2af2e646859b35d0d7128daa73cb2b 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1018 ac979e0aac4e63ccbbf88ac33942192942302766 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1019 579f120ba91885449adc92eedf48ef3569742cee 9c28b7ed3951fd15b20ab75449c1e0fdec445958 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1020 ac979e0aac4e63ccbbf88ac33942192942302766 3f2d8862657d20af331f0c0531f5228eef4d36c5 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1021 a5dd64adbb2af2e646859b35d0d7128daa73cb2b 3f2d8862657d20af331f0c0531f5228eef4d36c5 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1022 d952d1794ff657f5c2a82225d2e6307ed930b32f 9c28b7ed3951fd15b20ab75449c1e0fdec445958 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '11', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1023 d952d1794ff657f5c2a82225d2e6307ed930b32f fef4355b4cc9e2d3ddc154f60e4f4f1a286e9ce7 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1024 a5dd64adbb2af2e646859b35d0d7128daa73cb2b d36d6d267714108384f31762b6193c32f9f97514 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1025 3f2d8862657d20af331f0c0531f5228eef4d36c5 d36d6d267714108384f31762b6193c32f9f97514 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '6', 'operation': 'rewind', 'user': 'test'}
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1026 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
1027 $ hg obslog --no-origin
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1028 @ 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
1029 |\
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1030 x | 3f2d8862657d (8) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1031 |\| 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
1032 | |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1033 | x a5dd64adbb2a (6) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1034 |/| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000)
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1035 | | 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
1036 | |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1037 x | ac979e0aac4e (5) c_B0
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1038 |\| rewritten(meta, parent) as 3f2d8862657d using rewind by test (Thu Jan 01 00:00:05 1970 +0000)
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1039 | | 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
1040 | |
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1041 | x a65fceb2324a (4) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
1042 |/ meta-changed(meta) as a5dd64adbb2a using rewind by test (Thu Jan 01 00:00:04 1970 +0000)
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1043 | 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
1044 |
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1045 x 7e594302a05d (2) c_B0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4899
diff changeset
1046 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
1047 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
1048
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1049 $ hg log -G
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1050 @ 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
1051 | tag: tip
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1052 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1053 | 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
1054 | summary: c_B0
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1055 |
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1056 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
1057 | parent: 0:eba9c2249fe7
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1058 | user: test
4899
c982e7fb5e7a rewind: preserve date
Manuel Jacob <me@manueljacob.de>
parents: 4821
diff changeset
1059 | 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
1060 | summary: c_A1
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1061 |
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1062 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
1063 user: test
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1064 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
1065 summary: c_ROOT
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
1066
3873
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
1067 $ cd ..
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
1068
4820
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1069 Merge commits
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1070 =============
3873
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
1071
4820
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1072 $ 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
1073 $ 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
1074
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1075 $ hg up --clean .^
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1076 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
1077 $ echo foo > foo
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1078 $ 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
1079
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1080 $ hg merge
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1081 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
1082 (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
1083 $ 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
1084 $ hg st --change .
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1085 A B
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1086
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1087 $ echo bar > foo
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1088 $ 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
1089 $ hg st --change .
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1090 M foo
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 rewind --from .
5445
d0b0ef0ba094 rewind: past tense of rewind is rewound
Anton Shestakov <av6@dwimlabs.net>
parents: 5301
diff changeset
1094 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
1095 (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
1096 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
1097 $ hg st --change .
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1098 A B
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1099
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1100 $ 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
1101 @ 6: merge ()
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 +---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
1104 | |/
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1105 +---x 4: merge ()
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1106 | |/
4820
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1107 | 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
1108 | |
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1109 | ~
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1110 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
1111 |
7839720c7c75 rewind: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
1112 ~
4820
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1113
d842a4c6fc4a tests: separate rewinding of merge commits, temporarily drop an error case
Anton Shestakov <av6@dwimlabs.net>
parents: 4722
diff changeset
1114 $ cd ..
4821
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1115
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1116 Rewind --keep
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1117 =============
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1118
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1119 $ hg init rewind-keep
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1120 $ cd rewind-keep
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1121 $ echo root > root
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1122 $ hg ci -qAm 'root'
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1123
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1124 $ echo apple > a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1125 $ echo banana > b
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1126 $ hg ci -qAm initial
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1127
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1128 $ hg rm b
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1129 $ echo apricot > a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1130 $ echo coconut > c
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1131 $ hg add c
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1132 $ hg status
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1133 M a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1134 A c
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1135 R b
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1136 $ hg amend -m amended
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1137 $ hg glf --hidden
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1138 @ 2: amended (a c)
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 | 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
1141 |/
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1142 o 0: root (root)
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1143
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1144
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1145 Clean wdir
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1146
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1147 $ 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
1148 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
1149 (1 changesets obsoleted)
5275
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
1150 $ hg debugobsolete
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
1151 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
1152 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
1153 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
1154 $ 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
1155 @ b4c97fddc16a (3) initial
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1156 |\
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1157 x | 2ea5be2f8751 (2) amended
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1158 |/ 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
1159 |
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1160 x 30704102d912 (1) initial
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1161 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
1162 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
1163
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1164 $ hg obslog
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1165 @ b4c97fddc16a (3) initial
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1166 |\ 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
1167 | | 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
1168 | |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1169 x | 2ea5be2f8751 (2) amended
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1170 |/ 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
1171 |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1172 x 30704102d912 (1) initial
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
1173
4821
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1174 $ hg glf --hidden
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1175 @ 3: initial (a b)
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1176 |
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1177 | 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
1178 |/
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1179 | 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
1180 |/
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1181 o 0: root (root)
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 $ hg st
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1184 M a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1185 A c
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1186 R b
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1187
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1188 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
1189
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1190 $ echo avocado > a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1191 $ echo durian > d
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1192 $ hg st
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1193 M a
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1194 A c
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1195 R b
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1196 ? d
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1197
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1198 No rewinding without --keep
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1199
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1200 $ 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
1201 abort: uncommitted changes
5747
8e4f6354b316 tests: back out changeset b3d9e6c805d6
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1202 [255]
4821
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1203
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1204 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
1205
d8e36e60aea0 rewind: add --keep flag that "doesn't modify working directory"
Anton Shestakov <av6@dwimlabs.net>
parents: 4820
diff changeset
1206 $ 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
1207 abort: uncommitted changes
5747
8e4f6354b316 tests: back out changeset b3d9e6c805d6
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1208 [255]
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1209
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1210 $ cd ..
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1211
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1212 Extra cases related to folds
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1213 ============================
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1214
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1215 folding with a changeset created after the rewind target
5803
abbc021c6f68 tests: add underlines to test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5802
diff changeset
1216 --------------------------------------------------------
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1217
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1218 .. B0 ⇠\
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1219 .. | ⇠ AB2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1220 .. A0 ⇠ A1 ⇠/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1221
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1222 this simple test case introduces the idea of making rewind consider different
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1223 evolutions of fold components: "parent" evolution of A has more predecessors
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1224
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1225 $ hg init extra-fold-case-1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1226 $ cd extra-fold-case-1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1227
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1228 $ echo R > R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1229 $ hg ci -qAm R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1230 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1231 $ hg ci -qAm A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1232 $ hg amend -m A1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1233 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1234 $ hg ci -qAm B0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1235 $ hg fold -r 'desc("A1")::' -m AB2 --exact -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1236
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1237 $ hg glhf --hidden
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1238 @ 4:7f9a5314ef94 AB2 (A B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1239 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1240 | x 3:16429ed4b6cb B0 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1241 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1242 | x 2:3748b241cad8 A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1243 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1244 | x 1:fa8956746c52 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1245 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1246 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1247
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1248
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1249 target selection
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1250
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1251 when rewinding from a fold, rewind to all of its components (at various points
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1252 in their evolution) to not lose work
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1253
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1254 $ hg rewind --hidden --to 'desc("A0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1255 rewinding 7f9a5314ef94 to 2 changesets: fa8956746c52 16429ed4b6cb
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1256 $ hg rewind --hidden --to 'desc("B0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1257 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 16429ed4b6cb
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1258 $ hg rewind --from 'desc("AB2")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1259 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 16429ed4b6cb
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1260
5801
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
1261 $ hg rewind --hidden --to 'allpredecessors(desc("AB2"))' --dry-run
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
1262 abort: not rewinding, 3748b241cad8 is a successor of fa8956746c52
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
1263 (pick only one of these changesets, possibly with --exact)
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
1264 [255]
e8a43f5929f6 rewind: abort when trying to rewind to multiple unrelated predecessors
Anton Shestakov <av6@dwimlabs.net>
parents: 5800
diff changeset
1265
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1266 $ cd ..
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1267
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1268 folding with a changeset we rebased onto
5803
abbc021c6f68 tests: add underlines to test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5802
diff changeset
1269 ----------------------------------------
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1270
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1271 .. A0 ⇠ A1 ⇠\
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1272 .. | ⇠ AB2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1273 .. B0 ⇠/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1274
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1275 similar to the previous case, but this time evolution of A has more
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1276 predecessors and at some point starts to be based on B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1277
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1278 $ hg init extra-fold-case-2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1279 $ cd extra-fold-case-2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1280
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1281 $ echo R > R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1282 $ hg ci -qAm R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1283 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1284 $ hg ci -qAm A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1285 $ hg up 'desc("R")' -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1286 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1287 $ hg ci -qAm B0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1288 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1289 $ hg ci -qAm A1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1290 $ hg prune -r 'desc("A0")' -s 'desc("A1")'
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1291 1 changesets pruned
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1292
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1293 $ hg fold -r 'desc("B0")::' -m AB2 --exact -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1294
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1295 $ hg glhf --hidden
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1296 @ 4:1988e9fe9517 AB2 (A B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1297 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1298 | x 3:7175ff74409b A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1299 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1300 | x 2:d6ed1d624918 B0 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1301 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1302 | x 1:fa8956746c52 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1303 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1304 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1305
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1306
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1307 target selection
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1308
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1309 when rewinding from a fold, rewind to all of its components (at various points
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1310 in their evolution) to not lose work
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1311
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1312 $ hg rewind --hidden --to 'desc("A0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1313 rewinding 1988e9fe9517 to 2 changesets: fa8956746c52 d6ed1d624918
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1314 $ hg rewind --hidden --to 'desc("B0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1315 rewinding 1988e9fe9517 to 2 changesets: d6ed1d624918 7175ff74409b
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1316 $ hg rewind --from 'desc("AB2")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1317 rewinding 1988e9fe9517 to 2 changesets: d6ed1d624918 7175ff74409b
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1318
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1319 $ cd ..
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1320
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1321 folding with a changeset that rebased on us
5803
abbc021c6f68 tests: add underlines to test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5802
diff changeset
1322 -------------------------------------------
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1323
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1324 .. B0 ⇠⇠⇠⇠ B1 ⇠\
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1325 .. | | ⇠ AB2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1326 .. | A0 ⇠ A1 ⇠/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1327
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1328 now evolutions of A and B have the same amount of changesets, but at point 0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1329 they aren't yet related
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1330
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1331 $ hg init extra-fold-case-3
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1332 $ cd extra-fold-case-3
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1333
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1334 $ echo R > R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1335 $ hg ci -qAm R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1336 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1337 $ hg ci -qAm A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1338 $ hg amend -m A1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1339 $ hg up 'desc("R")' -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1340 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1341 $ hg ci -qAm B0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1342 $ hg up 'desc("A1")' -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1343 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1344 $ hg ci -qAm B1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1345 $ hg prune -r 'desc("B0")' -s 'desc("B1")'
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1346 1 changesets pruned
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1347
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1348 $ hg fold -r 'desc("A1")::' -m AB2 --exact -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1349
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1350 $ hg glhf --hidden
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1351 @ 5:7f9a5314ef94 AB2 (A B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1352 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1353 | x 4:fe7a7d317e16 B1 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1354 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1355 +---x 3:d6ed1d624918 B0 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1356 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1357 | x 2:3748b241cad8 A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1358 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1359 | x 1:fa8956746c52 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1360 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1361 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1362
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1363
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1364 target selection
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1365
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1366 $ hg rewind --hidden --to 'desc("A0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1367 rewinding 7f9a5314ef94 to 2 changesets: fa8956746c52 fe7a7d317e16
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1368 $ hg rewind --hidden --to 'desc("B0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1369 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 d6ed1d624918
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1370 $ hg rewind --hidden --to 'desc("A1")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1371 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 fe7a7d317e16
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1372 $ hg rewind --hidden --to 'desc("B1")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1373 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 fe7a7d317e16
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1374 $ hg rewind --from 'desc("AB2")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1375 rewinding 7f9a5314ef94 to 2 changesets: 3748b241cad8 fe7a7d317e16
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1376
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1377 actual rewind
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1378
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1379 $ hg rewind --hidden --to 'desc("A0")'
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1380 1 new orphan changesets
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1381 rewound to 2 changesets
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1382 (1 changesets obsoleted)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1383 working directory is now at e492d2f9be46
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1384
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1385 after rewind to A0:
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1386 - A0' and B1' are successors to AB2 (split using rewind)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1387 - A0' is a successor of A0 (operation: rewind)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1388 - A0' is a child of R (just like A0)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1389 - B1' is a successor of B1 (operation: rewind)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1390 - B1' is a child of A1 (just like B1), and therefore an orphan
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1391
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1392 $ hg obslog -a
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1393 o 54b340ce1d87 (6) A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1394 |\ split(description, meta, parent, content) from 7f9a5314ef94 using rewind by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1395 | | meta-changed(meta) from fa8956746c52 using rewind by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1396 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1397 +---@ e492d2f9be46 (7) B1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1398 | | | split(description, meta, parent, content) from 7f9a5314ef94 using rewind by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1399 | | | meta-changed(meta) from fe7a7d317e16 using rewind by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1400 | | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1401 x---+ 7f9a5314ef94 (5) AB2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1402 | | | folded(description, parent, content) from 3748b241cad8, fe7a7d317e16 using fold by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1403 | | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1404 x | | 3748b241cad8 (2) A1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1405 |/ / reworded(description) from fa8956746c52 using amend by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1406 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1407 | x fe7a7d317e16 (4) B1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1408 | | rewritten(description, parent) from d6ed1d624918 using prune by test (Thu Jan 01 00:00:06 1970 +0000)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1409 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1410 | x d6ed1d624918 (3) B0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1411 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1412 x fa8956746c52 (1) A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1413
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1414 $ hg glhf
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1415 @ 7:e492d2f9be46 B1 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1416 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1417 | o 6:54b340ce1d87 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1418 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1419 x | 2:3748b241cad8 A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1420 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1421 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1422
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1423
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1424 $ hg debugobsolete --exclusive -r 'first(head())'
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1425 7f9a5314ef94f5856ee90661268194cc5ce9b332 54b340ce1d87f3593fd9de2a742e7b444e5136ed e492d2f9be46b73c0cfa51709e92db864b8f3ed9 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '15', 'operation': 'rewind', 'user': 'test'}
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1426 fa8956746c5294ce3351309133b450c5930f30f5 54b340ce1d87f3593fd9de2a742e7b444e5136ed 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1427 $ hg debugobsolete --exclusive -r 'last(head())'
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1428 7f9a5314ef94f5856ee90661268194cc5ce9b332 54b340ce1d87f3593fd9de2a742e7b444e5136ed e492d2f9be46b73c0cfa51709e92db864b8f3ed9 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '15', 'operation': 'rewind', 'user': 'test'}
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1429 fe7a7d317e168a15e8aa43131b54d3256443d728 e492d2f9be46b73c0cfa51709e92db864b8f3ed9 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1430
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1431 $ cd ..
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1432
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1433 simple fold with a missing part
5803
abbc021c6f68 tests: add underlines to test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5802
diff changeset
1434 -------------------------------
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1435
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1436 .. B0 ⇠ (B1) ⇠\
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1437 .. | | ⇠ AB2
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1438 .. A0 ⇠ A1 ⇠/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1439
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1440 a stack was rewritten, but then a part of it became unknown locally
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1441
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1442 $ hg init extra-fold-case-4
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1443 $ cd extra-fold-case-4
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1444
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1445 $ echo R > R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1446 $ hg ci -qAm R
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1447 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1448 $ hg ci -qAm A0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1449 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1450 $ hg ci -qAm B0
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1451 $ hg up 'desc("R")' -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1452 $ echo A > A
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1453 $ hg ci -qAm A1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1454 $ echo B > B
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1455 $ hg ci -qAm B1
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1456 $ hg prune -r 'desc("A0")+desc("B0")' -s 'desc("A1")+desc("B1")' --biject
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1457 2 changesets pruned
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1458
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1459 $ hg fold -r 'desc("A1") + desc("B1")' -m AB2 --exact -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1460
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1461 $ hg glhf --hidden
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1462 @ 5:1988e9fe9517 AB2 (A B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1463 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1464 | x 4:25210d726f52 B1 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1465 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1466 | x 3:9c76368ab336 A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1467 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1468 | x 2:a07c12c45197 B0 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1469 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1470 | x 1:fa8956746c52 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1471 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1472 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1473
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1474
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1475 target selection
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1476
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1477 $ hg rewind --hidden --to 'desc("A0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1478 rewinding 1988e9fe9517 to 2 changesets: fa8956746c52 25210d726f52
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1479 $ hg rewind --hidden --to 'desc("A1")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1480 rewinding 1988e9fe9517 to 2 changesets: 9c76368ab336 25210d726f52
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1481 $ hg rewind --hidden --to 'desc("B1")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1482 rewinding 1988e9fe9517 to 2 changesets: 9c76368ab336 25210d726f52
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1483
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1484 because B0 is a child of A0, we use A0 instead of A1 unless --exact is given
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1485
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1486 XXX the semantic of --exact might need clarification here,
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1487 XXX for example, shouln't --exact make sure we only rewind to the `--to` target ?
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1488
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1489 $ hg rewind --hidden --to 'desc("B0")' --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1490 rewinding 1988e9fe9517 to 2 changesets: fa8956746c52 a07c12c45197
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1491 $ hg rewind --hidden --to 'desc("B0")' --exact --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1492 rewinding 1988e9fe9517 to 2 changesets: a07c12c45197 9c76368ab336
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1493
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1494 stripping one of the fold parts
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1495
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1496 $ hg strip --config extensions.strip= -r 'desc("B1")' --hidden -q
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1497
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1498 $ hg glhf --hidden
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1499 @ 4:1988e9fe9517 AB2 (A B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1500 |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1501 | x 3:9c76368ab336 A1 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1502 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1503 | x 2:a07c12c45197 B0 (B)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1504 | |
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1505 | x 1:fa8956746c52 A0 (A)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1506 |/
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1507 o 0:167e04d3d1b2 R (R)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1508
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1509
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1510 target selection
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1511
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1512 the obvious challenge here is to somehow work around the missing fold
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1513 component, but we can't do much because it is one of the latest predecessors of
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1514 AB2 fold
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1515
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1516 in future we might have a way to allow rewind to skip changesets unknown
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1517 locally and still proceed (and lose the least amount of work possible)
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1518
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1519 $ hg rewind --hidden --to 'desc("A0")+desc("B0")' --exact --dry-run
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1520 rewinding 1988e9fe9517 to 2 changesets: fa8956746c52 a07c12c45197
5802
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1521 $ hg rewind --hidden --to 'desc("A0")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1522 abort: not rewinding, some predecessors are unknown locally: 25210d726f52
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1523 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1524 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1525 $ hg rewind --hidden --to 'desc("A1")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1526 abort: not rewinding, some predecessors are unknown locally: 25210d726f52
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1527 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1528 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1529
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1530 XXX the semantic of --exact might need clarification here,
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1531 XXX for example, shouln't --exact make sure we only rewind to the `--to` target ?
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1532
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1533 $ hg rewind --hidden --to 'desc("A1")' --exact --dry-run
5802
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1534 abort: not rewinding, some predecessors are unknown locally: 25210d726f52
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1535 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1536 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1537 $ hg rewind --from 'desc("AB2")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1538 abort: not rewinding, some predecessors are unknown locally: 25210d726f52
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1539 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1540 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1541 $ hg rewind --from 'desc("AB2")' --exact --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1542 abort: not rewinding, some predecessors are unknown locally: 25210d726f52
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1543 (try selecting all changesets to rewind to manually, possibly with --exact)
5800
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1544 [255]
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1545
668817e8c007 rewind: walk obsmarkers and add more targets to rewind to
Anton Shestakov <av6@dwimlabs.net>
parents: 5666
diff changeset
1546 $ cd ..
5802
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1547
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1548 split and then fold with a missing part
5803
abbc021c6f68 tests: add underlines to test-rewind.t
Anton Shestakov <av6@dwimlabs.net>
parents: 5802
diff changeset
1549 ---------------------------------------
5802
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1550
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1551 .. /⇠ (C1) ⇠\
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1552 .. BC0 ⇠ | \
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1553 .. | \⇠ B1 ⇠ AC2
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1554 .. A0 ⇠⇠⇠⇠⇠⇠⇠⇠⇠⇠⇠/
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1555
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1556 here we have a case when walking successors and then predecessors of target
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1557 revisions just once might not be enough, because it's a more complex DAG with a
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1558 changeset missing from local repo
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1559
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1560 $ hg init extra-fold-case-5
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1561 $ cd extra-fold-case-5
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1562
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1563 $ echo R > R
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1564 $ hg ci -qAm R
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1565 $ echo A > A
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1566 $ hg ci -qAm A0
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1567 $ echo B > B
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1568 $ echo C > C
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1569 $ hg ci -qAm BC0
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1570 $ hg up 'desc("A0")' -q
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1571 $ echo B > B
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1572 $ hg ci -qAm B1
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1573 $ echo C > C
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1574 $ hg ci -qAm C1
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1575
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1576 $ hg prune -r 'desc("BC0")' -s 'desc("B1")+desc("C1")' --split
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1577 1 changesets pruned
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1578
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1579 $ hg up 'desc("R")' -q
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1580 $ echo A > A
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1581 $ echo C > C
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1582 $ hg ci -qAm AC2
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1583
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1584 $ hg prune -r 'desc("A0")+desc("C1")' -s 'desc("AC2")' --fold
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1585 2 changesets pruned
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1586 1 new orphan changesets
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1587
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1588 $ hg glhf --hidden
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1589 @ 5:9ccaac2e5fbb AC2 (A C)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1590 |
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1591 | x 4:2e4ab803d8ae C1 (C)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1592 | |
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1593 | * 3:44774eafdc1c B1 (B)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1594 | |
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1595 | | x 2:883d75400657 BC0 (B C)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1596 | |/
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1597 | x 1:fa8956746c52 A0 (A)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1598 |/
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1599 o 0:167e04d3d1b2 R (R)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1600
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1601
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1602 target selection
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1603
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1604 $ hg rewind --hidden --to 'desc("A0")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1605 rewinding 9ccaac2e5fbb to 2 changesets: fa8956746c52 2e4ab803d8ae
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1606 $ hg rewind --hidden --to 'desc("BC0")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1607 rewinding 44774eafdc1c to 1 changesets: 883d75400657
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1608 rewinding 9ccaac2e5fbb to 2 changesets: fa8956746c52 883d75400657
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1609 $ hg rewind --from 'desc("AC2")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1610 rewinding 9ccaac2e5fbb to 2 changesets: fa8956746c52 2e4ab803d8ae
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1611
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1612 stripping a component of AC2 fold
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1613
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1614 $ hg strip --config extensions.strip= --hidden -r 'desc("C1")' -q
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1615 warning: ignoring unknown working parent 9ccaac2e5fbb!
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1616
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1617 target selection
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1618
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1619 at the moment, there's not much that we can do here because of missing C1
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1620
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1621 in future we might have a way to allow rewind to skip changesets unknown
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1622 locally and still proceed (and lose the least amount of work possible)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1623
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1624 XXX the semantic of --exact might need clarification here,
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1625 XXX for example, shouln't --exact make sure we only rewind to the `--to` target ?
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1626
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1627 $ hg rewind --hidden --to 'desc("A0")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1628 abort: not rewinding, some predecessors are unknown locally: 2e4ab803d8ae
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1629 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1630 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1631 $ hg rewind --hidden --to 'desc("BC0")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1632 rewinding 44774eafdc1c to 1 changesets: 883d75400657
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1633 rewinding 9ccaac2e5fbb to 2 changesets: fa8956746c52 883d75400657
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1634 $ hg rewind --from 'desc("AC2")' --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1635 abort: not rewinding, some predecessors are unknown locally: 2e4ab803d8ae
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1636 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1637 [255]
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1638 $ hg rewind --from 'desc("AC2")' --exact --dry-run
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1639 abort: not rewinding, some predecessors are unknown locally: 2e4ab803d8ae
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1640 (try selecting all changesets to rewind to manually, possibly with --exact)
84efc2e92228 rewind: abort if some parts of a fold are unknown locally
Anton Shestakov <av6@dwimlabs.net>
parents: 5801
diff changeset
1641 [255]