Show More
@@ -92,7 +92,8 b' def _destupdatebranch(repo, clean, check' | |||
|
92 | 92 | wc = repo[None] |
|
93 | 93 | movemark = node = None |
|
94 | 94 | try: |
|
95 |
node = repo. |
|
|
95 | node = repo.revs('max(.::(head() and branch(%s)))' | |
|
96 | , wc.branch()).first() | |
|
96 | 97 | if bookmarks.isactivewdirparent(repo): |
|
97 | 98 | movemark = repo['.'].node() |
|
98 | 99 | except error.RepoLookupError: |
@@ -735,35 +735,12 b' tipmost surviving ancestor of the stripp' | |||
|
735 | 735 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
736 | 736 | summary: 0 |
|
737 | 737 | |
|
738 | test non-linear update not clearing active bookmark | |
|
739 | ||
|
740 | $ hg up 1 | |
|
741 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
742 | (leaving bookmark four) | |
|
743 | $ hg book drop | |
|
744 | $ hg up -C | |
|
745 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
746 | (leaving bookmark drop) | |
|
747 | 1 other heads for branch "default" | |
|
748 | $ hg sum | |
|
749 | parent: 2:db815d6d32e6 | |
|
750 | 2 | |
|
751 | branch: default | |
|
752 | bookmarks: should-end-on-two | |
|
753 | commit: 2 unknown (clean) | |
|
754 | update: 1 new changesets, 2 branch heads (merge) | |
|
755 | phases: 4 draft | |
|
756 | $ hg book | |
|
757 | drop 1:925d80f479bb | |
|
758 | four 3:9ba5f110a0b3 | |
|
759 | should-end-on-two 2:db815d6d32e6 | |
|
760 | $ hg book -d drop | |
|
761 | $ hg up four | |
|
762 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
763 | (activating bookmark four) | |
|
764 | 738 | |
|
765 | 739 | no-op update doesn't deactive bookmarks |
|
766 | 740 | |
|
741 | $ hg up four | |
|
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
743 | (activating bookmark four) | |
|
767 | 744 | $ hg up |
|
768 | 745 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
769 | 746 | $ hg sum |
@@ -189,7 +189,7 b' conditional above.' | |||
|
189 | 189 | Inject corruption into the largefiles store and see how update handles that: |
|
190 | 190 | |
|
191 | 191 | $ cd src |
|
192 | $ hg up -qC | |
|
192 | $ hg up -qC tip | |
|
193 | 193 | $ cat large |
|
194 | 194 | modified |
|
195 | 195 | $ rm large |
@@ -212,7 +212,7 b' Verify how the output looks and and how ' | |||
|
212 | 212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
213 | 213 | (branch merge, don't forget to commit) |
|
214 | 214 | |
|
215 | $ hg up -qC | |
|
215 | $ hg up -qC tip | |
|
216 | 216 | $ hg merge -v |
|
217 | 217 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
218 | 218 |
@@ -13,18 +13,13 b'' | |||
|
13 | 13 | created new head |
|
14 | 14 | $ hg update 1 |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | $ hg update | |
|
17 | abort: not a linear update | |
|
18 | (merge or update --check to force update) | |
|
19 | [255] | |
|
20 | 16 |
$ |
|
21 | $ hg update -c | |
|
17 | $ hg update -c 2 | |
|
22 | 18 | abort: uncommitted changes |
|
23 | 19 | [255] |
|
24 | 20 | $ hg revert b |
|
25 | $ hg update -c | |
|
21 | $ hg update -c 2 | |
|
26 | 22 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
27 | 1 other heads for branch "default" | |
|
28 | 23 |
$ |
|
29 | 24 | |
|
30 | 25 | Should abort: |
@@ -16,7 +16,7 b'' | |||
|
16 | 16 | $ echo 1.2 > foo |
|
17 | 17 | $ hg ci -Am m |
|
18 | 18 | |
|
19 | Should not update: | |
|
19 | Should not update to the other topological branch: | |
|
20 | 20 | |
|
21 | 21 | $ hg pull -u ../tt |
|
22 | 22 | pulling from ../tt |
@@ -25,13 +25,12 b' Should not update:' | |||
|
25 | 25 | adding manifests |
|
26 | 26 | adding file changes |
|
27 | 27 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
28 | abort: not updating: not a linear update | |
|
29 | (merge or update --check to force update) | |
|
30 | [255] | |
|
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
29 | 1 other heads for branch "default" | |
|
31 | 30 | |
|
32 | 31 | $ cd ../tt |
|
33 | 32 | |
|
34 | Should not update: | |
|
33 | Should not update to the other branch: | |
|
35 | 34 | |
|
36 | 35 | $ hg pull -u ../t |
|
37 | 36 | pulling from ../t |
@@ -40,9 +39,8 b' Should not update:' | |||
|
40 | 39 | adding manifests |
|
41 | 40 | adding file changes |
|
42 | 41 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
43 | abort: not updating: not a linear update | |
|
44 | (merge or update --check to force update) | |
|
45 | [255] | |
|
42 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
43 | 1 other heads for branch "default" | |
|
46 | 44 | |
|
47 | 45 | $ HGMERGE=true hg merge |
|
48 | 46 | merging foo |
@@ -172,9 +172,8 b' create a second head' | |||
|
172 | 172 | summary: 2 |
|
173 | 173 | |
|
174 | 174 | $ hg --debug up |
|
175 | abort: uncommitted changes | |
|
176 | (commit and merge, or update --clean to discard changes) | |
|
177 | [255] | |
|
175 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
176 | 1 other heads for branch "default" | |
|
178 | 177 | |
|
179 | 178 | test conflicting untracked files |
|
180 | 179 |
@@ -93,8 +93,8 b' Cases are run as shown in that table, ro' | |||
|
93 | 93 | parent=5 |
|
94 | 94 | |
|
95 | 95 | $ norevtest 'none clean same' clean 2 |
|
96 | abort: not a linear update | |
|
97 | (merge or update --check to force update) | |
|
96 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
97 | 1 other heads for branch "default" | |
|
98 | 98 | parent=2 |
|
99 | 99 | |
|
100 | 100 | |
@@ -140,8 +140,8 b' Cases are run as shown in that table, ro' | |||
|
140 | 140 | M foo |
|
141 | 141 | |
|
142 | 142 | $ norevtest 'none dirty cross' dirty 2 |
|
143 | abort: uncommitted changes | |
|
144 | (commit and merge, or update --clean to discard changes) | |
|
143 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
144 | 1 other heads for branch "default" | |
|
145 | 145 | parent=2 |
|
146 | 146 | M foo |
|
147 | 147 | |
@@ -166,9 +166,9 b' Cases are run as shown in that table, ro' | |||
|
166 | 166 | M sub/suba |
|
167 | 167 | |
|
168 | 168 | $ norevtest '-c clean same' clean 2 -c |
|
169 |
|
|
|
169 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
170 | 170 | 1 other heads for branch "default" |
|
171 |
parent= |
|
|
171 | parent=2 | |
|
172 | 172 | |
|
173 | 173 | $ revtest '-cC dirty linear' dirty 1 2 -cC |
|
174 | 174 | abort: cannot specify both -c/--check and -C/--clean |
General Comments 0
You need to be logged in to leave comments.
Login now