Patchwork [3,of,5,v3] rebase: replace "future parents" message with more detailed debug info

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 4, 2014, 3:12 a.m.
Message ID <e031c5201577b359af98.1417662767@localhost.localdomain>
Download mbox | patch
Permalink /patch/6990/
State Changes Requested
Headers show

Comments

Mads Kiilerich - Dec. 4, 2014, 3:12 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1417650987 -3600
#      Thu Dec 04 00:56:27 2014 +0100
# Node ID e031c5201577b359af981396957a0b9a9a5f5300
# Parent  5a39fd5c40c861a0da05cbbc2f80fbedcda19835
rebase: replace "future parents" message with more detailed debug info

(Enable this to prove that the next refactoring doesn't change anything.)

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -372,6 +372,9 @@  def rebase(ui, repo, **opts):
                             _('changesets'), total)
                 m1, m2, anc, p1, p2 = computerebase(repo, rev, target, state,
                                                     targetancestors)
+                repo.ui.debug(" merging %d and %d using ancestor %s, "
+                              "setting parents %d and %d\n"
+                              % (m1, m2, anc, p1, p2))
                 storestatus(repo, originalwd, target, state, collapsef, keepf,
                             keepbranchesf, external, activebookmark)
                 if len(repo.parents()) == 2:
@@ -416,6 +419,7 @@  def rebase(ui, repo, **opts):
         if collapsef and not keepopen:
             _m1, _m2, _anc, p1, _p2 = computerebase(repo, min(state), target,
                                                     state, targetancestors)
+            repo.ui.debug(" collapsing using p1 %d\n" % p1)
             editopt = opts.get('edit')
             editform = 'rebase.collapse'
             if collapsemsg:
@@ -620,8 +624,6 @@  def computerebase(repo, rev, target, sta
                 raise util.Abort(_('cannot use revision %d as base, result '
                         'would have 3 parents') % rev)
             p2 = p2n
-    repo.ui.debug(" future parents are %d and %d\n" %
-                            (repo[p1].rev(), repo[p2].rev()))
 
     if rev == min(state):
         # Case (1) initial changeset of a non-detaching rebase.
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
@@ -213,7 +213,7 @@  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
   rebasing: 9:e31216eec445 5/6 changesets (83.33%)
-   future parents are 2 and -1
+   merging 2 and 9 using ancestor 8, setting parents 2 and -1
   rebase status stored
    update to 2:4bc80088dc6b
   resolving manifests
@@ -236,7 +236,7 @@  Check that the right ancestors is used w
   updating: f1.txt 1/1 files (100.00%)
   f1.txt
   rebasing: 10:2f2496ddf49d 6/6 changesets (100.00%)
-   future parents are 11 and 7
+   merging 11 and 10 using ancestor 9, setting parents 11 and 7
   rebase status stored
    already in target
    merge against 10:2f2496ddf49d