Show More
@@ -5570,6 +5570,11 b' def postincoming(ui, repo, modheads, opt' | |||
|
5570 | 5570 | if brev != repo._activebookmark: |
|
5571 | 5571 | ui.status(_("(activating bookmark %s)\n") % brev) |
|
5572 | 5572 | bookmarks.activate(repo, brev) |
|
5573 | elif brev: | |
|
5574 | if repo._activebookmark: | |
|
5575 | ui.status(_("(leaving bookmark %s)\n") % | |
|
5576 | repo._activebookmark) | |
|
5577 | bookmarks.deactivate(repo) | |
|
5573 | 5578 | return ret |
|
5574 | 5579 | if modheads > 1: |
|
5575 | 5580 | currentbranchheads = len(repo.branchheads()) |
@@ -123,4 +123,92 b' explicit destination of the update.' | |||
|
123 | 123 | * active-after-pull 4:f815b3da6163 |
|
124 | 124 | active-before-pull 3:483b76ad4309 |
|
125 | 125 | |
|
126 | (discard pulled changes) | |
|
127 | ||
|
128 | $ hg update -q 483b76ad4309 | |
|
129 | $ hg rollback -q | |
|
130 | ||
|
131 | Test that updating deactivates current active bookmark, if the | |
|
132 | destination of the update is explicitly specified, and it doesn't | |
|
133 | match with the name of any exsiting bookmarks. | |
|
134 | ||
|
135 | $ cd ../t | |
|
136 | $ hg bookmark -d active-after-pull | |
|
137 | $ hg branch bar -q | |
|
138 | $ hg commit -m "#5 (bar #1)" | |
|
139 | $ cd ../tt | |
|
140 | ||
|
141 | (1) deactivating by --rev REV | |
|
142 | ||
|
143 | $ hg bookmark -f active-before-pull | |
|
144 | $ hg bookmarks | |
|
145 | * active-before-pull 3:483b76ad4309 | |
|
146 | ||
|
147 | $ hg pull -u -r b5e4babfaaa7 | |
|
148 | pulling from $TESTTMP/t (glob) | |
|
149 | searching for changes | |
|
150 | adding changesets | |
|
151 | adding manifests | |
|
152 | adding file changes | |
|
153 | added 2 changesets with 1 changes to 1 files | |
|
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
155 | (leaving bookmark active-before-pull) | |
|
156 | ||
|
157 | $ hg parents -q | |
|
158 | 5:b5e4babfaaa7 | |
|
159 | $ hg bookmarks | |
|
160 | active-before-pull 3:483b76ad4309 | |
|
161 | ||
|
162 | (discard pulled changes) | |
|
163 | ||
|
164 | $ hg update -q 483b76ad4309 | |
|
165 | $ hg rollback -q | |
|
166 | ||
|
167 | (2) deactivating by --branch BRANCH | |
|
168 | ||
|
169 | $ hg bookmark -f active-before-pull | |
|
170 | $ hg bookmarks | |
|
171 | * active-before-pull 3:483b76ad4309 | |
|
172 | ||
|
173 | $ hg pull -u -b bar | |
|
174 | pulling from $TESTTMP/t (glob) | |
|
175 | searching for changes | |
|
176 | adding changesets | |
|
177 | adding manifests | |
|
178 | adding file changes | |
|
179 | added 2 changesets with 1 changes to 1 files | |
|
180 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
181 | (leaving bookmark active-before-pull) | |
|
182 | ||
|
183 | $ hg parents -q | |
|
184 | 5:b5e4babfaaa7 | |
|
185 | $ hg bookmarks | |
|
186 | active-before-pull 3:483b76ad4309 | |
|
187 | ||
|
188 | (discard pulled changes) | |
|
189 | ||
|
190 | $ hg update -q 483b76ad4309 | |
|
191 | $ hg rollback -q | |
|
192 | ||
|
193 | (3) deactivating by URL#ANOTHER-BRANCH | |
|
194 | ||
|
195 | $ hg bookmark -f active-before-pull | |
|
196 | $ hg bookmarks | |
|
197 | * active-before-pull 3:483b76ad4309 | |
|
198 | ||
|
199 | $ hg pull -u $TESTTMP/t#bar | |
|
200 | pulling from $TESTTMP/t (glob) | |
|
201 | searching for changes | |
|
202 | adding changesets | |
|
203 | adding manifests | |
|
204 | adding file changes | |
|
205 | added 2 changesets with 1 changes to 1 files | |
|
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
207 | (leaving bookmark active-before-pull) | |
|
208 | ||
|
209 | $ hg parents -q | |
|
210 | 5:b5e4babfaaa7 | |
|
211 | $ hg bookmarks | |
|
212 | active-before-pull 3:483b76ad4309 | |
|
213 | ||
|
126 | 214 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now