[PATCH 5 of 6] rebase: improve debug messages while processing the list of rebases

Mads Kiilerich mads at kiilerich.com
Tue Dec 9 23:20:46 CST 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1418188835 -3600
#      Wed Dec 10 06:20:35 2014 +0100
# Node ID 8872d1bf30da3bfd16e828709c8d44901b158030
# Parent  2fb0504b817519358354d60cea2c10ab1e378e67
rebase: improve debug messages while processing the list of rebases

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -411,15 +411,16 @@ def rebase(ui, repo, **opts):
                 # Update the state
                 if newnode is not None:
                     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.debug('next revision set to %s\n' % p1)
                         skipped.add(rev)
                     state[rev] = p1
+                    ui.debug('next revision set to %s\n' % p1)
             elif state[rev] == nullmerge:
-                pass
+                ui.debug('ignoring null merge rebase of %s\n' % rev)
             elif state[rev] == revignored:
                 ui.status(_('not rebasing ignored %s\n') % desc)
             else:
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -219,6 +219,10 @@ Check that the right ancestors is used w
   
   $ hg rebase -s9 -d2 --debug # use debug to really check merge base used
   rebase onto 2 starting from e31216eec445
+  ignoring null merge rebase of 3
+  ignoring null merge rebase of 4
+  ignoring null merge rebase of 6
+  ignoring null merge rebase of 8
   rebasing 9:e31216eec445 "more changes to f1"
   rebasing: 9:e31216eec445 5/6 changesets (83.33%)
    future parents are 2 and -1
@@ -243,6 +247,7 @@ Check that the right ancestors is used w
   getting f1.txt
   updating: f1.txt 1/1 files (100.00%)
   f1.txt
+  rebased as 19c888675e13
   rebasing 10:2f2496ddf49d "merge" (tip)
   rebasing: 10:2f2496ddf49d 6/6 changesets (100.00%)
    future parents are 11 and 7
@@ -258,6 +263,7 @@ Check that the right ancestors is used w
   getting f1.txt
   updating: f1.txt 1/1 files (100.00%)
   f1.txt
+  rebased as 2a7f09cac94c
   rebase merging completed
   update back to initial working directory parent
   resolving manifests


More information about the Mercurial-devel mailing list