##// END OF EJS Templates
rebase: 'hg pull --rebase' now update only if there was nothing to rebase...
Pierre-Yves David -
r28117:41a0fb2b default
parent child Browse files
Show More
@@ -1165,15 +1165,16 b' def pullrebase(orig, ui, repo, *args, **'
1165 # --source.
1165 # --source.
1166 if 'source' in opts:
1166 if 'source' in opts:
1167 del opts['source']
1167 del opts['source']
1168 rebase(ui, repo, **opts)
1168 if rebase(ui, repo, **opts) == _nothingtorebase():
1169 branch = repo[None].branch()
1169 branch = repo[None].branch()
1170 dest = repo[branch].rev()
1170 dest = repo[branch].rev()
1171 if dest != repo['.'].rev():
1171 if dest != repo['.'].rev():
1172 # there was nothing to rebase we force an update
1172 # there was nothing to rebase we force an update
1173 hg.update(repo, dest)
1173 hg.update(repo, dest)
1174 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
1174 if bookmarks.update(repo, [movemarkfrom],
1175 ui.status(_("updating bookmark %s\n")
1175 repo['.'].node()):
1176 % repo._activebookmark)
1176 ui.status(_("updating bookmark %s\n")
1177 % repo._activebookmark)
1177 finally:
1178 finally:
1178 release(lock, wlock)
1179 release(lock, wlock)
1179 else:
1180 else:
@@ -209,3 +209,60 b' pull --rebase works with bundle2 turned '
209 |
209 |
210 o 0: 'C1'
210 o 0: 'C1'
211
211
212
213 pull --rebase only update if there is nothing to rebase
214
215 $ cd ../a
216 $ echo R5 > R5
217 $ hg ci -Am R5
218 adding R5
219 $ hg tglog
220 @ 6: 'R5'
221 |
222 o 5: 'R4'
223 |
224 o 4: 'R3'
225 |
226 o 3: 'R2'
227 |
228 o 2: 'R1'
229 |
230 o 1: 'C2'
231 |
232 o 0: 'C1'
233
234 $ cd ../c
235 $ echo L2 > L2
236 $ hg ci -Am L2
237 adding L2
238 $ hg up 'desc(L1)'
239 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
240 $ hg pull --rebase
241 pulling from $TESTTMP/a (glob)
242 searching for changes
243 adding changesets
244 adding manifests
245 adding file changes
246 added 1 changesets with 1 changes to 1 files (+1 heads)
247 rebasing 6:0d0727eb7ce0 "L1"
248 rebasing 7:c1f58876e3bf "L2"
249 saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-backup.hg (glob)
250 $ hg tglog
251 o 8: 'L2'
252 |
253 @ 7: 'L1'
254 |
255 o 6: 'R5'
256 |
257 o 5: 'R4'
258 |
259 o 4: 'R3'
260 |
261 o 3: 'R2'
262 |
263 o 2: 'R1'
264 |
265 o 1: 'C2'
266 |
267 o 0: 'C1'
268
General Comments 0
You need to be logged in to leave comments. Login now