Mercurial > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
30724:ee47e951c6f9 | 30725:c2bd2f77965b |
---|---|
1314 if opts.get('update'): | 1314 if opts.get('update'): |
1315 del opts['update'] | 1315 del opts['update'] |
1316 ui.debug('--update and --rebase are not compatible, ignoring ' | 1316 ui.debug('--update and --rebase are not compatible, ignoring ' |
1317 'the update flag\n') | 1317 'the update flag\n') |
1318 | 1318 |
1319 ui.debug('before rebase: ensure working dir is clean\n') | |
1320 cmdutil.checkunfinished(repo) | |
1321 cmdutil.bailifchanged(repo) | |
1322 | |
1319 revsprepull = len(repo) | 1323 revsprepull = len(repo) |
1320 origpostincoming = commands.postincoming | 1324 origpostincoming = commands.postincoming |
1321 def _dummy(*args, **kwargs): | 1325 def _dummy(*args, **kwargs): |
1322 pass | 1326 pass |
1323 commands.postincoming = _dummy | 1327 commands.postincoming = _dummy |