Mercurial > hg
annotate tests/test-update-branches.t @ 31601:8e7feaad2d8d
logtoprocess: use lowercase for docstring title
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 23 Mar 2017 21:16:55 -0700 |
parents | 7433b3bc55ee |
children | 1b5c61d38a52 |
rev | line source |
---|---|
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
1 # Construct the following history tree: |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
2 # |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
3 # @ 5:e1bb631146ca b1 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
4 # | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
5 # o 4:a4fdb3b883c4 0:b608b9236435 b1 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
6 # | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
7 # | o 3:4b57d2520816 1:44592833ba9f |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
8 # | | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
9 # | | o 2:063f31070f65 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
10 # | |/ |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
11 # | o 1:44592833ba9f |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
12 # |/ |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
13 # o 0:b608b9236435 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
14 |
17773
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
15 $ mkdir b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
16 $ cd b1 |
12279 | 17 $ hg init |
18 $ echo foo > foo | |
19 $ echo zero > a | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
20 $ hg init sub |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
21 $ echo suba > sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
22 $ hg --cwd sub ci -Am addsuba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
23 adding suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
24 $ echo 'sub = sub' > .hgsub |
12279 | 25 $ hg ci -qAm0 |
26 $ echo one > a ; hg ci -m1 | |
27 $ echo two > a ; hg ci -m2 | |
28 $ hg up -q 1 | |
29 $ echo three > a ; hg ci -qm3 | |
30 $ hg up -q 0 | |
31 $ hg branch -q b1 | |
32 $ echo four > a ; hg ci -qm4 | |
33 $ echo five > a ; hg ci -qm5 | |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
34 |
12279 | 35 Initial repo state: |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
36 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20107
diff
changeset
|
37 $ hg log -G --template '{rev}:{node|short} {parents} {branches}\n' |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
38 @ 5:ff252e8273df b1 |
12279 | 39 | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
40 o 4:d047485b3896 0:60829823a42a b1 |
12279 | 41 | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
42 | o 3:6efa171f091b 1:0786582aa4b1 |
12279 | 43 | | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
44 | | o 2:bd10386d478c |
12279 | 45 | |/ |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
46 | o 1:0786582aa4b1 |
12279 | 47 |/ |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
48 o 0:60829823a42a |
12279 | 49 |
50 | |
17773
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
51 Make sure update doesn't assume b1 is a repository if invoked from outside: |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
52 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
53 $ cd .. |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
54 $ hg update b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
55 abort: no repository found in '$TESTTMP' (.hg not found)! |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
56 [255] |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
57 $ cd b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
58 |
12279 | 59 Test helper functions: |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
60 |
12279 | 61 $ revtest () { |
62 > msg=$1 | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
63 > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub' |
12279 | 64 > startrev=$3 |
65 > targetrev=$4 | |
66 > opt=$5 | |
67 > hg up -qC $startrev | |
68 > test $dirtyflag = dirty && echo dirty > foo | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
69 > test $dirtyflag = dirtysub && echo dirty > sub/suba |
12279 | 70 > hg up $opt $targetrev |
71 > hg parent --template 'parent={rev}\n' | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
72 > hg stat -S |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
16491
diff
changeset
|
73 > } |
12279 | 74 |
75 $ norevtest () { | |
76 > msg=$1 | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
77 > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub' |
12279 | 78 > startrev=$3 |
79 > opt=$4 | |
80 > hg up -qC $startrev | |
81 > test $dirtyflag = dirty && echo dirty > foo | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
82 > test $dirtyflag = dirtysub && echo dirty > sub/suba |
12279 | 83 > hg up $opt |
84 > hg parent --template 'parent={rev}\n' | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
85 > hg stat -S |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
16491
diff
changeset
|
86 > } |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
87 |
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
88 Test cases are documented in a table in the update function of merge.py. |
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
89 Cases are run as shown in that table, row by row. |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
90 |
12279 | 91 $ norevtest 'none clean linear' clean 4 |
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
93 parent=5 | |
94 | |
95 $ norevtest 'none clean same' clean 2 | |
28065
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
96 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
97 1 other heads for branch "default" |
12279 | 98 parent=2 |
99 | |
100 | |
101 $ revtest 'none clean linear' clean 1 2 | |
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
103 parent=2 | |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
104 |
12279 | 105 $ revtest 'none clean same' clean 2 3 |
106 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 parent=3 | |
108 | |
109 $ revtest 'none clean cross' clean 3 4 | |
110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 parent=4 | |
112 | |
113 | |
114 $ revtest 'none dirty linear' dirty 1 2 | |
115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 parent=2 | |
117 M foo | |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
118 |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
119 $ revtest 'none dirtysub linear' dirtysub 1 2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
121 parent=2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
122 M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
123 |
12279 | 124 $ revtest 'none dirty same' dirty 2 3 |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
125 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
126 (commit or update --clean to discard changes) |
12279 | 127 parent=2 |
128 M foo | |
129 | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
130 $ revtest 'none dirtysub same' dirtysub 2 3 |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
131 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
132 (commit or update --clean to discard changes) |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
133 parent=2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
134 M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
135 |
12279 | 136 $ revtest 'none dirty cross' dirty 3 4 |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
137 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
138 (commit or update --clean to discard changes) |
12279 | 139 parent=3 |
140 M foo | |
141 | |
19800
4894e0d9462d
update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents:
19799
diff
changeset
|
142 $ norevtest 'none dirty cross' dirty 2 |
28065
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
143 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
144 1 other heads for branch "default" |
19800
4894e0d9462d
update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents:
19799
diff
changeset
|
145 parent=2 |
4894e0d9462d
update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents:
19799
diff
changeset
|
146 M foo |
4894e0d9462d
update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents:
19799
diff
changeset
|
147 |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
148 $ revtest 'none dirtysub cross' dirtysub 3 4 |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
149 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
150 (commit or update --clean to discard changes) |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
151 parent=3 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
152 M sub/suba |
12279 | 153 |
154 $ revtest '-C dirty linear' dirty 1 2 -C | |
155 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
156 parent=2 | |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
157 |
12279 | 158 $ revtest '-c dirty linear' dirty 1 2 -c |
19801
41abe2e3e3b7
update: standardize error message for dirty update --check
Siddharth Agarwal <sid0@fb.com>
parents:
19800
diff
changeset
|
159 abort: uncommitted changes |
12279 | 160 parent=1 |
161 M foo | |
162 | |
31166
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
163 $ revtest '-m dirty linear' dirty 1 2 -m |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
164 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
165 parent=2 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
166 M foo |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
167 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
168 $ revtest '-m dirty cross' dirty 3 4 -m |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
170 parent=4 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
171 M foo |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
172 |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
173 $ revtest '-c dirtysub linear' dirtysub 1 2 -c |
24473
0142b59f5743
update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22955
diff
changeset
|
174 abort: uncommitted changes in subrepository 'sub' |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
175 parent=1 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
176 M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
177 |
12279 | 178 $ norevtest '-c clean same' clean 2 -c |
28065
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
179 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28029
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26713
diff
changeset
|
180 1 other heads for branch "default" |
28065
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
181 parent=2 |
12279 | 182 |
183 $ revtest '-cC dirty linear' dirty 1 2 -cC | |
31166
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
184 abort: can only specify one of -C/--clean, -c/--check, or -m/merge |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
185 parent=1 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
186 M foo |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
187 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
188 $ revtest '-mc dirty linear' dirty 1 2 -mc |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
189 abort: can only specify one of -C/--clean, -c/--check, or -m/merge |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
190 parent=1 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
191 M foo |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
192 |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
193 $ revtest '-mC dirty linear' dirty 1 2 -mC |
fad5e299cfc7
update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents:
30900
diff
changeset
|
194 abort: can only specify one of -C/--clean, -c/--check, or -m/merge |
12279 | 195 parent=1 |
196 M foo | |
197 | |
31167
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
198 $ echo '[experimental]' >> .hg/hgrc |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
199 $ echo 'updatecheck = abort' >> .hg/hgrc |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
200 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
201 $ revtest 'none dirty linear' dirty 1 2 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
202 abort: uncommitted changes |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
203 parent=1 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
204 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
205 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
206 $ revtest 'none dirty linear' dirty 1 2 -c |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
207 abort: uncommitted changes |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
208 parent=1 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
209 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
210 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
211 $ revtest 'none dirty linear' dirty 1 2 -C |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
212 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
213 parent=2 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
214 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
215 $ echo 'updatecheck = none' >> .hg/hgrc |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
216 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
217 $ revtest 'none dirty cross' dirty 3 4 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
218 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
219 parent=4 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
220 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
221 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
222 $ revtest 'none dirty linear' dirty 1 2 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
223 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
224 parent=2 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
225 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
226 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
227 $ revtest 'none dirty linear' dirty 1 2 -c |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
228 abort: uncommitted changes |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
229 parent=1 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
230 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
231 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
232 $ revtest 'none dirty linear' dirty 1 2 -C |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
233 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
234 parent=2 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
235 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
236 $ hg co -qC 3 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
237 $ echo dirty >> a |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
238 $ hg co --tool :merge3 4 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
239 merging a |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
240 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
241 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
242 use 'hg resolve' to retry unresolved file merges |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
243 [1] |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
244 $ hg st |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
245 M a |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
246 ? a.orig |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
247 $ cat a |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
248 <<<<<<< working copy: 6efa171f091b - test: 3 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
249 three |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
250 dirty |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
251 ||||||| base |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
252 three |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
253 ======= |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
254 four |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
255 >>>>>>> destination: d047485b3896 b1 - test: 4 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
256 $ rm a.orig |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
257 |
31168
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
258 $ echo 'updatecheck = noconflict' >> .hg/hgrc |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
259 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
260 $ revtest 'none dirty cross' dirty 3 4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
261 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
262 parent=4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
263 M foo |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
264 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
265 $ revtest 'none dirty linear' dirty 1 2 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
266 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
267 parent=2 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
268 M foo |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
269 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
270 $ revtest 'none dirty linear' dirty 1 2 -c |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
271 abort: uncommitted changes |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
272 parent=1 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
273 M foo |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
274 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
275 $ revtest 'none dirty linear' dirty 1 2 -C |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
276 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
277 parent=2 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
278 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
279 Locally added file is allowed |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
280 $ hg up -qC 3 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
281 $ echo a > bar |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
282 $ hg add bar |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
283 $ hg up -q 4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
284 $ hg st |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
285 A bar |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
286 $ hg forget bar |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
287 $ rm bar |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
288 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
289 Locally removed file is allowed |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
290 $ hg up -qC 3 |
31174
842489d18118
tests: fix test-update-branches to remove non-conflicting file
Martin von Zweigbergk <martinvonz@google.com>
parents:
31168
diff
changeset
|
291 $ hg rm foo |
31168
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
292 $ hg up -q 4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
293 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
294 File conflict is not allowed |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
295 $ hg up -qC 3 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
296 $ echo dirty >> a |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
297 $ hg up -q 4 |
31175
7433b3bc55ee
update: for "noconflict" updates, print "conflicting changes" on conflict
Martin von Zweigbergk <martinvonz@google.com>
parents:
31174
diff
changeset
|
298 abort: conflicting changes |
7433b3bc55ee
update: for "noconflict" updates, print "conflicting changes" on conflict
Martin von Zweigbergk <martinvonz@google.com>
parents:
31174
diff
changeset
|
299 (commit or update --clean to discard changes) |
31168
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
300 [255] |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
301 $ hg up -m 4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
302 merging a |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
303 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
304 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
305 use 'hg resolve' to retry unresolved file merges |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
306 [1] |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
307 $ rm a.orig |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
308 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
309 Change/delete conflict is not allowed |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
310 $ hg up -qC 3 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
311 $ hg rm foo |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
312 $ hg up -q 4 |
41a9edc5d00f
update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents:
31167
diff
changeset
|
313 |
31167
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
314 Uses default value of "linear" when value is misspelled |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
315 $ echo 'updatecheck = linyar' >> .hg/hgrc |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
316 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
317 $ revtest 'dirty cross' dirty 3 4 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
318 abort: uncommitted changes |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
319 (commit or update --clean to discard changes) |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
320 parent=3 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
321 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
322 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
323 Setup for later tests |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
324 $ revtest 'none dirty linear' dirty 1 2 -c |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
325 abort: uncommitted changes |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
326 parent=1 |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
327 M foo |
696e321b304d
update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
31166
diff
changeset
|
328 |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
329 $ cd .. |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
330 |
30900
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
331 Test updating to null revision |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
332 |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
333 $ hg init null-repo |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
334 $ cd null-repo |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
335 $ echo a > a |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
336 $ hg add a |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
337 $ hg ci -m a |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
338 $ hg up -qC 0 |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
339 $ echo b > b |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
340 $ hg add b |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
341 $ hg up null |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
342 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
343 $ hg st |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
344 A b |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
345 $ hg up -q 0 |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
346 $ hg st |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
347 A b |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
348 $ hg up -qC null |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
349 $ hg st |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
350 ? b |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
351 $ cd .. |
23eed7d423b4
tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents:
29964
diff
changeset
|
352 |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
353 Test updating with closed head |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
354 --------------------------------------------------------------------- |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
355 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
356 $ hg clone -U -q b1 closed-heads |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
357 $ cd closed-heads |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
358 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
359 Test updating if at least one non-closed branch head exists |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
360 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
361 if on the closed branch head: |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
362 - update to "." |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
363 - "updated to a closed branch head ...." message is displayed |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
364 - "N other heads for ...." message is displayed |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
365 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
366 $ hg update -q -C 3 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
367 $ hg commit --close-branch -m 6 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
368 $ norevtest "on closed branch head" clean 6 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
369 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28683
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
370 no open descendant heads on branch "default", updating to a closed head |
29964
40f845537dca
update: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
29947
diff
changeset
|
371 (committing will reopen the head, use 'hg heads .' to see 1 other heads) |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
372 parent=6 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
373 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
374 if descendant non-closed branch head exists, and it is only one branch head: |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
375 - update to it, even if its revision is less than closed one |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
376 - "N other heads for ...." message isn't displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
377 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
378 $ norevtest "non-closed 2 should be chosen" clean 1 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
380 parent=2 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
381 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
382 if all descendant branch heads are closed, but there is another branch head: |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
383 - update to the tipmost descendant head |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
384 - "updated to a closed branch head ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
385 - "N other heads for ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
386 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
387 $ norevtest "all descendant branch heads are closed" clean 3 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
388 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28683
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
389 no open descendant heads on branch "default", updating to a closed head |
29964
40f845537dca
update: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
29947
diff
changeset
|
390 (committing will reopen the head, use 'hg heads .' to see 1 other heads) |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
391 parent=6 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
392 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
393 Test updating if all branch heads are closed |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
394 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
395 if on the closed branch head: |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
396 - update to "." |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
397 - "updated to a closed branch head ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
398 - "all heads of branch ...." message is displayed |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
399 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
400 $ hg update -q -C 2 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
401 $ hg commit --close-branch -m 7 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
402 $ norevtest "all heads of branch default are closed" clean 6 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
403 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28683
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
404 no open descendant heads on branch "default", updating to a closed head |
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
405 (committing will reopen branch "default") |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
406 parent=6 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
407 |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
408 if not on the closed branch head: |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
409 - update to the tipmost descendant (closed) head |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
410 - "updated to a closed branch head ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
411 - "all heads of branch ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
412 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
413 $ norevtest "all heads of branch default are closed" clean 1 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28683
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
415 no open descendant heads on branch "default", updating to a closed head |
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
416 (committing will reopen branch "default") |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
417 parent=7 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
418 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
419 $ cd .. |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
420 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
421 Test updating if "default" branch doesn't exist and no revision is |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
422 checked out (= "default" is used as current branch) |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
423 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
424 $ hg init no-default-branch |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
425 $ cd no-default-branch |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
426 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
427 $ hg branch foobar |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
428 marked working directory as branch foobar |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
429 (branches are permanent and global, did you want a bookmark?) |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
430 $ echo a > a |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
431 $ hg commit -m "#0" -A |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
432 adding a |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
433 $ echo 1 >> a |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
434 $ hg commit -m "#1" |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
435 $ hg update -q 0 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
436 $ echo 3 >> a |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
437 $ hg commit -m "#2" |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
438 created new head |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
439 $ hg commit --close-branch -m "#3" |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
440 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
441 if there is at least one non-closed branch head: |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
442 - update to the tipmost branch head |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
443 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
444 $ norevtest "non-closed 1 should be chosen" clean null |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
445 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
446 parent=1 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
447 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
448 if all branch heads are closed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
449 - update to "tip" |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
450 - "updated to a closed branch head ...." message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
451 - "all heads for branch "XXXX" are closed" message is displayed |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
452 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
453 $ hg update -q -C 1 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
454 $ hg commit --close-branch -m "#4" |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
455 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
456 $ norevtest "all branches are closed" clean null |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
457 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28683
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
458 no open descendant heads on branch "foobar", updating to a closed head |
d0210a35c81a
destutil: make messages at updating to the closed head usual form
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28385
diff
changeset
|
459 (committing will reopen branch "foobar") |
28385
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
460 parent=4 |
3f9e25a42e69
destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28266
diff
changeset
|
461 |
28266
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
462 $ cd ../b1 |
de8b09482fb7
destutil: show message about other branch heads, even if on a closed head
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
463 |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
464 Test obsolescence behavior |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
465 --------------------------------------------------------------------- |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
466 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
467 successors should be taken in account when checking head destination |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
468 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
469 $ cat << EOF >> $HGRCPATH |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
470 > [ui] |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
471 > logtemplate={rev}:{node|short} {desc|firstline} |
22955
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
20281
diff
changeset
|
472 > [experimental] |
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
20281
diff
changeset
|
473 > evolution=createmarkers |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
474 > EOF |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
475 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
476 Test no-argument update to a successor of an obsoleted changeset |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
477 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
478 $ hg log -G |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
479 o 5:ff252e8273df 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
480 | |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
481 o 4:d047485b3896 4 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
482 | |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
483 | o 3:6efa171f091b 3 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
484 | | |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
485 | | o 2:bd10386d478c 2 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
486 | |/ |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
487 | @ 1:0786582aa4b1 1 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
488 |/ |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
489 o 0:60829823a42a 0 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
490 |
20107
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
491 $ hg book bm -r 3 |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
492 $ hg status |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
493 M foo |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
494 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
495 We add simple obsolescence marker between 3 and 4 (indirect successors) |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
496 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
497 $ hg id --debug -i -r 3 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
498 6efa171f091b00a3c35edc15d48c52a498929953 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
499 $ hg id --debug -i -r 4 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
500 d047485b3896813b2a624e86201983520f003206 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
501 $ hg debugobsolete 6efa171f091b00a3c35edc15d48c52a498929953 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
502 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa d047485b3896813b2a624e86201983520f003206 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
503 |
20107
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
504 Test that 5 is detected as a valid destination from 3 and also accepts moving |
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
505 the bookmark (issue4015) |
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
506 |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
507 $ hg up --quiet --hidden 3 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
508 $ hg up 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
509 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
20107
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
510 $ hg book bm |
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
511 moving bookmark 'bm' forward from 6efa171f091b |
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
512 $ hg bookmarks |
2ca325ea57fa
bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents:
19801
diff
changeset
|
513 * bm 5:ff252e8273df |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
514 |
20281
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
515 Test that 4 is detected as the no-argument destination from 3 and also moves |
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
516 the bookmark with it |
20280
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
517 $ hg up --quiet 0 # we should be able to update to 3 directly |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
518 $ hg up --quiet --hidden 3 # but not implemented yet. |
20281
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
519 $ hg book -f bm |
20280
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
520 $ hg up |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
521 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
20281
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
522 updating bookmark bm |
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
523 $ hg book |
67ee87a371b2
update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents:
20280
diff
changeset
|
524 * bm 4:d047485b3896 |
20280
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
525 |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
526 Test that 5 is detected as a valid destination from 1 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
527 $ hg up --quiet 0 # we should be able to update to 3 directly |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
528 $ hg up --quiet --hidden 3 # but not implemented yet. |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
529 $ hg up 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
530 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
531 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
532 Test that 5 is not detected as a valid destination from 2 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
533 $ hg up --quiet 0 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
534 $ hg up --quiet 2 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
535 $ hg up 5 |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
536 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
19798
diff
changeset
|
537 (commit or update --clean to discard changes) |
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
538 [255] |
20280
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
539 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
540 Test that we don't crash when updating from a pruned changeset (i.e. has no |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
541 successors). Behavior should probably be that we update to the first |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
542 non-obsolete parent but that will be decided later. |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
543 $ hg id --debug -r 2 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
544 bd10386d478cd5a9faf2e604114c8e6da62d3889 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
545 $ hg up --quiet 0 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
546 $ hg up --quiet 2 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
547 $ hg debugobsolete bd10386d478cd5a9faf2e604114c8e6da62d3889 |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
548 $ hg up |
95b9c6149e17
merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents:
20117
diff
changeset
|
549 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
26713
a271925699d6
revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24473
diff
changeset
|
550 |
a271925699d6
revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24473
diff
changeset
|
551 Test experimental revset support |
a271925699d6
revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24473
diff
changeset
|
552 |
a271925699d6
revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24473
diff
changeset
|
553 $ hg log -r '_destupdate()' |
a271925699d6
revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24473
diff
changeset
|
554 2:bd10386d478c 2 (no-eol) |
29947
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
555 |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
556 Test that boolean flags allow --no-flag specification to override [defaults] |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
557 $ cat >> $HGRCPATH <<EOF |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
558 > [defaults] |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
559 > update = --check |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
560 > EOF |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
561 $ hg co 2 |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
562 abort: uncommitted changes |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
563 [255] |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
564 $ hg co --no-check 2 |
e1f0ec0b7d2d
flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents:
28683
diff
changeset
|
565 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |