Mercurial > public > mercurial-scm > hg
diff hgext/rebase.py @ 30725:c2bd2f77965b
rebase: fail-fast the pull if working dir is not clean (BC)
Refuse to run 'hg pull --rebase' if there are uncommitted changes:
so that instead of going ahead with fetching changes and then suddenly aborting
the rebase, we can warn user of uncommitted changes (or unclean repo state)
right up front.
In tests, we create a 'histedit' session to verify that also an unfinished
state is detected and handled.
author | Valters Vingolds <valters@vingolds.ch> |
---|---|
date | Sun, 01 Jan 2017 13:16:29 +0100 |
parents | a932297febb7 |
children | 0fbb3a5c188e |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Jan 06 22:50:04 2017 +0900 +++ b/hgext/rebase.py Sun Jan 01 13:16:29 2017 +0100 @@ -1316,6 +1316,10 @@ ui.debug('--update and --rebase are not compatible, ignoring ' 'the update flag\n') + ui.debug('before rebase: ensure working dir is clean\n') + cmdutil.checkunfinished(repo) + cmdutil.bailifchanged(repo) + revsprepull = len(repo) origpostincoming = commands.postincoming def _dummy(*args, **kwargs):