author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Sat, 01 Feb 2020 12:50:10 +0100 | |
changeset 5111 | 1fe3f7ffb462 |
parent 5079 | 1f92a6aa40d6 |
child 5113 | a66c9fc9c503 |
permissions | -rw-r--r-- |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 |
$ . $TESTDIR/testlib/common.sh |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 |
setup |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 |
$ cat >> $HGRCPATH <<EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 |
> [defaults] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 |
> fold=-d "0 0" |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
> [extensions] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 |
> evolve= |
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
10 |
> [alias] |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
11 |
> glog = log -GT "{rev}: {desc}" |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
12 |
> glf = log -GT "{rev}: {desc} ({files})" |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 |
> [ui] |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
14 |
> logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase}) {bookmarks}\n' |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 |
> EOF |
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
16 |
$ mkcommit() { |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
17 |
> echo "$1" > "$1" |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
18 |
> hg add "$1" |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
19 |
> hg ci -qm "$1" |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
20 |
> } |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 |
$ hg init fold-tests |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 |
$ cd fold-tests/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 |
$ hg debugbuilddag .+3:branchpoint+4*branchpoint+2 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 |
$ hg up 'desc("r7")' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
27 |
$ hg bookmark bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 |
$ hg log -G |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 |
o 10 - a8407f9a3dc1 r10 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 |
o 9 - 529dfc5bb875 r9 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 |
o 8 - abf57d94268b r8 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 |
| |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
35 |
| @ 7 - 4de32a90b66c r7 [debugbuilddag] (draft) bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 |
| o 6 - f69452c5b1af r6 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 |
| o 5 - c8d03c1b5e94 r5 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 |
| o 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 |
|/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 |
Test various error case |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 |
|
2785
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
54 |
$ hg fold --exact null:: |
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
55 |
abort: cannot fold the null revision |
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
56 |
(no changeset checked out) |
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
57 |
[255] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 |
$ hg fold |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 |
abort: no revisions specified |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 |
$ hg fold --from |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 |
abort: no revisions specified |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 |
$ hg fold . |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 |
abort: must specify either --from or --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 |
$ hg fold --from . --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 |
abort: cannot use both --from and --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 |
$ hg fold --from . |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 |
single revision specified, nothing to fold |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 |
[1] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 |
$ hg fold '0::(7+10)' --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 |
abort: cannot fold non-linear revisions (multiple heads given) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 |
$ hg fold -r 4 -r 6 --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 |
abort: cannot fold non-linear revisions (multiple roots given) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 |
$ hg fold --from 10 1 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 |
abort: cannot fold non-linear revisions |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 |
(given revisions are unrelated to parent of working directory) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 |
$ hg fold --exact -r "4 and not 4" |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 |
abort: specified revisions evaluate to an empty set |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 |
(use different revision arguments) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 |
$ hg phase --public 0 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 |
$ hg fold --from -r 0 |
2780
58e4b51ee902
prefetc: point at the offending changeset when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2779
diff
changeset
|
89 |
abort: cannot fold public changesets: 1ea73414a91b |
2779
f51efb2bb8c9
precheck: point to 'phase' help when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2778
diff
changeset
|
90 |
(see 'hg help phases' for details) |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 |
Test actual folding |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
94 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 |
$ hg fold --from -r 'desc("r5")' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
96 |
3 changesets folded |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
97 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
98 |
|
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
99 |
Checking whether the bookmarks are moved or not |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
100 |
|
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
101 |
$ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
102 |
@ 11 - 198b5c405d01 r5 [debugbuilddag] (draft) bm1 |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
103 |
| |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
104 |
| o 10 - a8407f9a3dc1 r10 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
105 |
| | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
106 |
| o 9 - 529dfc5bb875 r9 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
107 |
| | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
108 |
| o 8 - abf57d94268b r8 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
109 |
| | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
110 |
o | 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
111 |
|/ |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
112 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
113 |
| |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
114 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
115 |
| |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
116 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
117 |
| |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
118 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
119 |
|
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
120 |
(test inherited from test-evolve.t) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
121 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
122 |
$ hg fold --from 6 # want to run hg fold 6 |
3663
54a469cd5b26
test: update output to match upstream
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3451
diff
changeset
|
123 |
abort: hidden revision '6' was rewritten as: 198b5c405d01! |
54a469cd5b26
test: update output to match upstream
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3451
diff
changeset
|
124 |
(use --hidden to access hidden revisions) |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
125 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 |
$ hg log -G |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
128 |
@ 11 - 198b5c405d01 r5 [debugbuilddag] (draft) bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
129 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
130 |
| o 10 - a8407f9a3dc1 r10 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
131 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 |
| o 9 - 529dfc5bb875 r9 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
133 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 |
| o 8 - abf57d94268b r8 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
135 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 |
o | 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
137 |
|/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
138 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
139 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
140 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
143 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
147 |
test fold --exact |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
148 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
149 |
$ hg fold --exact 'desc("r8") + desc("r10")' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
150 |
abort: cannot fold non-linear revisions (multiple roots given) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
151 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
152 |
$ hg fold --exact 'desc("r8")::desc("r10")' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
153 |
3 changesets folded |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 |
$ hg log -G |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
155 |
o 12 - b568edbee6e0 r8 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
156 |
| |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
157 |
| @ 11 - 198b5c405d01 r5 [debugbuilddag] (draft) bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
158 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
159 |
| o 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
160 |
|/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
161 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
162 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
163 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
164 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
165 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
166 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
167 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
168 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
169 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
170 |
Test allow unstable |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
171 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
172 |
$ echo a > a |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
173 |
$ hg add a |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
174 |
$ hg commit '-m r11' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
175 |
$ hg up '.^' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
176 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
177 |
(leaving bookmark bm1) |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
178 |
$ hg log -G |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
179 |
o 13 - 14d0e0da8e91 r11 [test] (draft) bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
180 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
181 |
| o 12 - b568edbee6e0 r8 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
182 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
183 |
@ | 11 - 198b5c405d01 r5 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
184 |
| | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
185 |
o | 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
186 |
|/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
187 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
188 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
189 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
190 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
191 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
192 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
193 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
194 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
195 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
196 |
$ cat << EOF >> .hg/hgrc |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
197 |
> [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
198 |
> evolution = createmarkers, allnewcommands |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
199 |
> EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
200 |
$ hg fold --from 'desc("r4")' |
2784
d17d193c4145
precheck: update the orphan message to something me generic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2783
diff
changeset
|
201 |
abort: fold will orphan 1 descendants |
2783
3e9c3119410a
precheck: point to the instability doc when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2780
diff
changeset
|
202 |
(see 'hg help evolution.instability') |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
203 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
204 |
$ hg fold --from 'desc("r3")::desc("r11")' |
2784
d17d193c4145
precheck: update the orphan message to something me generic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2783
diff
changeset
|
205 |
abort: fold will orphan 1 descendants |
2783
3e9c3119410a
precheck: point to the instability doc when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2780
diff
changeset
|
206 |
(see 'hg help evolution.instability') |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
207 |
[255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
208 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
209 |
test --user variant |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
210 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
211 |
$ cat << EOF >> .hg/hgrc |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
212 |
> [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
213 |
> evolution = createmarkers, allnewcommands |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
214 |
> EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
215 |
$ cat << EOF >> .hg/hgrc |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
216 |
> [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
217 |
> evolution = all |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
218 |
> EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
219 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
220 |
$ hg fold --exact 'desc("r5") + desc("r11")' --user 'Victor Rataxes <victor@rhino.savannah>' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
221 |
2 changesets folded |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
222 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
223 |
$ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
224 |
@ 14 - 29b470a33594 r5 [Victor Rataxes <victor@rhino.savannah>] (draft) bm1 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
225 |
| |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
226 |
| o 12 - b568edbee6e0 r8 [debugbuilddag] (draft) |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
227 |
| | |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
228 |
o | 4 - bebd167eb94d r4 [debugbuilddag] (draft) |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
229 |
|/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
230 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
231 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
232 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
233 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
234 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
235 |
| |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
236 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
237 |
|
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
238 |
|
2768
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
239 |
$ hg fold --from 'desc("r4")' -U |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
240 |
2 changesets folded |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
241 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
242 |
$ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
243 |
@ 15 - 91880abed0f2 r4 [test] (draft) bm1 |
2768
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
244 |
| |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
245 |
| o 12 - b568edbee6e0 r8 [debugbuilddag] (draft) |
2768
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
246 |
|/ |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
247 |
o 3 - 2dc09a01254d r3 [debugbuilddag] (draft) |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
248 |
| |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
249 |
o 2 - 01241442b3c2 r2 [debugbuilddag] (draft) |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
250 |
| |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
251 |
o 1 - 66f7d451a68b r1 [debugbuilddag] (draft) |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
252 |
| |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
253 |
o 0 - 1ea73414a91b r0 [debugbuilddag] (public) |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
254 |
|
4340
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
255 |
Test order of proposed commit message |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
256 |
|
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
257 |
$ hg fold --exact --hidden -r 4 -r 5 -r 6 \ |
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
258 |
> --config experimental.evolution.allowdivergence=yes |
4340
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
259 |
2 new content-divergent changesets |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
260 |
3 changesets folded |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
261 |
$ hg log -r tip -T '{desc}' |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
262 |
r4 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
263 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
264 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
265 |
r5 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
266 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
267 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
268 |
r6 (no-eol) |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
269 |
$ hg fold --exact --hidden -r 6 -r 4 -r 5 \ |
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
270 |
> --config experimental.evolution.allowdivergence=yes |
4340
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
271 |
3 changesets folded |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
272 |
$ hg log -r tip -T '{desc}' |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
273 |
r4 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
274 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
275 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
276 |
r5 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
277 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
278 |
|
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
279 |
r6 (no-eol) |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
280 |
|
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
281 |
$ cd .. |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
282 |
|
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
283 |
One merge commit |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
284 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
285 |
$ hg init fold-a-merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
286 |
$ cd fold-a-merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
287 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
288 |
$ mkcommit zebra |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
289 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
290 |
$ hg up null |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
291 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
292 |
$ mkcommit apple |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
293 |
$ mkcommit banana |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
294 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
295 |
$ hg merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
296 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
297 |
(branch merge, don't forget to commit) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
298 |
$ hg ci -m merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
299 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
300 |
$ mkcommit coconut |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
301 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
302 |
$ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
303 |
@ 4: coconut (coconut) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
304 |
| |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
305 |
o 3: merge () |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
306 |
|\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
307 |
| o 2: banana (banana) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
308 |
| | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
309 |
| o 1: apple (apple) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
310 |
| |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
311 |
o 0: zebra (zebra) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
312 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
313 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
314 |
now we merge some of the fruits |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
315 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
316 |
$ hg fold --exact -r 'desc("banana")::desc("coconut")' -m 'banana+coconut in a merge with zebra' |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
317 |
3 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
318 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
319 |
$ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
320 |
@ 5: banana+coconut in a merge with zebra (banana coconut) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
321 |
|\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
322 |
| o 1: apple (apple) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
323 |
| |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
324 |
o 0: zebra (zebra) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
325 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
326 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
327 |
let's go even further: zebra becomes a parent of the squashed fruit commit |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
328 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
329 |
$ hg fold --from -r 'desc("apple")' -m 'apple+banana+coconut is a child of zebra' |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
330 |
2 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
331 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
332 |
$ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
333 |
@ 6: apple+banana+coconut is a child of zebra (apple banana coconut) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
334 |
| |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
335 |
o 0: zebra (zebra) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
336 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
337 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
338 |
make sure zebra exists at tip and has expected contents |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
339 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
340 |
$ hg cat -r tip zebra |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
341 |
zebra |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
342 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
343 |
$ cd .. |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
344 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
345 |
Multiple merge commits |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
346 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
347 |
$ hg init fold-many-merges |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
348 |
$ cd fold-many-merges |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
349 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
350 |
$ hg debugbuilddag '+3 *3 /3 /4 /4' |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
351 |
$ hg glog |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
352 |
o 6: r6 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
353 |
|\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
354 |
| o 5: r5 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
355 |
| |\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
356 |
| | o 4: r4 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
357 |
| |/| |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
358 |
| | o 3: r3 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
359 |
| | | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
360 |
o | | 2: r2 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
361 |
|/ / |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
362 |
o / 1: r1 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
363 |
|/ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
364 |
o 0: r0 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
365 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
366 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
367 |
cannot fold 5 and 6 because they have 3 external parents in total: 1, 2, 4 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
368 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
369 |
$ hg fold --exact -r 5:6 -m r5+r6 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
370 |
abort: cannot fold revisions that merge with more than one external changeset (not in revisions) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
371 |
[255] |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
372 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
373 |
now many of the parents are included in the revisions to fold, only 0 and 3 are external |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
374 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
375 |
$ hg fold --exact -r 1+2+4+5+6 -m r1+r2+r4+r5+r6 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
376 |
5 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
377 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
378 |
$ hg glog |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
379 |
o 7: r1+r2+r4+r5+r6 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
380 |
|\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
381 |
| o 3: r3 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
382 |
|/ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
383 |
o 0: r0 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
384 |
|
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
385 |
$ cd .. |
4831
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
386 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
387 |
Fold should respect experimental.evolution.allowdivergence option |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
388 |
https://bz.mercurial-scm.org/show_bug.cgi?id=5817 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
389 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
390 |
$ hg init issue5817 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
391 |
$ cd issue5817 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
392 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
393 |
$ echo A > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
394 |
$ hg ci -qAm A |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
395 |
$ echo B > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
396 |
$ hg ci -m B |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
397 |
$ echo C > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
398 |
$ hg ci -m C |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
399 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
400 |
$ hg fold --exact -r 'desc("A")::desc("B")' -m 'first fold' |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
401 |
1 new orphan changesets |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
402 |
2 changesets folded |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
403 |
|
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
404 |
fold aborts here because divergence is not allowed |
4831
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
405 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
406 |
$ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
407 |
> --config experimental.evolution.allowdivergence=no |
5079
1f92a6aa40d6
evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
4832
diff
changeset
|
408 |
abort: fold of 4b34ecfb0d56 creates content-divergence with fcfd42a7fa46 |
1f92a6aa40d6
evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
4832
diff
changeset
|
409 |
(add --verbose for details or see 'hg help evolution.instability') |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
410 |
[255] |
4831
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
411 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
412 |
but if we allow divergence, this should work and should create new content-divergent changesets |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
413 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
414 |
$ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
415 |
> --config experimental.evolution.allowdivergence=yes |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
416 |
2 new content-divergent changesets |
4831
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
417 |
2 changesets folded |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
418 |
|
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
419 |
$ cd .. |