Mercurial > public > mercurial-scm > hg-stable
diff tests/test-rebase-pull.t @ 30755:0fbb3a5c188e
rebase: provide detailed hint to abort message if working dir is not clean
Detailed hint message is now provided when 'pull --rebase' operation detects
unclean working dir, for example:
abort: uncommitted changes
(cannot pull with rebase: please commit or shelve your changes first)
Added tests for uncommitted merge, and for subrepo support verifying that same
hint is also passed to subrepo state check.
author | Valters Vingolds <valters@vingolds.ch> |
---|---|
date | Tue, 10 Jan 2017 09:32:27 +0100 |
parents | c2bd2f77965b |
children | 1b5c61d38a52 |
line wrap: on
line diff
--- a/tests/test-rebase-pull.t Mon Jan 09 16:02:56 2017 +0900 +++ b/tests/test-rebase-pull.t Tue Jan 10 09:32:27 2017 +0100 @@ -78,6 +78,7 @@ $ echo L1-mod > L1 $ hg pull --rebase abort: uncommitted changes + (cannot pull with rebase: please commit or shelve your changes first) [255] $ hg update --clean --quiet @@ -95,6 +96,41 @@ [255] $ hg histedit --abort --quiet +Abort pull early with pending uncommitted merge: + + $ cd .. + $ hg clone --noupdate c d + $ cd d + $ hg tglog + o 1: 'C2' + | + o 0: 'C1' + + $ hg update --quiet 0 + $ echo M1 > M1 + $ hg commit --quiet -Am M1 + $ hg update --quiet 1 + $ hg merge 2 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + $ hg pull --rebase + abort: outstanding uncommitted merge + (cannot pull with rebase: please commit or shelve your changes first) + [255] + $ hg update --clean --quiet + +Abort pull early with unclean subrepo: + $ echo s = s > .hgsub + $ hg add .hgsub + $ hg init s + $ hg commit -m "generated a subrepo" + $ echo a > s/a + $ hg -R s add s/a + $ hg pull --rebase + abort: uncommitted changes in subrepository 's' + (cannot pull with rebase: please commit or shelve your changes first) + [255] + Invoke pull --rebase and nothing to rebase: $ cd ../c