annotate tests/test-graft.t @ 21082:0d67fccc0d43

merge: let manifestmerge emit 'keep' actions when keeping wd version Such a 'keep' action will later be the preferred (non)action when there is multiple ancestors. It is thus very convenient to have it explicitly. The extra actions will only be emitted in the case where the local file has changed since the ancestor but the other hasn't. That is the symmetrical operation to a 'get' action. This will create more action tuples that not really serve a purpose. The number of actions will however have the number of changed files as upper bound and it should thus not increase the memory/cpu use significantly.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 07 Apr 2014 02:12:28 +0200
parents 18adc15635a1
children a1381eea7c7d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
1 Create a repo with some stuff in it:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
3 $ hg init a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
4 $ cd a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5 $ echo a > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 $ echo a > d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
7 $ echo a > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
8 $ hg ci -qAm0
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
9 $ echo b > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
10 $ hg ci -m1 -u bar
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
11 $ hg mv a b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
12 $ hg ci -m2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
13 $ hg cp b c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
14 $ hg ci -m3 -u baz
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
15 $ echo b > d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
16 $ echo f > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
17 $ hg ci -m4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
18 $ hg up -q 3
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
19 $ echo b > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
20 $ hg branch -q stable
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
21 $ hg ci -m5
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
22 $ hg merge -q default --tool internal:local
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
23 $ hg branch -q default
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
24 $ hg ci -m6
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
25 $ hg phase --public 3
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
26 $ hg phase --force --secret 6
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
27
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19893
diff changeset
28 $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n'
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
29 @ test@6.secret: 6
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
30 |\
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
31 | o test@5.draft: 5
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
32 | |
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
33 o | test@4.draft: 4
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
34 |/
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
35 o baz@3.public: 3
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
36 |
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
37 o test@2.public: 2
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
38 |
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
39 o bar@1.public: 1
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
40 |
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
41 o test@0.public: 0
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
42
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
43
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
44 Need to specify a rev:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
45
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
46 $ hg graft
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
47 abort: no revisions specified
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
48 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
49
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
50 Can't graft ancestor:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
51
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
52 $ hg graft 1 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
53 skipping ancestor revision 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
54 skipping ancestor revision 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
55 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
56
16992
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
57 Specify revisions with -r:
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
58
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
59 $ hg graft -r 1 -r 2
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
60 skipping ancestor revision 1
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
61 skipping ancestor revision 2
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
62 [255]
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
63
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
64 $ hg graft -r 1 2
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
65 skipping ancestor revision 2
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
66 skipping ancestor revision 1
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
67 [255]
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
68
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
69 Can't graft with dirty wd:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
70
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
71 $ hg up -q 0
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
72 $ echo foo > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
73 $ hg graft 1
19804
061ce98c888d cmdutil.bailifchanged: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents: 19476
diff changeset
74 abort: uncommitted changes
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
75 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
76 $ hg revert a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
77
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
78 Graft a rename:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
79
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
80 $ hg graft 2 -u foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
81 grafting revision 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
82 merging a and b to b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
83 $ hg export tip --git
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
84 # HG changeset patch
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
85 # User foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
86 # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18631
diff changeset
87 # Thu Jan 01 00:00:00 1970 +0000
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
88 # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
89 # Parent 68795b066622ca79a25816a662041d8f78f3cd9e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
90 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
91
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
92 diff --git a/a b/b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
93 rename from a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
94 rename to b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
95
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
96 Look for extra:source
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
97
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
98 $ hg log --debug -r tip
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
99 changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
100 tag: tip
15907
51fc43253a52 changeset_printer: display changeset phase on debug level
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15777
diff changeset
101 phase: draft
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
102 parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
103 parent: -1:0000000000000000000000000000000000000000
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
104 manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
105 user: foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
106 date: Thu Jan 01 00:00:00 1970 +0000
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
107 files+: b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
108 files-: a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
109 extra: branch=default
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
110 extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
111 description:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
112 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
113
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
114
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
115
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
116 Graft out of order, skipping a merge and a duplicate
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
117
16389
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
118 $ hg graft 1 5 4 3 'merge()' 2 -n
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
119 skipping ungraftable merge revision 6
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
120 skipping revision 2 (already grafted to 7)
16389
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
121 grafting revision 1
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
122 grafting revision 5
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
123 grafting revision 4
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
124 grafting revision 3
79fecd735d26 graft: add --dry-run support (issue3362)
Matt Mackall <mpm@selenic.com>
parents: 16094
diff changeset
125
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
126 $ hg graft 1 5 4 3 'merge()' 2 --debug
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
127 skipping ungraftable merge revision 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
128 scanning for duplicate grafts
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
129 skipping revision 2 (already grafted to 7)
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
130 grafting revision 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
131 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
132 unmatched files in local:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
133 b
16795
e9ae770eff1c merge: show renamed on one and deleted on the other side in debug output
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16660
diff changeset
134 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
18135
a6fe1b9cc68f copies: make debug messages more sensible
Siddharth Agarwal <sid0@fb.com>
parents: 17186
diff changeset
135 src: 'a' -> dst: 'b' *
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
136 checking for directory renames
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
137 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18541
diff changeset
138 branchmerge: True, force: True, partial: False
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
139 ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6
20945
18adc15635a1 merge: keep destination filename as key in filemerge actions
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
140 b: local copied/moved from a -> m
18541
5ed6a375e9ca merge: delay debug messages for merge actions
Mads Kiilerich <madski@unity3d.com>
parents: 18360
diff changeset
141 preserving b for resolve of b
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
142 updating: b 1/1 files (100.00%)
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
143 picked tool 'internal:merge' for b (binary False symlink False)
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
144 merging b and a to b
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
145 my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
146 premerge successful
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
147 b
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
148 grafting revision 5
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
149 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
150 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18541
diff changeset
151 branchmerge: True, force: True, partial: False
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
152 ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
21082
0d67fccc0d43 merge: let manifestmerge emit 'keep' actions when keeping wd version
Mads Kiilerich <madski@unity3d.com>
parents: 20945
diff changeset
153 b: keep -> k
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
154 e: remote is newer -> g
18631
e2dc5397bc82 tests: update test output (will be folded into parent)
Bryan O'Sullivan <bryano@fb.com>
parents: 18605
diff changeset
155 getting e
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
156 updating: e 1/1 files (100.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
157 e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
158 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
159 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
160 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18541
diff changeset
161 branchmerge: True, force: True, partial: False
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
162 ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
21082
0d67fccc0d43 merge: let manifestmerge emit 'keep' actions when keeping wd version
Mads Kiilerich <madski@unity3d.com>
parents: 20945
diff changeset
163 b: keep -> k
18360
760c0d67ce5e merge: process files in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents: 18135
diff changeset
164 d: remote is newer -> g
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
165 e: versions differ -> m
18541
5ed6a375e9ca merge: delay debug messages for merge actions
Mads Kiilerich <madski@unity3d.com>
parents: 18360
diff changeset
166 preserving e for resolve of e
18631
e2dc5397bc82 tests: update test output (will be folded into parent)
Bryan O'Sullivan <bryano@fb.com>
parents: 18605
diff changeset
167 getting d
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
168 updating: d 1/2 files (50.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
169 updating: e 2/2 files (100.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
170 picked tool 'internal:merge' for e (binary False symlink False)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
171 merging e
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
172 my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
173 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15361
diff changeset
174 merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
175 abort: unresolved conflicts, can't continue
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
176 (use hg resolve and hg graft --continue)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
177 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
178
19253
e078ea9b4ce4 graft: refuse to commit an interrupted graft (issue3667)
Simon King <simon@simonking.org.uk>
parents: 18648
diff changeset
179 Commit while interrupted should fail:
e078ea9b4ce4 graft: refuse to commit an interrupted graft (issue3667)
Simon King <simon@simonking.org.uk>
parents: 18648
diff changeset
180
e078ea9b4ce4 graft: refuse to commit an interrupted graft (issue3667)
Simon King <simon@simonking.org.uk>
parents: 18648
diff changeset
181 $ hg ci -m 'commit interrupted graft'
19476
4fed15d4c5aa commands: add checks for unfinished operations (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 19332
diff changeset
182 abort: graft in progress
4fed15d4c5aa commands: add checks for unfinished operations (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 19332
diff changeset
183 (use 'hg graft --continue' or 'hg update' to abort)
19253
e078ea9b4ce4 graft: refuse to commit an interrupted graft (issue3667)
Simon King <simon@simonking.org.uk>
parents: 18648
diff changeset
184 [255]
e078ea9b4ce4 graft: refuse to commit an interrupted graft (issue3667)
Simon King <simon@simonking.org.uk>
parents: 18648
diff changeset
185
19332
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
186 Abort the graft and try committing:
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
187
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
188 $ hg up -C .
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
189 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
190 $ echo c >> e
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
191 $ hg ci -mtest
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
192
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
193 $ hg strip . --config extensions.mq=
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
194 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
195 saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
196
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
197 Graft again:
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
198
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
199 $ hg graft 1 5 4 3 'merge()' 2
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
200 skipping ungraftable merge revision 6
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
201 skipping revision 2 (already grafted to 7)
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
202 skipping revision 1 (already grafted to 8)
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
203 skipping revision 5 (already grafted to 9)
19332
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
204 grafting revision 4
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
205 merging e
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
206 warning: conflicts during merge.
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
207 merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
208 abort: unresolved conflicts, can't continue
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
209 (use hg resolve and hg graft --continue)
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
210 [255]
0af993732f66 update: remove .hg/graftstate on clean (issue3970)
Siddharth Agarwal <sid0@fb.com>
parents: 19253
diff changeset
211
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
212 Continue without resolve should fail:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
213
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
214 $ hg graft -c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
215 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
216 abort: unresolved merge conflicts (see hg help resolve)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
217 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
218
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
219 Fix up:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
220
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
221 $ echo b > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
222 $ hg resolve -m e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
223
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
224 Continue with a revision should fail:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
225
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
226 $ hg graft -c 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
227 abort: can't specify --continue and revisions
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
228 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
229
16992
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
230 $ hg graft -c -r 6
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
231 abort: can't specify --continue and revisions
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
232 [255]
55e7f352b1d3 graft: allow -r to specify revisions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16913
diff changeset
233
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
234 Continue for real, clobber usernames
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
235
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
236 $ hg graft -c -U
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
237 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
238 grafting revision 3
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
239
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
240 Compare with original:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
241
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
242 $ hg diff -r 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
243 $ hg status --rev 0:. -C
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
244 M d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
245 M e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
246 A b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
247 a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
248 A c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
249 a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
250 R a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
251
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
252 View graph:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
253
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19893
diff changeset
254 $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n'
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
255 @ test@11.draft: 3
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
256 |
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
257 o test@10.draft: 4
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
258 |
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
259 o test@9.draft: 5
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
260 |
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
261 o bar@8.draft: 1
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
262 |
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
263 o foo@7.draft: 2
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
264 |
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
265 | o test@6.secret: 6
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
266 | |\
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
267 | | o test@5.draft: 5
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
268 | | |
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
269 | o | test@4.draft: 4
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
270 | |/
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
271 | o baz@3.public: 3
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
272 | |
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
273 | o test@2.public: 2
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
274 | |
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
275 | o bar@1.public: 1
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
276 |/
15918
4f9853e7f690 graft: add test to check the phase of new changesets
Alain Leufroy <alain.leufroy@logilab.fr>
parents: 15907
diff changeset
277 o test@0.public: 0
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
278
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
279 Graft again onto another branch should preserve the original source
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
280 $ hg up -q 0
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
281 $ echo 'g'>g
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
282 $ hg add g
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
283 $ hg ci -m 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
284 created new head
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
285 $ hg graft 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
286 grafting revision 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
287
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
288 $ hg log -r 7 --template '{rev}:{node}\n'
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
289 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
290 $ hg log -r 2 --template '{rev}:{node}\n'
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
291 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
292
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
293 $ hg log --debug -r tip
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
294 changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
295 tag: tip
15907
51fc43253a52 changeset_printer: display changeset phase on debug level
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15777
diff changeset
296 phase: draft
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
297 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
298 parent: -1:0000000000000000000000000000000000000000
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
299 manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
300 user: foo
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
301 date: Thu Jan 01 00:00:00 1970 +0000
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
302 files+: b
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
303 files-: a
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
304 extra: branch=default
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
305 extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
306 description:
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
307 2
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
308
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
309
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
310 Disallow grafting an already grafted cset onto its original branch
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
311 $ hg up -q 6
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
312 $ hg graft 7
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
313 skipping already grafted revision 7 (was grafted from 2)
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
314 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
315
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
316 Disallow grafting already grafted csets with the same origin onto each other
16601
0c98820be15c filectx: handle some other simple cases for finding merge ancestor
Matt Mackall <mpm@selenic.com>
parents: 16600
diff changeset
317 $ hg up -q 13
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
318 $ hg graft 2
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
319 skipping revision 2 (already grafted to 13)
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
320 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
321 $ hg graft 7
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
322 skipping already grafted revision 7 (13 also has origin 2)
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
323 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
324
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
325 $ hg up -q 7
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
326 $ hg graft 2
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
327 skipping revision 2 (already grafted to 7)
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
328 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
329 $ hg graft tip
19893
dc4edca39e41 graft: make skip messages more helpful
Mads Kiilerich <madski@unity3d.com>
parents: 19804
diff changeset
330 skipping already grafted revision 13 (7 also has origin 2)
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
331 [255]
17045
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
332
16660
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
333 Graft with --log
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
334
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
335 $ hg up -Cq 1
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
336 $ hg graft 3 --log -u foo
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
337 grafting revision 3
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
338 warning: can't find ancestor for 'c' copied from 'b'!
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
339 $ hg log --template '{rev} {parents} {desc}\n' -r tip
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
340 14 1:5d205f8b35b6 3
2a71cc53f244 graft: implement --log (issue3438)
Levi Bard <levi@unity3d.com>
parents: 16601
diff changeset
341 (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8)
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16795
diff changeset
342
17045
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
343 Resolve conflicted graft
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
344 $ hg up -q 0
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
345 $ echo b > a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
346 $ hg ci -m 8
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
347 created new head
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
348 $ echo a > a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
349 $ hg ci -m 9
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
350 $ hg graft 1 --tool internal:fail
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
351 grafting revision 1
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
352 abort: unresolved conflicts, can't continue
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
353 (use hg resolve and hg graft --continue)
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
354 [255]
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
355 $ hg resolve --all
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
356 merging a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
357 $ hg graft -c
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
358 grafting revision 1
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
359 $ hg export tip --git
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
360 # HG changeset patch
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
361 # User bar
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
362 # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18631
diff changeset
363 # Thu Jan 01 00:00:00 1970 +0000
17045
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
364 # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
365 # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
366 1
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
367
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
368 diff --git a/a b/a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
369 --- a/a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
370 +++ b/a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
371 @@ -1,1 +1,1 @@
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
372 -a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
373 +b
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
374
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
375 Resolve conflicted graft with rename
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
376 $ echo c > a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
377 $ hg ci -m 10
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
378 $ hg graft 2 --tool internal:fail
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
379 grafting revision 2
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
380 abort: unresolved conflicts, can't continue
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
381 (use hg resolve and hg graft --continue)
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
382 [255]
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
383 $ hg resolve --all
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
384 merging a and b to b
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
385 $ hg graft -c
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
386 grafting revision 2
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
387 $ hg export tip --git
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
388 # HG changeset patch
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
389 # User test
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
390 # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18631
diff changeset
391 # Thu Jan 01 00:00:00 1970 +0000
17045
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
392 # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
393 # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
394 2
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
395
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
396 diff --git a/a b/b
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
397 rename from a
52ea9ce5b641 graft: don't drop the second parent on unsuccessful merge (issue3498)
Yuya Nishihara <yuya@tcha.org>
parents: 16509
diff changeset
398 rename to b
17185
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
399
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
400 Test simple origin(), with and without args
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
401 $ hg log -r 'origin()'
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
402 changeset: 1:5d205f8b35b6
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
403 user: bar
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
404 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
405 summary: 1
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
406
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
407 changeset: 2:5c095ad7e90f
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
408 user: test
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
409 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
410 summary: 2
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
411
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
412 changeset: 3:4c60f11aa304
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
413 user: baz
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
414 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
415 summary: 3
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
416
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
417 changeset: 4:9c233e8e184d
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
418 user: test
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
419 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
420 summary: 4
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
421
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
422 changeset: 5:97f8bfe72746
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
423 branch: stable
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
424 parent: 3:4c60f11aa304
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
425 user: test
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
426 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
427 summary: 5
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
428
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
429 $ hg log -r 'origin(7)'
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
430 changeset: 2:5c095ad7e90f
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
431 user: test
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
432 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
433 summary: 2
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
434
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
435 Now transplant a graft to test following through copies
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
436 $ hg up -q 0
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
437 $ hg branch -q dev
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
438 $ hg ci -qm "dev branch"
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
439 $ hg --config extensions.transplant= transplant -q 7
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
440 $ hg log -r 'origin(.)'
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
441 changeset: 2:5c095ad7e90f
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
442 user: test
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
443 date: Thu Jan 01 00:00:00 1970 +0000
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
444 summary: 2
2c7c4824969e revset: add origin() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17059
diff changeset
445
17186
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
446 Test simple destination
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
447 $ hg log -r 'destination()'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
448 changeset: 7:ef0ef43d49e7
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
449 parent: 0:68795b066622
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
450 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
451 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
452 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
453
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
454 changeset: 8:6b9e5368ca4e
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
455 user: bar
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
456 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
457 summary: 1
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
458
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
459 changeset: 9:1905859650ec
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
460 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
461 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
462 summary: 5
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
463
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
464 changeset: 10:52dc0b4c6907
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
465 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
466 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
467 summary: 4
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
468
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
469 changeset: 11:882b35362a6b
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
470 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
471 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
472 summary: 3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
473
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
474 changeset: 13:9db0f28fd374
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
475 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
476 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
477 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
478
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
479 changeset: 14:f64defefacee
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
480 parent: 1:5d205f8b35b6
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
481 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
482 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
483 summary: 3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
484
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
485 changeset: 17:64ecd9071ce8
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
486 user: bar
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
487 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
488 summary: 1
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
489
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
490 changeset: 19:2e80e1351d6e
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
491 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
492 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
493 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
494
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
495 changeset: 21:7e61b508e709
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
496 branch: dev
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
497 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
498 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
499 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
500 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
501
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
502 $ hg log -r 'destination(2)'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
503 changeset: 7:ef0ef43d49e7
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
504 parent: 0:68795b066622
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
505 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
506 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
507 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
508
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
509 changeset: 13:9db0f28fd374
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
510 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
511 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
512 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
513
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
514 changeset: 19:2e80e1351d6e
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
515 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
516 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
517 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
518
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
519 changeset: 21:7e61b508e709
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
520 branch: dev
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
521 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
522 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
523 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
524 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
525
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
526 Transplants of grafts can find a destination...
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
527 $ hg log -r 'destination(7)'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
528 changeset: 21:7e61b508e709
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
529 branch: dev
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
530 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
531 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
532 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
533 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
534
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
535 ... grafts of grafts unfortunately can't
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
536 $ hg graft -q 13
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
537 $ hg log -r 'destination(13)'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
538 All copies of a cset
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
539 $ hg log -r 'origin(13) or destination(origin(13))'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
540 changeset: 2:5c095ad7e90f
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
541 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
542 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
543 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
544
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
545 changeset: 7:ef0ef43d49e7
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
546 parent: 0:68795b066622
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
547 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
548 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
549 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
550
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
551 changeset: 13:9db0f28fd374
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
552 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
553 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
554 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
555
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
556 changeset: 19:2e80e1351d6e
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
557 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
558 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
559 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
560
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
561 changeset: 21:7e61b508e709
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
562 branch: dev
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
563 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
564 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
565 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
566
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
567 changeset: 22:1313d0a825e2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
568 branch: dev
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
569 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
570 user: foo
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
571 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
572 summary: 2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 17185
diff changeset
573