annotate tests/test-rewind.t @ 5314:e6e92835d42d mercurial-5.0

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