annotate tests/test-update-branches.t @ 48406:51f521900473

update: add a test for `--merge` overriding the "abort" config I don't see this behavior tested anywhere. Differential Revision: https://phab.mercurial-scm.org/D11850
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 03 Dec 2021 12:19:36 +0100
parents acdd4a42deaa
children 4d59e0f909e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
1 $ cat >> $HGRCPATH <<EOF
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
2 > [commands]
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
3 > status.verbose=1
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
4 > EOF
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
5
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
6 # 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
7 #
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
8 # @ 5:e1bb631146ca b1
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
9 # |
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
10 # 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
11 # |
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
12 # | 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
13 # | |
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
14 # | | o 2:063f31070f65
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
15 # | |/
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
16 # | o 1:44592833ba9f
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
17 # |/
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
18 # o 0:b608b9236435
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
19
17773
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
20 $ mkdir b1
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
21 $ cd b1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
22 $ hg init
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
23 $ echo foo > foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
24 $ echo zero > a
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
25 $ hg init sub
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
26 $ echo suba > sub/suba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
27 $ hg --cwd sub ci -Am addsuba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
28 adding suba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
29 $ echo 'sub = sub' > .hgsub
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
30 $ hg ci -qAm0
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
31 $ echo one > a ; hg ci -m1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
32 $ echo two > a ; hg ci -m2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
33 $ hg up -q 1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
34 $ echo three > a ; hg ci -qm3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
35 $ hg up -q 0
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
36 $ hg branch -q b1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
37 $ echo four > a ; hg ci -qm4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
38 $ 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
39
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
40 Initial repo state:
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
41
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20107
diff changeset
42 $ 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
43 @ 5:ff252e8273df b1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
44 |
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
45 o 4:d047485b3896 0:60829823a42a b1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
46 |
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
47 | o 3:6efa171f091b 1:0786582aa4b1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
48 | |
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
49 | | o 2:bd10386d478c
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
50 | |/
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
51 | o 1:0786582aa4b1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
52 |/
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
53 o 0:60829823a42a
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
54
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
55
17773
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
56 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
57
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
58 $ cd ..
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
59 $ hg update b1
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
60 abort: no repository found in '$TESTTMP' (.hg not found)
45911
8939062597f0 errors: raise InputError on bad repo arguments
Martin von Zweigbergk <martinvonz@google.com>
parents: 45906
diff changeset
61 [10]
17773
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
62 $ cd b1
434e5bd615fc commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents: 17347
diff changeset
63
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
64 Test helper functions:
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
65
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
66 $ revtest () {
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
67 > msg=$1
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
68 > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub'
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
69 > startrev=$3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
70 > targetrev=$4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
71 > opt=$5
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
72 > hg up -qC $startrev
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
73 > test $dirtyflag = dirty && echo dirty > foo
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
74 > test $dirtyflag = dirtysub && echo dirty > sub/suba
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
75 > hg up $opt $targetrev
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
76 > hg parent --template 'parent={rev}\n'
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
77 > 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
78 > }
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
79
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
80 $ norevtest () {
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
81 > msg=$1
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
82 > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub'
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
83 > startrev=$3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
84 > opt=$4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
85 > hg up -qC $startrev
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
86 > test $dirtyflag = dirty && echo dirty > foo
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
87 > test $dirtyflag = dirtysub && echo dirty > sub/suba
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
88 > hg up $opt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
89 > hg parent --template 'parent={rev}\n'
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
90 > 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
91 > }
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
92
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
93 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
94 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
95
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
96 $ norevtest 'none clean linear' clean 4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
98 parent=5
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
99
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
100 $ 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
101 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32698
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 31175
diff changeset
102 updated to "bd10386d478c: 2"
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28029
diff changeset
103 1 other heads for branch "default"
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
104 parent=2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
105
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
106
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
107 $ revtest 'none clean linear' clean 1 2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
109 parent=2
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
110
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
111 $ revtest 'none clean same' clean 2 3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
113 parent=3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
114
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
115 $ revtest 'none clean cross' clean 3 4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
116 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
117 parent=4
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
118
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
119
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
120 $ revtest 'none dirty linear' dirty 1 2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
122 parent=2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
123 M foo
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
124
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
125 $ revtest 'none dirtysub linear' dirtysub 1 2
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
126 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
127 parent=2
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
128 M sub/suba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
129
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
130 $ 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
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)
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
133 parent=2
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
134 M foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
135
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
136 $ 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
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)
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
139 parent=2
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
140 M sub/suba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
141
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
142 $ 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
143 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
144 (commit or update --clean to discard changes)
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
145 parent=3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
146 M foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
147
19800
4894e0d9462d update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents: 19799
diff changeset
148 $ 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
149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32698
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 31175
diff changeset
150 updated to "bd10386d478c: 2"
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28029
diff changeset
151 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
152 parent=2
4894e0d9462d update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents: 19799
diff changeset
153 M foo
4894e0d9462d update: improve error message for dirty non-linear update with rev
Siddharth Agarwal <sid0@fb.com>
parents: 19799
diff changeset
154
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
155 $ 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
156 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
157 (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
158 parent=3
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
159 M sub/suba
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
160
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
161 $ revtest '--clean dirty linear' dirty 1 2 --clean
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
162 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
163 parent=2
9716
ea8c207a0f78 update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff changeset
164
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
165 $ revtest '--check dirty linear' dirty 1 2 --check
19801
41abe2e3e3b7 update: standardize error message for dirty update --check
Siddharth Agarwal <sid0@fb.com>
parents: 19800
diff changeset
166 abort: uncommitted changes
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
167 parent=1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
168 M foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
169
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
170 $ revtest '--merge dirty linear' dirty 1 2 --merge
31166
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
171 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
172 parent=2
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
173 M foo
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
174
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
175 $ revtest '--merge dirty cross' dirty 3 4 --merge
31166
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
176 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
177 parent=4
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
178 M foo
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
179
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
180 $ revtest '--check dirtysub linear' dirtysub 1 2 --check
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 32698
diff changeset
181 abort: uncommitted changes in subrepository "sub"
16491
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
182 parent=1
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
183 M sub/suba
bfe89d65d651 update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents: 14485
diff changeset
184
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
185 $ norevtest '--check 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
186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
32698
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 31175
diff changeset
187 updated to "bd10386d478c: 2"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26713
diff changeset
188 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
189 parent=2
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
190
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
191 $ revtest '--check --clean dirty linear' dirty 1 2 "--check --clean"
44411
1e508097f570 update: simplify slightly
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44409
diff changeset
192 abort: cannot specify both --clean and --check
31166
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
193 parent=1
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
194 M foo
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
195
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
196 $ revtest '--merge -checkc dirty linear' dirty 1 2 "--merge --check"
44411
1e508097f570 update: simplify slightly
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44409
diff changeset
197 abort: cannot specify both --check and --merge
31166
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
198 parent=1
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
199 M foo
fad5e299cfc7 update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk <martinvonz@google.com>
parents: 30900
diff changeset
200
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
201 $ revtest '--merge -clean dirty linear' dirty 1 2 "--merge --clean"
44411
1e508097f570 update: simplify slightly
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44409
diff changeset
202 abort: cannot specify both --clean and --merge
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
203 parent=1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
204 M foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 9716
diff changeset
205
34705
23ed47a895d5 config: graduate experimental.updatecheck to commands.update.check
Augie Fackler <augie@google.com>
parents: 33773
diff changeset
206 $ echo '[commands]' >> .hg/hgrc
23ed47a895d5 config: graduate experimental.updatecheck to commands.update.check
Augie Fackler <augie@google.com>
parents: 33773
diff changeset
207 $ echo 'update.check = abort' >> .hg/hgrc
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
208
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
209 $ 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
210 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
211 parent=1
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
212 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
213
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
214 $ revtest 'none dirty linear' dirty 1 2 --check
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
215 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
216 parent=1
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
217 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
218
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
219 $ revtest '--merge none dirty linear' dirty 1 2 --check
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
220 abort: uncommitted changes
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
221 parent=1
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
222 M foo
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
223
48406
51f521900473 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48405
diff changeset
224 $ revtest '--merge none dirty linear' dirty 1 2 --merge
51f521900473 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48405
diff changeset
225 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
51f521900473 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48405
diff changeset
226 parent=2
51f521900473 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48405
diff changeset
227 M foo
51f521900473 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48405
diff changeset
228
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
229 $ revtest 'none dirty linear' dirty 1 2 --clean
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
230 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
231 parent=2
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
232
34705
23ed47a895d5 config: graduate experimental.updatecheck to commands.update.check
Augie Fackler <augie@google.com>
parents: 33773
diff changeset
233 $ echo 'update.check = none' >> .hg/hgrc
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
234
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
235 $ 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
236 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
237 parent=4
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
238 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
239
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
240 $ 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
241 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
242 parent=2
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
243 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
244
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
245 $ revtest 'none dirty linear' dirty 1 2 --check
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
246 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
247 parent=1
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
248 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
249
48405
acdd4a42deaa update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46418
diff changeset
250 $ revtest 'none dirty linear' dirty 1 2 --clean
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
251 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
252 parent=2
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 $ 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
255 $ 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
256 $ 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
257 merging a
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
258 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
259 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
260 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
261 [1]
44344
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
262 $ hg log -G --template '{rev}:{node|short} {parents} {branches}\n'
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
263 o 5:ff252e8273df b1
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
264 |
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
265 @ 4:d047485b3896 0:60829823a42a b1
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
266 |
44345
14d0e89520a2 graphlog: use '%' for other context in merge conflict
Martin von Zweigbergk <martinvonz@google.com>
parents: 44344
diff changeset
267 | % 3:6efa171f091b 1:0786582aa4b1
44344
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
268 | |
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
269 | | o 2:bd10386d478c
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
270 | |/
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
271 | o 1:0786582aa4b1
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
272 |/
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
273 o 0:60829823a42a
ab632e27f296 tests: add `hg log -G` output when there are merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 43939
diff changeset
274
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
275 $ hg st
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
276 M a
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
277 ? a.orig
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
278 # Unresolved merge conflicts:
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
279 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
280 # a
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
281 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
282 # To mark files as resolved: hg resolve --mark FILE
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
283
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
284 $ cat a
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
285 <<<<<<< 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
286 three
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
287 dirty
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
288 ||||||| base
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
289 three
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
290 =======
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
291 four
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
292 >>>>>>> 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
293 $ 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
294
34705
23ed47a895d5 config: graduate experimental.updatecheck to commands.update.check
Augie Fackler <augie@google.com>
parents: 33773
diff changeset
295 $ echo 'update.check = noconflict' >> .hg/hgrc
31168
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
296
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
297 $ 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
298 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
299 parent=4
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
300 M foo
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
301
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
302 $ 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
303 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
304 parent=2
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
305 M foo
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
306
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
307 $ 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
308 abort: uncommitted changes
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
309 parent=1
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
310 M foo
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
311
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
312 $ 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
313 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
314 parent=2
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
315
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
316 Locally added file is allowed
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
317 $ hg up -qC 3
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
318 $ echo a > bar
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
319 $ hg add bar
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
320 $ hg up -q 4
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
321 $ hg st
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
322 A bar
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
323 $ hg forget bar
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
324 $ rm bar
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
325
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
326 Locally removed file is allowed
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
327 $ 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
328 $ hg rm foo
31168
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
329 $ hg up -q 4
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
330
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
331 File conflict is not allowed
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
332 $ hg up -qC 3
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
333 $ echo dirty >> a
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
334 $ 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
335 abort: conflicting changes
7433b3bc55ee update: for "noconflict" updates, print "conflicting changes" on conflict
Martin von Zweigbergk <martinvonz@google.com>
parents: 31174
diff changeset
336 (commit or update --clean to discard changes)
46418
dc00324e80f4 errors: use StateError more in merge module
Martin von Zweigbergk <martinvonz@google.com>
parents: 45916
diff changeset
337 [20]
31168
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
338 $ hg up -m 4
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
339 merging a
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
340 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
341 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
342 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
343 [1]
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
344 $ rm a.orig
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
345 $ hg status
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
346 M a
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
347 # Unresolved merge conflicts:
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
348 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
349 # a
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
350 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
351 # To mark files as resolved: hg resolve --mark FILE
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
352
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
353 $ hg resolve -l
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
354 U a
31168
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
355
44408
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
356 Try to make empty commit while there are conflicts
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
357 $ hg revert -r . a
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
358 $ rm a.orig
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
359 $ hg ci -m empty
44409
f935b680860d commit: error out on unresolved files even if commit would be empty
Martin von Zweigbergk <martinvonz@google.com>
parents: 44408
diff changeset
360 abort: unresolved merge conflicts (see 'hg help resolve')
45916
fa87536d3d70 errors: raise StateError when there are unresolves merge conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents: 45911
diff changeset
361 [20]
44408
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
362 $ hg resolve -m a
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
363 (no more unresolved files)
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
364 $ hg resolve -l
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
365 R a
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
366 $ hg ci -m empty
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
367 nothing changed
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
368 [1]
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
369 $ hg resolve -l
6cf92d6c0ad5 tests: add test of committing with conflicts but no changes in wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 44345
diff changeset
370
31168
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
371 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
372 $ hg up -qC 3
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
373 $ hg rm foo
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
374 $ hg up -q 4
41a9edc5d00f update: allow setting default update check to "noconflict"
Martin von Zweigbergk <martinvonz@google.com>
parents: 31167
diff changeset
375
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
376 Uses default value of "linear" when value is misspelled
34705
23ed47a895d5 config: graduate experimental.updatecheck to commands.update.check
Augie Fackler <augie@google.com>
parents: 33773
diff changeset
377 $ echo 'update.check = linyar' >> .hg/hgrc
31167
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
378
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
379 $ 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
380 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
381 (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
382 parent=3
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
383 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
384
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
385 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
386 $ 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
387 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
388 parent=1
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
389 M foo
696e321b304d update: add experimental config for default way of handling dirty wdir
Martin von Zweigbergk <martinvonz@google.com>
parents: 31166
diff changeset
390
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 $ 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
392
30900
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
393 Test updating to null revision
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
394
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
395 $ hg init null-repo
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
396 $ cd null-repo
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
397 $ echo a > a
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
398 $ hg add a
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
399 $ hg ci -m a
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
400 $ hg up -qC 0
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
401 $ echo b > b
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
402 $ hg add b
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
403 $ hg up null
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
404 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
405 $ hg st
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
406 A b
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
407 $ hg up -q 0
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
408 $ hg st
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
409 A b
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
410 $ hg up -qC null
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
411 $ hg st
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
412 ? b
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
413 $ cd ..
23eed7d423b4 tests: add test for updating to null revision
Martin von Zweigbergk <martinvonz@google.com>
parents: 29964
diff changeset
414
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
415 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
416 ---------------------------------------------------------------------
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
417
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
418 $ 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
419 $ 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
420
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
421 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
422
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
423 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
424 - update to "."
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
425 - "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
426 - "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
427
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
428 $ 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
429 $ 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
430 $ 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
431 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
432 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
433 (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
434 parent=6
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
435
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
436 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
437 - 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
438 - "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
439
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
440 $ 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
441 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
442 parent=2
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 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
445 - 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
446 - "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
447 - "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
448
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
449 $ 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
450 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
451 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
452 (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
453 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
454
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
455 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
456
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
457 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
458 - update to "."
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
459 - "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
460 - "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
461
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 $ 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
463 $ 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
464 $ 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
465 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
466 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
467 (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
468 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
469
28385
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
470 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
471 - 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
472 - "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
473 - "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
474
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
475 $ 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
476 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
477 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
478 (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
479 parent=7
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
480
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
481 $ cd ..
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
482
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
483 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
484 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
485
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
486 $ 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
487 $ 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
488
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
489 $ hg branch foobar
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
490 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
491 (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
492 $ echo a > a
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
493 $ 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
494 adding a
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
495 $ echo 1 >> a
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
496 $ 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
497 $ 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
498 $ echo 3 >> a
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
499 $ 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
500 created new head
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
501 $ 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
502
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
503 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
504 - 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
505
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
506 $ 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
507 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
508 parent=1
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
509
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
510 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
511 - update to "tip"
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
512 - "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
513 - "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
514
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
515 $ 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
516 $ 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
517
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
518 $ 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
519 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
520 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
521 (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
522 parent=4
3f9e25a42e69 destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28266
diff changeset
523
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
524 $ 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
525
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
526 Test obsolescence behavior
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
527 ---------------------------------------------------------------------
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
528
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
529 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
530
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
531 $ cat << EOF >> $HGRCPATH
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
532 > [ui]
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
533 > logtemplate={rev}:{node|short} {desc|firstline}
22955
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 20281
diff changeset
534 > [experimental]
34866
1644623ab096 config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents: 34705
diff changeset
535 > evolution.createmarkers=True
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
536 > EOF
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
537
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
538 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
539
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
540 $ hg log -G
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
541 o 5:ff252e8273df 5
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
542 |
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
543 o 4:d047485b3896 4
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
544 |
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
545 | o 3:6efa171f091b 3
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
546 | |
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
547 | | o 2:bd10386d478c 2
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
548 | |/
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
549 | @ 1:0786582aa4b1 1
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
550 |/
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
551 o 0:60829823a42a 0
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
552
20107
2ca325ea57fa bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents: 19801
diff changeset
553 $ 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
554 $ hg status
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
555 M foo
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
556
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
557 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
558
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
559 $ 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
560 6efa171f091b00a3c35edc15d48c52a498929953
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
561 $ 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
562 d047485b3896813b2a624e86201983520f003206
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
563 $ hg debugobsolete 6efa171f091b00a3c35edc15d48c52a498929953 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
42893
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 37920
diff changeset
564 1 new obsolescence markers
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33365
diff changeset
565 obsoleted 1 changesets
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
566 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa d047485b3896813b2a624e86201983520f003206
42893
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 37920
diff changeset
567 1 new obsolescence markers
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
568
20107
2ca325ea57fa bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents: 19801
diff changeset
569 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
570 the bookmark (issue4015)
2ca325ea57fa bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents: 19801
diff changeset
571
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
572 $ 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
573 $ hg up 5
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
574 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
575 $ hg book bm
2ca325ea57fa bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents: 19801
diff changeset
576 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
577 $ hg bookmarks
2ca325ea57fa bookmarks: consider successor changesets when moving bookmark (issue4015)
Sean Farley <sean.michael.farley@gmail.com>
parents: 19801
diff changeset
578 * bm 5:ff252e8273df
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
579
37920
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
580 Test that we abort before we warn about the hidden commit if the working
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
581 directory is dirty
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
582 $ echo conflict > a
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
583 $ hg up --hidden 3
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
584 abort: uncommitted changes
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
585 (commit or update --clean to discard changes)
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
586 [255]
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
587
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
588 Test that we still warn also when there are conflicts
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
589 $ hg up -m --hidden 3
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
590 merging a
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
591 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
592 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
593 use 'hg resolve' to retry unresolved file merges
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
594 (leaving bookmark bm)
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
595 updated to hidden changeset 6efa171f091b
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
596 (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
597 [1]
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
598
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
599 Test that statuses are reported properly before and after merge resolution.
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
600 $ rm a.orig
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
601 $ hg resolve -l
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
602 U a
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
603 $ hg status
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
604 M a
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
605 M foo
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
606 # Unresolved merge conflicts:
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
607 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
608 # a
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
609 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
610 # To mark files as resolved: hg resolve --mark FILE
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
611
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
612
37920
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
613 $ hg revert -r . a
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
614
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
615 $ rm a.orig
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
616 $ hg resolve -l
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
617 U a
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
618 $ hg status
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
619 M foo
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
620 # Unresolved merge conflicts:
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
621 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
622 # a
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
623 #
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
624 # To mark files as resolved: hg resolve --mark FILE
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
625
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
626 $ hg status -Tjson
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
627 [
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
628 {
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
629 "itemtype": "file",
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
630 "path": "foo",
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
631 "status": "M"
43939
07ebb567e8bb status: make unresolved files always be in the morestatus structured output
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43938
diff changeset
632 },
07ebb567e8bb status: make unresolved files always be in the morestatus structured output
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43938
diff changeset
633 {
07ebb567e8bb status: make unresolved files always be in the morestatus structured output
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43938
diff changeset
634 "itemtype": "file",
07ebb567e8bb status: make unresolved files always be in the morestatus structured output
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43938
diff changeset
635 "path": "a",
07ebb567e8bb status: make unresolved files always be in the morestatus structured output
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43938
diff changeset
636 "unresolved": true
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
637 }
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
638 ]
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
639
37920
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
640 $ hg resolve -m
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
641 (no more unresolved files)
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
642
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
643 $ hg resolve -l
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
644 R a
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
645 $ hg status
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
646 M foo
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
647 # No unresolved merge conflicts.
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
648
43884
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
649 $ hg status -Tjson
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
650 [
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
651 {
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
652 "itemtype": "file",
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
653 "path": "foo",
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
654 "status": "M"
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
655 }
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
656 ]
5709a9992c2a update: add some tests for the status quo of morestatus on update conflicts
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 42893
diff changeset
657
20281
67ee87a371b2 update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents: 20280
diff changeset
658 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
659 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
660 $ hg up --quiet 0 # we should be able to update to 3 directly
43938
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
661 $ hg status
489fdf27769c status: make morestatus call out unresolved conflicts after update
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 43884
diff changeset
662 M foo
20280
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
663 $ hg up --quiet --hidden 3 # but not implemented yet.
37920
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
664 updated to hidden changeset 6efa171f091b
35711
35a0f6f31eef update: display the obsfate of hidden revision we update to
Boris Feld <boris.feld@octobus.net>
parents: 35518
diff changeset
665 (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
20281
67ee87a371b2 update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents: 20280
diff changeset
666 $ 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
667 $ hg up
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
668 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
669 updating bookmark bm
67ee87a371b2 update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents: 20280
diff changeset
670 $ hg book
67ee87a371b2 update: consider successor changesets when moving active bookmark
Sean Farley <sean.michael.farley@gmail.com>
parents: 20280
diff changeset
671 * bm 4:d047485b3896
20280
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
672
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
673 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
674 $ 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
675 $ hg up --quiet --hidden 3 # but not implemented yet.
37920
ea63a2004d09 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com>
parents: 35711
diff changeset
676 updated to hidden changeset 6efa171f091b
35711
35a0f6f31eef update: display the obsfate of hidden revision we update to
Boris Feld <boris.feld@octobus.net>
parents: 35518
diff changeset
677 (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
18985
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
678 $ hg up 5
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
679 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
680
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
681 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
682 $ hg up --quiet 0
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
683 $ hg up --quiet 2
a59e575c6ff8 update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17773
diff changeset
684 $ 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
685 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
686 (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
687 [255]
20280
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
688
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
689 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
690 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
691 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
692 $ 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
693 bd10386d478cd5a9faf2e604114c8e6da62d3889
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
694 $ hg up --quiet 0
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
695 $ hg up --quiet 2
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
696 $ hg debugobsolete bd10386d478cd5a9faf2e604114c8e6da62d3889
42893
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 37920
diff changeset
697 1 new obsolescence markers
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33365
diff changeset
698 obsoleted 1 changesets
20280
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
699 $ hg up
95b9c6149e17 merge: consider successor changesets for a bare update
Sean Farley <sean.michael.farley@gmail.com>
parents: 20117
diff changeset
700 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
701
a271925699d6 revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24473
diff changeset
702 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
703
a271925699d6 revset: reintroduce and experimental revset for update destination
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24473
diff changeset
704 $ 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
705 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
706
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
707 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
708 $ cat >> $HGRCPATH <<EOF
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
709 > [defaults]
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
710 > update = --check
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
711 > EOF
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
712 $ hg co 2
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
713 abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44437
diff changeset
714 [20]
29947
e1f0ec0b7d2d flags: allow specifying --no-boolean-flag on the command line (BC)
Augie Fackler <augie@google.com>
parents: 28683
diff changeset
715 $ 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
716 0 files updated, 0 files merged, 0 files removed, 0 files unresolved