Mercurial > hg
comparison hgext/rebase.py @ 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 | 01512564ddd5 |
comparison
equal
deleted
inserted
replaced
30754:26209cb7184e | 30755:0fbb3a5c188e |
---|---|
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) | 1319 cmdutil.checkunfinished(repo) |
1321 cmdutil.bailifchanged(repo) | 1320 cmdutil.bailifchanged(repo, hint=_('cannot pull with rebase: ' |
1321 'please commit or shelve your changes first')) | |
1322 | 1322 |
1323 revsprepull = len(repo) | 1323 revsprepull = len(repo) |
1324 origpostincoming = commands.postincoming | 1324 origpostincoming = commands.postincoming |
1325 def _dummy(*args, **kwargs): | 1325 def _dummy(*args, **kwargs): |
1326 pass | 1326 pass |