Mercurial > evolve
annotate tests/test-fold.t @ 6196:4a837da84f5f
fixup: allow to be aborted using hg abort
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 06 Mar 2022 17:44:11 +0300 |
parents | 442771901e01 |
children | 4feea1ecde1c |
rev | line source |
---|---|
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 > [extensions] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 > evolve= |
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
8 > [alias] |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
9 > glog = log -GT "{rev}: {desc}" |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
10 > 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
|
11 > [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
|
12 > 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
|
13 > EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 $ 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
|
16 $ 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
|
17 $ 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
|
18 $ 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
|
19 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
|
20 $ 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
|
21 $ 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
|
22 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
|
23 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 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
|
25 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 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
|
27 | |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
28 | @ 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
|
29 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 | 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
|
31 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 | 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
|
33 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 | 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
|
35 |/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 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
|
37 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 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
|
39 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 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
|
41 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 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
|
43 |
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 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
|
46 |
2785
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
47 $ hg fold --exact null:: |
b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2784
diff
changeset
|
48 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
|
49 (no changeset checked out) |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
50 [10] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 $ hg fold |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 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
|
53 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 $ 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
|
55 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
|
56 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 $ hg fold . |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 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
|
59 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 $ 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
|
61 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
|
62 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 $ 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
|
64 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
|
65 [1] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 $ 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
|
67 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
|
68 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 $ 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
|
70 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
|
71 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 $ 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
|
73 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
|
74 (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
|
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 --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
|
77 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
|
78 (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
|
79 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 $ 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
|
81 $ 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
|
82 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
|
83 (see 'hg help phases' for details) |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
84 [10] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 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
|
87 |
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 'desc("r5")' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
89 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
|
90 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5113
a66c9fc9c503
fold: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents:
5079
diff
changeset
|
91 $ hg debugobsolete -r 'desc("r5")' --exclusive |
a66c9fc9c503
fold: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents:
5079
diff
changeset
|
92 4de32a90b66cd083ebf3c00b41277aa7abca51dd 198b5c405d01a50c41a81a00fc61677b81981a5f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '37', 'fold-id': '25cb328e', 'fold-idx': '3', 'fold-size': '3', 'operation': 'fold', 'user': 'test'} |
a66c9fc9c503
fold: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents:
5079
diff
changeset
|
93 c8d03c1b5e94af74b772900c58259d2e08917735 198b5c405d01a50c41a81a00fc61677b81981a5f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '33', 'fold-id': '25cb328e', 'fold-idx': '1', 'fold-size': '3', 'operation': 'fold', 'user': 'test'} |
a66c9fc9c503
fold: actually track folds using fold-* metadata in obsmarkers
Anton Shestakov <av6@dwimlabs.net>
parents:
5079
diff
changeset
|
94 f69452c5b1af6cbaaa56ef50cf94fff5bcc6ca23 198b5c405d01a50c41a81a00fc61677b81981a5f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '37', 'fold-id': '25cb328e', 'fold-idx': '2', 'fold-size': '3', 'operation': 'fold', 'user': 'test'} |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 |
5301
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
96 $ hg obslog --no-origin |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
97 @ 198b5c405d01 (11) r5 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
98 |\ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
99 | \ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
100 | |\ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
101 x | | 4de32a90b66c (7) r7 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
102 / / folded(description, date, parent) as 198b5c405d01 using fold by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
103 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
104 x | c8d03c1b5e94 (5) r5 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
105 / folded(description, date) as 198b5c405d01 using fold by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
106 | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
107 x f69452c5b1af (6) r6 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
108 folded(description, date, parent) as 198b5c405d01 using fold by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
109 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
110 $ hg obslog |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
111 @ 198b5c405d01 (11) r5 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
112 |\ folded(description, date, parent) from 4de32a90b66c, c8d03c1b5e94, f69452c5b1af using fold by test (Thu Jan 01 00:00:00 1970 +0000) |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
113 | | |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
114 | \ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
115 | |\ |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
116 x | | 4de32a90b66c (7) r7 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
117 / / |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
118 x / c8d03c1b5e94 (5) r5 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
119 / |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
120 x f69452c5b1af (6) r6 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
121 |
e8660b28bfee
obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents:
5113
diff
changeset
|
122 |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
123 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
|
124 |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
125 $ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
126 @ 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
|
127 | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
128 | 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
|
129 | | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
130 | 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
|
131 | | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
132 | 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
|
133 | | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
134 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
|
135 |/ |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
136 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
|
137 | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
138 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
|
139 | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
140 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
|
141 | |
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
142 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
|
143 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 (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
|
145 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 $ hg fold --from 6 # want to run hg fold 6 |
5672
12c53d7122a7
tests: remove trailing "!" from abort messages
Anton Shestakov <av6@dwimlabs.net>
parents:
5301
diff
changeset
|
147 abort: hidden revision '6' was rewritten as: 198b5c405d01 |
3663
54a469cd5b26
test: update output to match upstream
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3451
diff
changeset
|
148 (use --hidden to access hidden revisions) |
6098
442771901e01
tests: update exit codes for dealing with RepoLookupError
Anton Shestakov <av6@dwimlabs.net>
parents:
6018
diff
changeset
|
149 [10] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
150 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
151 $ 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
|
152 @ 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
|
153 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 | 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
|
155 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
156 | 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
|
157 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
158 | 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
|
159 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
160 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
|
161 |/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
162 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
|
163 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
164 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
|
165 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
166 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
|
167 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
168 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
|
169 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
170 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
171 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
|
172 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
173 $ 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
|
174 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
|
175 [255] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
176 $ 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
|
177 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
|
178 $ 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
|
179 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
|
180 | |
3450
a8596ac13fe8
tests: add a test showing bookmark not moving in-case of `hg fold`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
2785
diff
changeset
|
181 | @ 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
|
182 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
183 | 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
|
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 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
|
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 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
|
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 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
|
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 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
|
192 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
193 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
194 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
|
195 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
196 $ 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
|
197 $ 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
|
198 $ 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
|
199 $ hg up '.^' |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
200 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
|
201 (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
|
202 $ 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
|
203 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
|
204 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
205 | 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
|
206 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
207 @ | 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
|
208 | | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
209 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
|
210 |/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
211 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
|
212 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
213 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
|
214 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
215 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
|
216 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
217 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
|
218 |
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 $ 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
|
221 > [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
222 > 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
|
223 > EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
224 $ hg fold --from 'desc("r4")' |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
225 abort: cannot fold changeset, as that 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
|
226 (see 'hg help evolution.instability') |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
227 [10] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
228 $ hg fold --from 'desc("r3")::desc("r11")' |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
229 abort: cannot fold changeset, as that 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
|
230 (see 'hg help evolution.instability') |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
231 [10] |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
232 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
233 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
|
234 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
235 $ 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
|
236 > [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
237 > 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
|
238 > EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
239 $ 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
|
240 > [experimental] |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
241 > evolution = all |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
242 > EOF |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
243 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
244 $ 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
|
245 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
|
246 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
|
247 $ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
248 @ 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
|
249 | |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
250 | 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
|
251 | | |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
252 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
|
253 |/ |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
254 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
|
255 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
256 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
|
257 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
258 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
|
259 | |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
260 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
|
261 |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
262 |
2768
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
263 $ 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
|
264 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
|
265 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
|
266 $ hg log -G |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
267 @ 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
|
268 | |
3451
f062a4719e46
fold: make sure we move bookmarks after folding (issue5772)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3450
diff
changeset
|
269 | 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
|
270 |/ |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
271 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
|
272 | |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
273 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
|
274 | |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
275 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
|
276 | |
85e5a56db776
fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2767
diff
changeset
|
277 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
|
278 |
4340
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
279 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
|
280 |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
281 $ 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
|
282 > --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
|
283 2 new content-divergent changesets |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
284 3 changesets folded |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
285 $ 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
|
286 r4 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
287 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
288 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
289 r5 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
290 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
291 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
292 r6 (no-eol) |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
293 $ 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
|
294 > --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
|
295 3 changesets folded |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
296 $ 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
|
297 r4 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
298 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
299 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
300 r5 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
301 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
302 |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
303 r6 (no-eol) |
5300be965515
fold: sort concatenated commit messages in topological order
Martin von Zweigbergk <martinvonz@google.com>
parents:
3663
diff
changeset
|
304 |
2767
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
305 $ cd .. |
ab80ef8d0cfa
test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
306 |
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
307 One merge commit |
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 $ hg init fold-a-merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
310 $ cd fold-a-merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
311 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
312 $ mkcommit zebra |
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 $ hg up null |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
315 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
|
316 $ mkcommit apple |
5961
dad6bd8180d3
tests: use mkcommit() from common.sh in test-fold.t
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
317 created new head |
4723
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
318 $ mkcommit banana |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
319 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
320 $ hg merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
321 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
|
322 (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
|
323 $ hg ci -m merge |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
324 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
325 $ mkcommit coconut |
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 $ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
328 @ 4: coconut (coconut) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
329 | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
330 o 3: merge () |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
331 |\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
332 | o 2: banana (banana) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
333 | | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
334 | o 1: apple (apple) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
335 | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
336 o 0: zebra (zebra) |
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 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
339 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
|
340 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
341 $ 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
|
342 3 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
343 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
|
344 $ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
345 @ 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
|
346 |\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
347 | o 1: apple (apple) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
348 | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
349 o 0: zebra (zebra) |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
350 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
351 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
352 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
|
353 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
354 $ 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
|
355 2 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
356 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
|
357 $ hg glf |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
358 @ 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
|
359 | |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
360 o 0: zebra (zebra) |
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 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
363 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
|
364 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
365 $ hg cat -r tip zebra |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
366 zebra |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
367 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
368 $ cd .. |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
369 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
370 Multiple merge commits |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
371 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
372 $ hg init fold-many-merges |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
373 $ cd fold-many-merges |
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 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
|
376 $ hg glog |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
377 o 6: r6 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
378 |\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
379 | o 5: r5 |
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 4: r4 |
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 3: r3 |
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 o | | 2: r2 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
386 |/ / |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
387 o / 1: r1 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
388 |/ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
389 o 0: r0 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
390 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
391 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
392 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
|
393 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
394 $ 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
|
395 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
|
396 [255] |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
397 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
398 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
|
399 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
400 $ 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
|
401 5 changesets folded |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
402 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
403 $ hg glog |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
404 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
|
405 |\ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
406 | o 3: r3 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
407 |/ |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
408 o 0: r0 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
409 |
41885988921e
fold: allow operations on merge commits with some conditions
Anton Shestakov <av6@dwimlabs.net>
parents:
4340
diff
changeset
|
410 $ cd .. |
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 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
|
413 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
|
414 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
415 $ hg init issue5817 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
416 $ cd issue5817 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
417 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
418 $ echo A > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
419 $ 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
|
420 $ echo B > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
421 $ 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
|
422 $ echo C > foo |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
423 $ 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
|
424 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
425 $ 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
|
426 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
|
427 2 changesets folded |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
428 |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
429 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
|
430 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
431 $ 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
|
432 > --config experimental.evolution.allowdivergence=no |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
433 abort: cannot fold 4b34ecfb0d56, as that creates content-divergence with fcfd42a7fa46 |
5079
1f92a6aa40d6
evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
4832
diff
changeset
|
434 (add --verbose for details or see 'hg help evolution.instability') |
5970
65d4e47d7f26
rewriteutil: use precheck from core if recent enough
Martin von Zweigbergk <martinvonz@google.com>
parents:
5961
diff
changeset
|
435 [10] |
4831
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
436 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
437 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
|
438 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
439 $ 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
|
440 > --config experimental.evolution.allowdivergence=yes |
4832
8a491546e81d
fold: check allowdivergence before folding obsolete changesets (issue5817)
Anton Shestakov <av6@dwimlabs.net>
parents:
4831
diff
changeset
|
441 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
|
442 2 changesets folded |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
443 |
0852dcba82f6
tests: demonstrate that fold doesn't care about allowdivergence config option
Anton Shestakov <av6@dwimlabs.net>
parents:
4723
diff
changeset
|
444 $ cd .. |
5989
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
445 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
446 Saving the last user-edited message in last-message.txt |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
447 https://bz.mercurial-scm.org/show_bug.cgi?id=6549 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
448 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
449 $ hg init issue6549 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
450 $ cd issue6549 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
451 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
452 $ echo A > foo |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
453 $ hg ci -qAm A |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
454 $ echo B > foo |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
455 $ hg ci -m B |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
456 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
457 $ cat > editor.sh << 'EOF' |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
458 > echo 'Big commit message that was crafted with care.' > "$1" |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
459 > echo '' >> "$1" |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
460 > echo 'It would be a shame if something happened to it.' >> "$1" |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
461 > EOF |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
462 $ HGEDITOR="sh ./editor.sh" hg fold --exact --rev 'all()' |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
463 2 changesets folded |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
464 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
465 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
466 $ hg glog |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
467 @ 2: Big commit message that was crafted with care. |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
468 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
469 It would be a shame if something happened to it. |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
470 $ cat .hg/last-message.txt |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
471 Big commit message that was crafted with care. |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
472 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
473 It would be a shame if something happened to it. |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
474 |
056033a7689f
fold: make sure to save commit messages in last-message.txt on rewrites
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
475 $ cd .. |