Mercurial > hg
comparison hgext/rebase.py @ 26811:d1561a422748
rebase: fix wrong 'no changes to commit' when using --collapse
--collapse will do that rebase doesn't commit until the final commit. The lack
of a new commit would make it look like the rebase didn't contribute any
changes.
Instead, only warn about no commits when not using --collapse.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 19 Oct 2015 16:29:35 +0200 |
parents | 1aee2ab0f902 |
children | a2aa39a725a1 6979fe2a6d75 |
comparison
equal
deleted
inserted
replaced
26810:382050000412 | 26811:d1561a422748 |
---|---|
464 # Update the state | 464 # Update the state |
465 if newnode is not None: | 465 if newnode is not None: |
466 state[rev] = repo[newnode].rev() | 466 state[rev] = repo[newnode].rev() |
467 ui.debug('rebased as %s\n' % short(newnode)) | 467 ui.debug('rebased as %s\n' % short(newnode)) |
468 else: | 468 else: |
469 ui.warn(_('note: rebase of %d:%s created no changes ' | |
470 'to commit\n') % (rev, ctx)) | |
471 if not collapsef: | 469 if not collapsef: |
470 ui.warn(_('note: rebase of %d:%s created no changes ' | |
471 'to commit\n') % (rev, ctx)) | |
472 skipped.add(rev) | 472 skipped.add(rev) |
473 state[rev] = p1 | 473 state[rev] = p1 |
474 ui.debug('next revision set to %s\n' % p1) | 474 ui.debug('next revision set to %s\n' % p1) |
475 elif state[rev] == nullmerge: | 475 elif state[rev] == nullmerge: |
476 ui.debug('ignoring null merge rebase of %s\n' % rev) | 476 ui.debug('ignoring null merge rebase of %s\n' % rev) |