Show More
@@ -662,6 +662,16 b' def rebase(ui, repo, **opts):' | |||
|
662 | 662 | |
|
663 | 663 | hg rebase -r "branch(featureX)" -d 1.3 --keepbranches |
|
664 | 664 | |
|
665 | Configuration Options: | |
|
666 | ||
|
667 | You can make rebase require a destination if you set the following config | |
|
668 | option: | |
|
669 | ||
|
670 | [commands] | |
|
671 | rebase.requiredest = False | |
|
672 | ||
|
673 | Return Values: | |
|
674 | ||
|
665 | 675 | Returns 0 on success, 1 if nothing to rebase or there are |
|
666 | 676 | unresolved conflicts. |
|
667 | 677 | |
@@ -675,6 +685,12 b' def rebase(ui, repo, **opts):' | |||
|
675 | 685 | |
|
676 | 686 | # Validate input and define rebasing points |
|
677 | 687 | destf = opts.get('dest', None) |
|
688 | ||
|
689 | if ui.config('commands', 'rebase.requiredest', False): | |
|
690 | if not destf: | |
|
691 | raise error.Abort(_('you must specify a destination'), | |
|
692 | hint=_('use: hg rebase -d REV')) | |
|
693 | ||
|
678 | 694 | srcf = opts.get('source', None) |
|
679 | 695 | basef = opts.get('base', None) |
|
680 | 696 | revf = opts.get('rev', []) |
@@ -391,3 +391,25 b' Multiple roots. Two children share two p' | |||
|
391 | 391 | / |
|
392 | 392 | o 0: A |
|
393 | 393 | |
|
394 | Require a destination | |
|
395 | $ cat >> $HGRCPATH <<EOF | |
|
396 | > [commands] | |
|
397 | > rebase.requiredest = True | |
|
398 | > EOF | |
|
399 | $ hg init repo | |
|
400 | $ cd repo | |
|
401 | $ echo a >> a | |
|
402 | $ hg commit -qAm aa | |
|
403 | $ echo b >> b | |
|
404 | $ hg commit -qAm bb | |
|
405 | $ hg up ".^" | |
|
406 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
407 | $ echo c >> c | |
|
408 | $ hg commit -qAm cc | |
|
409 | $ hg rebase | |
|
410 | abort: you must specify a destination | |
|
411 | (use: hg rebase -d REV) | |
|
412 | [255] | |
|
413 | $ hg rebase -d 1 | |
|
414 | rebasing 2:5db65b93a12b "cc" (tip) | |
|
415 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-backup.hg (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now