author | Augie Fackler <raf@durin42.com> |
Thu, 19 Sep 2013 15:29:28 -0400 | |
changeset 19759 | 1b8054b98d68 |
parent 18985 | a59e575c6ff8 |
child 19798 | 76df01e56e7f |
permissions | -rw-r--r-- |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
1 |
# Construct the following history tree: |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
2 |
# |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
3 |
# @ 5:e1bb631146ca b1 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
4 |
# | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
5 |
# o 4:a4fdb3b883c4 0:b608b9236435 b1 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
6 |
# | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
7 |
# | o 3:4b57d2520816 1:44592833ba9f |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
8 |
# | | |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
9 |
# | | o 2:063f31070f65 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
10 |
# | |/ |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
11 |
# | o 1:44592833ba9f |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
12 |
# |/ |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
13 |
# o 0:b608b9236435 |
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
14 |
|
17773
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
15 |
$ mkdir b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
16 |
$ cd b1 |
12279 | 17 |
$ hg init |
18 |
$ echo foo > foo |
|
19 |
$ echo zero > a |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
20 |
$ hg init sub |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
21 |
$ echo suba > sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
22 |
$ hg --cwd sub ci -Am addsuba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
23 |
adding suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
24 |
$ echo 'sub = sub' > .hgsub |
12279 | 25 |
$ hg ci -qAm0 |
26 |
$ echo one > a ; hg ci -m1 |
|
27 |
$ echo two > a ; hg ci -m2 |
|
28 |
$ hg up -q 1 |
|
29 |
$ echo three > a ; hg ci -qm3 |
|
30 |
$ hg up -q 0 |
|
31 |
$ hg branch -q b1 |
|
32 |
$ echo four > a ; hg ci -qm4 |
|
33 |
$ echo five > a ; hg ci -qm5 |
|
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
34 |
|
12279 | 35 |
Initial repo state: |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
36 |
|
12279 | 37 |
$ hg --config 'extensions.graphlog=' \ |
38 |
> glog --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
|
39 |
@ 5:ff252e8273df b1 |
12279 | 40 |
| |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
41 |
o 4:d047485b3896 0:60829823a42a b1 |
12279 | 42 |
| |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
43 |
| o 3:6efa171f091b 1:0786582aa4b1 |
12279 | 44 |
| | |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
45 |
| | o 2:bd10386d478c |
12279 | 46 |
| |/ |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
47 |
| o 1:0786582aa4b1 |
12279 | 48 |
|/ |
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
49 |
o 0:60829823a42a |
12279 | 50 |
|
51 |
||
17773
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
52 |
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
|
53 |
|
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
54 |
$ cd .. |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
55 |
$ hg update b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
56 |
abort: no repository found in '$TESTTMP' (.hg not found)! |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
57 |
[255] |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
58 |
$ cd b1 |
434e5bd615fc
commands: don't infer repo for commands like update (issue2748)
Siddharth Agarwal <sid0@fb.com>
parents:
17347
diff
changeset
|
59 |
|
12279 | 60 |
Test helper functions: |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
61 |
|
12279 | 62 |
$ revtest () { |
63 |
> msg=$1 |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
64 |
> dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub' |
12279 | 65 |
> startrev=$3 |
66 |
> targetrev=$4 |
|
67 |
> opt=$5 |
|
68 |
> hg up -qC $startrev |
|
69 |
> test $dirtyflag = dirty && echo dirty > foo |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
70 |
> test $dirtyflag = dirtysub && echo dirty > sub/suba |
12279 | 71 |
> hg up $opt $targetrev |
72 |
> hg parent --template 'parent={rev}\n' |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
73 |
> 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
|
74 |
> } |
12279 | 75 |
|
76 |
$ norevtest () { |
|
77 |
> msg=$1 |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
78 |
> dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub' |
12279 | 79 |
> startrev=$3 |
80 |
> opt=$4 |
|
81 |
> hg up -qC $startrev |
|
82 |
> test $dirtyflag = dirty && echo dirty > foo |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
83 |
> test $dirtyflag = dirtysub && echo dirty > sub/suba |
12279 | 84 |
> hg up $opt |
85 |
> hg parent --template 'parent={rev}\n' |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
86 |
> 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
|
87 |
> } |
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
88 |
|
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
89 |
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
|
90 |
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
|
91 |
|
12279 | 92 |
$ norevtest 'none clean linear' clean 4 |
93 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 |
parent=5 |
|
95 |
||
96 |
$ norevtest 'none clean same' clean 2 |
|
14485
610873cf064a
Make pull -u behave like pull && update
Brendan Cully <brendan@kublai.com>
parents:
12681
diff
changeset
|
97 |
abort: crosses branches (merge branches or update --check to force update) |
12279 | 98 |
parent=2 |
99 |
||
100 |
||
101 |
$ revtest 'none clean linear' clean 1 2 |
|
102 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
103 |
parent=2 |
|
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
104 |
|
12279 | 105 |
$ revtest 'none clean same' clean 2 3 |
106 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 |
parent=3 |
|
108 |
||
109 |
$ revtest 'none clean cross' clean 3 4 |
|
110 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 |
parent=4 |
|
112 |
||
113 |
||
114 |
$ revtest 'none dirty linear' dirty 1 2 |
|
115 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 |
parent=2 |
|
117 |
M foo |
|
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
118 |
|
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
119 |
$ revtest 'none dirtysub linear' dirtysub 1 2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
120 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
121 |
parent=2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
122 |
M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
123 |
|
12279 | 124 |
$ revtest 'none dirty same' dirty 2 3 |
12681
bc13e17067d9
update: use higher level wording for "crosses branches" error
Brodie Rao <brodie@bitheap.org>
parents:
12328
diff
changeset
|
125 |
abort: crosses branches (merge branches or use --clean to discard changes) |
12279 | 126 |
parent=2 |
127 |
M foo |
|
128 |
||
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
129 |
$ revtest 'none dirtysub same' dirtysub 2 3 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
130 |
abort: crosses branches (merge branches or use --clean to discard changes) |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
131 |
parent=2 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
132 |
M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
133 |
|
12279 | 134 |
$ revtest 'none dirty cross' dirty 3 4 |
12681
bc13e17067d9
update: use higher level wording for "crosses branches" error
Brodie Rao <brodie@bitheap.org>
parents:
12328
diff
changeset
|
135 |
abort: crosses branches (merge branches or use --clean to discard changes) |
12279 | 136 |
parent=3 |
137 |
M foo |
|
138 |
||
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
139 |
$ revtest 'none dirtysub cross' dirtysub 3 4 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
140 |
abort: crosses branches (merge branches or use --clean to discard changes) |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
141 |
parent=3 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
142 |
M sub/suba |
12279 | 143 |
|
144 |
$ revtest '-C dirty linear' dirty 1 2 -C |
|
145 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
146 |
parent=2 |
|
9716
ea8c207a0f78
update: add comments and test cases for updating across branches
Stuart W Marks <smarks@smarks.org>
parents:
diff
changeset
|
147 |
|
12279 | 148 |
$ revtest '-c dirty linear' dirty 1 2 -c |
149 |
abort: uncommitted local changes |
|
150 |
parent=1 |
|
151 |
M foo |
|
152 |
||
16491
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
153 |
$ revtest '-c dirtysub linear' dirtysub 1 2 -c |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
154 |
abort: uncommitted local changes |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
155 |
parent=1 |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
156 |
M sub/suba |
bfe89d65d651
update: make --check abort with dirty subrepos
Patrick Mezard <patrick@mezard.eu>
parents:
14485
diff
changeset
|
157 |
|
12279 | 158 |
$ norevtest '-c clean same' clean 2 -c |
159 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
160 |
parent=3 |
|
161 |
||
162 |
$ revtest '-cC dirty linear' dirty 1 2 -cC |
|
163 |
abort: cannot specify both -c/--check and -C/--clean |
|
164 |
parent=1 |
|
165 |
M foo |
|
166 |
||
18985
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
167 |
Test obsolescence behavior |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
168 |
--------------------------------------------------------------------- |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
169 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
170 |
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
|
171 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
172 |
$ cat << EOF >> $HGRCPATH |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
173 |
> [extensions] |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
174 |
> obs=$TESTTMP/obs.py |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
175 |
> [ui] |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
176 |
> logtemplate={rev}:{node|short} {desc|firstline} |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
177 |
> EOF |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
178 |
$ cat > $TESTTMP/obs.py << EOF |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
179 |
> import mercurial.obsolete |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
180 |
> mercurial.obsolete._enabled = True |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
181 |
> EOF |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
182 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
183 |
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
|
184 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
185 |
$ hg log -G |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
186 |
o 5:ff252e8273df 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
187 |
| |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
188 |
o 4:d047485b3896 4 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
189 |
| |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
190 |
| o 3:6efa171f091b 3 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
191 |
| | |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
192 |
| | o 2:bd10386d478c 2 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
193 |
| |/ |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
194 |
| @ 1:0786582aa4b1 1 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
195 |
|/ |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
196 |
o 0:60829823a42a 0 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
197 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
198 |
$ hg status |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
199 |
M foo |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
200 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
201 |
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
|
202 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
203 |
$ 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
|
204 |
6efa171f091b00a3c35edc15d48c52a498929953 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
205 |
$ 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
|
206 |
d047485b3896813b2a624e86201983520f003206 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
207 |
$ hg debugobsolete 6efa171f091b00a3c35edc15d48c52a498929953 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
208 |
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa d047485b3896813b2a624e86201983520f003206 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
209 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
210 |
Test that 5 is detected as a valid destination from 3 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
211 |
$ 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
|
212 |
$ hg up 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
213 |
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
|
214 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
215 |
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
|
216 |
$ 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
|
217 |
$ hg up --quiet --hidden 3 # but not implemented yet. |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
218 |
$ hg up 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
219 |
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
|
220 |
|
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
221 |
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
|
222 |
$ hg up --quiet 0 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
223 |
$ hg up --quiet 2 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
224 |
$ hg up 5 |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
225 |
abort: crosses branches (merge branches or use --clean to discard changes) |
a59e575c6ff8
update: allow dirty update to foreground (successors)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17773
diff
changeset
|
226 |
[255] |