##// END OF EJS Templates
update: change default destination to tipmost descendant (issue4673) (BC)...
Pierre-Yves David -
r28065:6b1fc09c default
parent child Browse files
Show More
@@ -92,7 +92,8 b' def _destupdatebranch(repo, clean, check'
92 wc = repo[None]
92 wc = repo[None]
93 movemark = node = None
93 movemark = node = None
94 try:
94 try:
95 node = repo.branchtip(wc.branch())
95 node = repo.revs('max(.::(head() and branch(%s)))'
96 , wc.branch()).first()
96 if bookmarks.isactivewdirparent(repo):
97 if bookmarks.isactivewdirparent(repo):
97 movemark = repo['.'].node()
98 movemark = repo['.'].node()
98 except error.RepoLookupError:
99 except error.RepoLookupError:
@@ -735,35 +735,12 b' tipmost surviving ancestor of the stripp'
735 date: Thu Jan 01 00:00:00 1970 +0000
735 date: Thu Jan 01 00:00:00 1970 +0000
736 summary: 0
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 no-op update doesn't deactive bookmarks
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 $ hg up
744 $ hg up
768 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
745 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
769 $ hg sum
746 $ hg sum
@@ -189,7 +189,7 b' conditional above.'
189 Inject corruption into the largefiles store and see how update handles that:
189 Inject corruption into the largefiles store and see how update handles that:
190
190
191 $ cd src
191 $ cd src
192 $ hg up -qC
192 $ hg up -qC tip
193 $ cat large
193 $ cat large
194 modified
194 modified
195 $ rm large
195 $ rm large
@@ -212,7 +212,7 b' Verify how the output looks and and how '
212 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
212 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
213 (branch merge, don't forget to commit)
213 (branch merge, don't forget to commit)
214
214
215 $ hg up -qC
215 $ hg up -qC tip
216 $ hg merge -v
216 $ hg merge -v
217 note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
217 note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd
218
218
@@ -13,18 +13,13 b''
13 created new head
13 created new head
14 $ hg update 1
14 $ hg update 1
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
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 $ rm b
16 $ rm b
21 $ hg update -c
17 $ hg update -c 2
22 abort: uncommitted changes
18 abort: uncommitted changes
23 [255]
19 [255]
24 $ hg revert b
20 $ hg revert b
25 $ hg update -c
21 $ hg update -c 2
26 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
22 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 1 other heads for branch "default"
28 $ mv a c
23 $ mv a c
29
24
30 Should abort:
25 Should abort:
@@ -16,7 +16,7 b''
16 $ echo 1.2 > foo
16 $ echo 1.2 > foo
17 $ hg ci -Am m
17 $ hg ci -Am m
18
18
19 Should not update:
19 Should not update to the other topological branch:
20
20
21 $ hg pull -u ../tt
21 $ hg pull -u ../tt
22 pulling from ../tt
22 pulling from ../tt
@@ -25,13 +25,12 b' Should not update:'
25 adding manifests
25 adding manifests
26 adding file changes
26 adding file changes
27 added 1 changesets with 1 changes to 1 files (+1 heads)
27 added 1 changesets with 1 changes to 1 files (+1 heads)
28 abort: not updating: not a linear update
28 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 (merge or update --check to force update)
29 1 other heads for branch "default"
30 [255]
31
30
32 $ cd ../tt
31 $ cd ../tt
33
32
34 Should not update:
33 Should not update to the other branch:
35
34
36 $ hg pull -u ../t
35 $ hg pull -u ../t
37 pulling from ../t
36 pulling from ../t
@@ -40,9 +39,8 b' Should not update:'
40 adding manifests
39 adding manifests
41 adding file changes
40 adding file changes
42 added 1 changesets with 1 changes to 1 files (+1 heads)
41 added 1 changesets with 1 changes to 1 files (+1 heads)
43 abort: not updating: not a linear update
42 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 (merge or update --check to force update)
43 1 other heads for branch "default"
45 [255]
46
44
47 $ HGMERGE=true hg merge
45 $ HGMERGE=true hg merge
48 merging foo
46 merging foo
@@ -172,9 +172,8 b' create a second head'
172 summary: 2
172 summary: 2
173
173
174 $ hg --debug up
174 $ hg --debug up
175 abort: uncommitted changes
175 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 (commit and merge, or update --clean to discard changes)
176 1 other heads for branch "default"
177 [255]
178
177
179 test conflicting untracked files
178 test conflicting untracked files
180
179
@@ -93,8 +93,8 b' Cases are run as shown in that table, ro'
93 parent=5
93 parent=5
94
94
95 $ norevtest 'none clean same' clean 2
95 $ norevtest 'none clean same' clean 2
96 abort: not a linear update
96 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 (merge or update --check to force update)
97 1 other heads for branch "default"
98 parent=2
98 parent=2
99
99
100
100
@@ -140,8 +140,8 b' Cases are run as shown in that table, ro'
140 M foo
140 M foo
141
141
142 $ norevtest 'none dirty cross' dirty 2
142 $ norevtest 'none dirty cross' dirty 2
143 abort: uncommitted changes
143 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
144 (commit and merge, or update --clean to discard changes)
144 1 other heads for branch "default"
145 parent=2
145 parent=2
146 M foo
146 M foo
147
147
@@ -166,9 +166,9 b' Cases are run as shown in that table, ro'
166 M sub/suba
166 M sub/suba
167
167
168 $ norevtest '-c clean same' clean 2 -c
168 $ norevtest '-c clean same' clean 2 -c
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 1 other heads for branch "default"
170 1 other heads for branch "default"
171 parent=3
171 parent=2
172
172
173 $ revtest '-cC dirty linear' dirty 1 2 -cC
173 $ revtest '-cC dirty linear' dirty 1 2 -cC
174 abort: cannot specify both -c/--check and -C/--clean
174 abort: cannot specify both -c/--check and -C/--clean
General Comments 0
You need to be logged in to leave comments. Login now