Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG35b3f686157a: rebase: correct misleading message in --confirm option
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/rebase.py (2 lines) | |||
M | tests/test-rebase-inmemory.t (8 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Sushil khanchi | Jul 12 2018, 1:05 PM |
return _dorebase(ui, repo, opts, inmemory=False) | return _dorebase(ui, repo, opts, inmemory=False) | ||||
else: | else: | ||||
return _dorebase(ui, repo, opts) | return _dorebase(ui, repo, opts) | ||||
def _dryrunrebase(ui, repo, opts): | def _dryrunrebase(ui, repo, opts): | ||||
rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts) | rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts) | ||||
confirm = opts.get('confirm') | confirm = opts.get('confirm') | ||||
if confirm: | if confirm: | ||||
ui.status(_('starting rebase...\n')) | ui.status(_('starting in-memory rebase\n')) | ||||
else: | else: | ||||
ui.status(_('starting dry-run rebase; repository will not be ' | ui.status(_('starting dry-run rebase; repository will not be ' | ||||
'changed\n')) | 'changed\n')) | ||||
with repo.wlock(), repo.lock(): | with repo.wlock(), repo.lock(): | ||||
needsabort = True | needsabort = True | ||||
try: | try: | ||||
overrides = {('rebase', 'singletransaction'): True} | overrides = {('rebase', 'singletransaction'): True} | ||||
with ui.configoverride(overrides, 'rebase'): | with ui.configoverride(overrides, 'rebase'): |
$ hg rebase -s 2 -d . --confirm --continue | $ hg rebase -s 2 -d . --confirm --continue | ||||
abort: cannot specify both --confirm and --continue | abort: cannot specify both --confirm and --continue | ||||
[255] | [255] | ||||
Test --confirm option when there are no conflicts: | Test --confirm option when there are no conflicts: | ||||
$ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | ||||
> n | > n | ||||
> EOF | > EOF | ||||
starting rebase... | starting in-memory rebase | ||||
rebasing 2:177f92b77385 "c" | rebasing 2:177f92b77385 "c" | ||||
rebasing 3:055a42cdd887 "d" | rebasing 3:055a42cdd887 "d" | ||||
rebasing 4:e860deea161a "e" | rebasing 4:e860deea161a "e" | ||||
rebase completed successfully | rebase completed successfully | ||||
apply changes (yn)? n | apply changes (yn)? n | ||||
$ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | ||||
@ 6:baf10c5166d4 test | @ 6:baf10c5166d4 test | ||||
| g | | g | ||||
| b | | b | ||||
| | | | ||||
o 0:cb9a9f314b8b test | o 0:cb9a9f314b8b test | ||||
a | a | ||||
$ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | ||||
> y | > y | ||||
> EOF | > EOF | ||||
starting rebase... | starting in-memory rebase | ||||
rebasing 2:177f92b77385 "c" | rebasing 2:177f92b77385 "c" | ||||
rebasing 3:055a42cdd887 "d" | rebasing 3:055a42cdd887 "d" | ||||
rebasing 4:e860deea161a "e" | rebasing 4:e860deea161a "e" | ||||
rebase completed successfully | rebase completed successfully | ||||
apply changes (yn)? y | apply changes (yn)? y | ||||
$ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | ||||
o 9:9fd28f55f6dc test | o 9:9fd28f55f6dc test | ||||
| e | | e | ||||
| b | | b | ||||
| | | | ||||
o 0:cb9a9f314b8b test | o 0:cb9a9f314b8b test | ||||
a | a | ||||
$ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF | $ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF | ||||
> n | > n | ||||
> EOF | > EOF | ||||
starting rebase... | starting in-memory rebase | ||||
rebasing 4:e860deea161a "e" | rebasing 4:e860deea161a "e" | ||||
merging e | merging e | ||||
hit a merge conflict | hit a merge conflict | ||||
apply changes (yn)? n | apply changes (yn)? n | ||||
[1] | [1] | ||||
$ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | ||||
@ 9:906d72f66a59 test | @ 9:906d72f66a59 test | ||||
| conflict with e | | conflict with e | ||||
| | | | ||||
o 0:cb9a9f314b8b test | o 0:cb9a9f314b8b test | ||||
a | a | ||||
$ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF | $ hg rebase -s 4 -d . --keep --config ui.interactive=True --confirm << EOF | ||||
> y | > y | ||||
> EOF | > EOF | ||||
starting rebase... | starting in-memory rebase | ||||
rebasing 4:e860deea161a "e" | rebasing 4:e860deea161a "e" | ||||
merging e | merging e | ||||
hit a merge conflict | hit a merge conflict | ||||
apply changes (yn)? y | apply changes (yn)? y | ||||
rebasing 4:e860deea161a "e" | rebasing 4:e860deea161a "e" | ||||
merging e | merging e | ||||
warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | ||||
unresolved conflicts (see hg resolve, then hg rebase --continue) | unresolved conflicts (see hg resolve, then hg rebase --continue) |