Patchwork rebase: make debug logging more consistent

login
register
mail settings
Submitter via Mercurial-devel
Date Sept. 13, 2016, 10:17 p.m.
Message ID <dafc79bb0ad2ddf0240f.1473805072@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/16609/
State Accepted
Headers show

Comments

via Mercurial-devel - Sept. 13, 2016, 10:17 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1473799782 25200
#      Tue Sep 13 13:49:42 2016 -0700
# Node ID dafc79bb0ad2ddf0240f2a794f73f9ef5fd96ef4
# Parent  3bf8aafe91a0f0c29041c73fa5b75de168af0e12
rebase: make debug logging more consistent

We emit some lines that mix revision numbers with nodeids, which makes
little sense to me.
Ryan McElroy - Sept. 14, 2016, 6:50 a.m.
On 9/13/2016 11:17 PM, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1473799782 25200
> #      Tue Sep 13 13:49:42 2016 -0700
> # Node ID dafc79bb0ad2ddf0240f2a794f73f9ef5fd96ef4
> # Parent  3bf8aafe91a0f0c29041c73fa5b75de168af0e12
> rebase: make debug logging more consistent
>
> We emit some lines that mix revision numbers with nodeids, which makes
> little sense to me.
>
> diff -r 3bf8aafe91a0 -r dafc79bb0ad2 hgext/rebase.py
> --- a/hgext/rebase.py	Mon Sep 12 10:55:43 2016 -0700
> +++ b/hgext/rebase.py	Tue Sep 13 13:49:42 2016 -0700
> @@ -1198,7 +1198,7 @@
>                   repo.ui.debug('source is a child of destination\n')
>                   return None
>   
> -        repo.ui.debug('rebase onto %d starting from %s\n' % (dest, root))
> +        repo.ui.debug('rebase onto %s starting from %s\n' % (dest, root))
>           state.update(dict.fromkeys(rebaseset, revtodo))
>           # Rebase tries to turn <dest> into a parent of <root> while
>           # preserving the number of parents of rebased changesets:
> diff -r 3bf8aafe91a0 -r dafc79bb0ad2 tests/test-rebase-conflicts.t
> --- a/tests/test-rebase-conflicts.t	Mon Sep 12 10:55:43 2016 -0700
> +++ b/tests/test-rebase-conflicts.t	Tue Sep 13 13:49:42 2016 -0700
> @@ -219,7 +219,7 @@
>        summary:     added default.txt
>     
>     $ hg rebase -s9 -d2 --debug # use debug to really check merge base used
> -  rebase onto 2 starting from e31216eec445
> +  rebase onto 4bc80088dc6b starting from e31216eec445
>     ignoring null merge rebase of 3
>     ignoring null merge rebase of 4
>     ignoring null merge rebase of 6
> _______________________________________________

This patch looks like a good improvement to me with no downsides.
Pierre-Yves David - Sept. 14, 2016, 11:21 a.m.
On 09/14/2016 08:50 AM, Ryan McElroy wrote:
> On 9/13/2016 11:17 PM, Martin von Zweigbergk via Mercurial-devel wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz@google.com>
>> # Date 1473799782 25200
>> #      Tue Sep 13 13:49:42 2016 -0700
>> # Node ID dafc79bb0ad2ddf0240f2a794f73f9ef5fd96ef4
>> # Parent  3bf8aafe91a0f0c29041c73fa5b75de168af0e12
>> rebase: make debug logging more consistent

I agree, pushed, thanks.

Patch

diff -r 3bf8aafe91a0 -r dafc79bb0ad2 hgext/rebase.py
--- a/hgext/rebase.py	Mon Sep 12 10:55:43 2016 -0700
+++ b/hgext/rebase.py	Tue Sep 13 13:49:42 2016 -0700
@@ -1198,7 +1198,7 @@ 
                 repo.ui.debug('source is a child of destination\n')
                 return None
 
-        repo.ui.debug('rebase onto %d starting from %s\n' % (dest, root))
+        repo.ui.debug('rebase onto %s starting from %s\n' % (dest, root))
         state.update(dict.fromkeys(rebaseset, revtodo))
         # Rebase tries to turn <dest> into a parent of <root> while
         # preserving the number of parents of rebased changesets:
diff -r 3bf8aafe91a0 -r dafc79bb0ad2 tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t	Mon Sep 12 10:55:43 2016 -0700
+++ b/tests/test-rebase-conflicts.t	Tue Sep 13 13:49:42 2016 -0700
@@ -219,7 +219,7 @@ 
      summary:     added default.txt
   
   $ hg rebase -s9 -d2 --debug # use debug to really check merge base used
-  rebase onto 2 starting from e31216eec445
+  rebase onto 4bc80088dc6b starting from e31216eec445
   ignoring null merge rebase of 3
   ignoring null merge rebase of 4
   ignoring null merge rebase of 6