diff 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
line wrap: on
line diff
--- a/hgext/rebase.py	Mon Oct 19 15:47:40 2015 -0700
+++ b/hgext/rebase.py	Mon Oct 19 16:29:35 2015 +0200
@@ -466,9 +466,9 @@
                     state[rev] = repo[newnode].rev()
                     ui.debug('rebased as %s\n' % short(newnode))
                 else:
-                    ui.warn(_('note: rebase of %d:%s created no changes '
-                              'to commit\n') % (rev, ctx))
                     if not collapsef:
+                        ui.warn(_('note: rebase of %d:%s created no changes '
+                                  'to commit\n') % (rev, ctx))
                         skipped.add(rev)
                     state[rev] = p1
                     ui.debug('next revision set to %s\n' % p1)