##// END OF EJS Templates
rebase: restrict rebase destination to the pulled set (issue5214)...
Pierre-Yves David -
r29044:261c2537 stable
parent child Browse files
Show More
@@ -1244,6 +1244,9 b' def pullrebase(orig, ui, repo, *args, **'
1244 1244 # --source.
1245 1245 if 'source' in opts:
1246 1246 del opts['source']
1247 # revsprepull is the len of the repo, not revnum of tip.
1248 destspace = list(repo.changelog.revs(start=revsprepull))
1249 opts['_destspace'] = destspace
1247 1250 try:
1248 1251 rebase(ui, repo, **opts)
1249 1252 except error.NoMergeDestAbort:
@@ -311,3 +311,83 b' pull --rebase update (no rebase) use pro'
311 311 |
312 312 o 0: 'C1'
313 313
314
315 Multiple pre-existing heads on the branch
316 -----------------------------------------
317
318 Pull bring content, but nothing on the current branch, we should not consider
319 pre-existing heads.
320
321 $ cd ../a
322 $ hg branch unrelatedbranch
323 marked working directory as branch unrelatedbranch
324 (branches are permanent and global, did you want a bookmark?)
325 $ echo B1 > B1
326 $ hg commit -Am B1
327 adding B1
328 $ cd ../c
329 $ hg up 'desc(L2)'
330 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
331 $ hg pull --rebase
332 pulling from $TESTTMP/a (glob)
333 searching for changes
334 adding changesets
335 adding manifests
336 adding file changes
337 added 1 changesets with 1 changes to 1 files
338 nothing to rebase
339
340 There is two local heads and we pull a third one.
341 The second local head should not confuse the `hg pull rebase`.
342
343 $ hg up 'desc(R6)'
344 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
345 $ echo M1 > M1
346 $ hg commit -Am M1
347 adding M1
348 $ cd ../a
349 $ hg up 'desc(R6)'
350 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
351 $ echo R7 > R7
352 $ hg commit -Am R7
353 adding R7
354 $ cd ../c
355 $ hg up 'desc(L2)'
356 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
357 $ hg pull --rebase
358 pulling from $TESTTMP/a (glob)
359 searching for changes
360 adding changesets
361 adding manifests
362 adding file changes
363 added 1 changesets with 1 changes to 1 files (+1 heads)
364 rebasing 7:864e0a2d2614 "L1"
365 rebasing 8:6dc0ea5dcf55 "L2"
366 saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-backup.hg (glob)
367 $ hg tglog
368 @ 12: 'L2'
369 |
370 o 11: 'L1'
371 |
372 o 10: 'R7'
373 |
374 | o 9: 'M1'
375 |/
376 | o 8: 'B1' unrelatedbranch
377 |/
378 o 7: 'R6'
379 |
380 o 6: 'R5'
381 |
382 o 5: 'R4'
383 |
384 o 4: 'R3'
385 |
386 o 3: 'R2'
387 |
388 o 2: 'R1'
389 |
390 o 1: 'C2'
391 |
392 o 0: 'C1'
393
General Comments 0
You need to be logged in to leave comments. Login now