Patchwork [1,of,8] test: use a lighter log style in histedit test

login
register
mail settings
Submitter Pierre-Yves David
Date April 16, 2013, 7:20 p.m.
Message ID <cc166f7758b21cf809a7.1366140030@yamac.lan>
Download mbox | patch
Permalink /patch/1358/
State Accepted
Commit 7b50120e8f6ee6e47b1a6a13e1a959e5327784e0
Headers show

Comments

Pierre-Yves David - April 16, 2013, 7:20 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1366121067 -7200
# Node ID cc166f7758b21cf809a7d0713f614f0b9d80e394
# Parent  a59e575c6ff87b517a8bb167c509a93003bfef53
test: use a lighter log style in histedit test

The default log display a log of information useless for histedit test. Having a
cleaner log help readability of those test a lot.

This does not change anything to the test semantic.
Martin Geisler - April 16, 2013, 9:04 p.m.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> writes:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@logilab.fr>
> # Date 1366121067 -7200
> # Node ID cc166f7758b21cf809a7d0713f614f0b9d80e394
> # Parent  a59e575c6ff87b517a8bb167c509a93003bfef53
> test: use a lighter log style in histedit test
>
> The default log display a log of information useless for histedit test. Having a
> cleaner log help readability of those test a lot.
>
> This does not change anything to the test semantic.
>
> diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
> --- a/tests/test-histedit-fold.t
> +++ b/tests/test-histedit-fold.t
> @@ -110,27 +77,11 @@ post-fold manifest
>  
>  
>  check histedit_source
>  
>    $ hg log --debug --rev 3
> -  changeset:   3:5e24935bad3d5a4486de3b90f233e991465ced72
> -  phase:       draft
> -  parent:      2:ee283cb5f2d5955443f23a27b697a04339e9a39a
> -  parent:      -1:0000000000000000000000000000000000000000
> -  manifest:    3:81eede616954057198ead0b2c73b41d1f392829a
> -  user:        test
> -  date:        Thu Jan 01 00:00:00 1970 +0000
> -  files+:      c f
> -  extra:       branch=default
> -  extra:       histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
> -  description:
> -  pick e860deea161a e
> -  pick 652413bf663e f
> -  fold 177f92b77385 c
> -  pick 055a42cdd887 d
> -  
> -  
> +  3:5e24935bad3d pick e860deea161a e'

I think this change goes against the comment just before since
histedit_source cannot be seen with the more compact log style.

Apart from that it's great to see more readeable tests!
Pierre-Yves David - April 16, 2013, 9:33 p.m.
On 16 avr. 2013, at 21:57, Kevin Bullock wrote:

> On 16 Apr 2013, at 2:20 PM, Pierre-Yves David wrote:
> 
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@logilab.fr>
>> # Date 1366121067 -7200
>> # Node ID cc166f7758b21cf809a7d0713f614f0b9d80e394
>> # Parent  a59e575c6ff87b517a8bb167c509a93003bfef53
>> test: use a lighter log style in histedit test
>> 
>> The default log display a log of information useless for histedit test. Having a
>> cleaner log help readability of those test a lot.
>> 
>> This does not change anything to the test semantic.
>> 
>> diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
>> --- a/tests/test-histedit-fold.t
>> +++ b/tests/test-histedit-fold.t
>> @@ -1,8 +1,10 @@
>>  $ . "$TESTDIR/histedit-helpers.sh"
>> 
>>  $ cat >> $HGRCPATH <<EOF
>> +  > [ui]
>> +  > logtemplate = {rev}:{node|short} {desc|firstline}'\n
> 
> Stray apostrophe.

grmlml, newer version available at

http://hg-lab.logilab.org/wip/hg/
Augie Fackler - April 17, 2013, 2:15 a.m.
On Apr 16, 2013, at 5:04 PM, Martin Geisler <martin@geisler.net> wrote:

> Pierre-Yves David <pierre-yves.david@ens-lyon.org> writes:
> 
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@logilab.fr>
>> # Date 1366121067 -7200
>> # Node ID cc166f7758b21cf809a7d0713f614f0b9d80e394
>> # Parent  a59e575c6ff87b517a8bb167c509a93003bfef53
>> test: use a lighter log style in histedit test
>> 
>> The default log display a log of information useless for histedit test. Having a
>> cleaner log help readability of those test a lot.
>> 
>> This does not change anything to the test semantic.
>> 
>> diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
>> --- a/tests/test-histedit-fold.t
>> +++ b/tests/test-histedit-fold.t
>> @@ -110,27 +77,11 @@ post-fold manifest
>> 
>> 
>> check histedit_source
>> 
>>   $ hg log --debug --rev 3
>> -  changeset:   3:5e24935bad3d5a4486de3b90f233e991465ced72
>> -  phase:       draft
>> -  parent:      2:ee283cb5f2d5955443f23a27b697a04339e9a39a
>> -  parent:      -1:0000000000000000000000000000000000000000
>> -  manifest:    3:81eede616954057198ead0b2c73b41d1f392829a
>> -  user:        test
>> -  date:        Thu Jan 01 00:00:00 1970 +0000
>> -  files+:      c f
>> -  extra:       branch=default
>> -  extra:       histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
>> -  description:
>> -  pick e860deea161a e
>> -  pick 652413bf663e f
>> -  fold 177f92b77385 c
>> -  pick 055a42cdd887 d
>> -  
>> -  
>> +  3:5e24935bad3d pick e860deea161a e'
> 
> I think this change goes against the comment just before since
> histedit_source cannot be seen with the more compact log style.
> 
> Apart from that it's great to see more readeable tests!

I agree, the loss of histedit_source here isn't thrilling to me.

> 
> -- 
> Martin Geisler

Patch

diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
--- a/tests/test-histedit-fold.t
+++ b/tests/test-histedit-fold.t
@@ -1,8 +1,10 @@ 
   $ . "$TESTDIR/histedit-helpers.sh"
 
   $ cat >> $HGRCPATH <<EOF
+  > [ui]
+  > logtemplate = {rev}:{node|short} {desc|firstline}'\n
   > [extensions]
   > graphlog=
   > histedit=
   > EOF
 
@@ -26,40 +28,21 @@ 
 
   $ initrepo
 
 log before edit
   $ hg log --graph
-  @  changeset:   5:652413bf663e
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     f
+  @  5:652413bf663e f'
   |
-  o  changeset:   4:e860deea161a
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     e
+  o  4:e860deea161a e'
   |
-  o  changeset:   3:055a42cdd887
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     d
+  o  3:055a42cdd887 d'
   |
-  o  changeset:   2:177f92b77385
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     c
+  o  2:177f92b77385 c'
   |
-  o  changeset:   1:d2ae7f538514
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     b
+  o  1:d2ae7f538514 b'
   |
-  o  changeset:   0:cb9a9f314b8b
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     a
+  o  0:cb9a9f314b8b a'
   
 
 edit the history
   $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
@@ -70,35 +53,19 @@  edit the history
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 log after edit
   $ hg log --graph
-  @  changeset:   4:7e0a290363ed
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     d
+  @  4:7e0a290363ed d'
   |
-  o  changeset:   3:5e24935bad3d
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     pick e860deea161a e
+  o  3:5e24935bad3d pick e860deea161a e'
   |
-  o  changeset:   2:ee283cb5f2d5
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     e
+  o  2:ee283cb5f2d5 e'
   |
-  o  changeset:   1:d2ae7f538514
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     b
+  o  1:d2ae7f538514 b'
   |
-  o  changeset:   0:cb9a9f314b8b
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     a
+  o  0:cb9a9f314b8b a'
   
 
 post-fold manifest
   $ hg manifest
   a
@@ -110,27 +77,11 @@  post-fold manifest
 
 
 check histedit_source
 
   $ hg log --debug --rev 3
-  changeset:   3:5e24935bad3d5a4486de3b90f233e991465ced72
-  phase:       draft
-  parent:      2:ee283cb5f2d5955443f23a27b697a04339e9a39a
-  parent:      -1:0000000000000000000000000000000000000000
-  manifest:    3:81eede616954057198ead0b2c73b41d1f392829a
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  files+:      c f
-  extra:       branch=default
-  extra:       histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
-  description:
-  pick e860deea161a e
-  pick 652413bf663e f
-  fold 177f92b77385 c
-  pick 055a42cdd887 d
-  
-  
+  3:5e24935bad3d pick e860deea161a e'
 
   $ cd ..
 
 folding and creating no new change doesn't break:
   $ mkdir fold-to-empty-test
@@ -144,30 +95,17 @@  folding and creating no new change doesn
   $ echo 5 >> file
   $ hg commit -m '+5'
   $ echo 6 >> file
   $ hg commit -m '+6'
   $ hg log --graph
-  @  changeset:   3:251d831eeec5
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     +6
+  @  3:251d831eeec5 +6'
   |
-  o  changeset:   2:888f9082bf99
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     +5
+  o  2:888f9082bf99 +5'
   |
-  o  changeset:   1:617f94f13c0f
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     +4
+  o  1:617f94f13c0f +4'
   |
-  o  changeset:   0:0189ba417d34
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     1+2+3
+  o  0:0189ba417d34 1+2+3'
   
 
   $ cat > editor.py <<EOF
   > import re, sys
   > rules = sys.argv[1]
@@ -196,20 +134,13 @@  should effectively drop the changes from
   $ hg resolve --mark file
   $ hg histedit --continue
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/*-backup.hg (glob)
   $ hg log --graph
-  @  changeset:   1:617f94f13c0f
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     +4
+  @  1:617f94f13c0f +4'
   |
-  o  changeset:   0:0189ba417d34
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     1+2+3
+  o  0:0189ba417d34 1+2+3'
   
 
   $ cd ..
 
 Test corner case where folded revision is separated from its parent by a
@@ -278,20 +209,13 @@  dropped revision.
   HG: changed file
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-backup.hg (glob)
   $ hg log -G
-  @  changeset:   1:10c647b2cdd5
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     +4
+  @  1:10c647b2cdd5 +4'
   |
-  o  changeset:   0:0189ba417d34
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     1+2+3
+  o  0:0189ba417d34 1+2+3'
   
   $ hg export tip
   # HG changeset patch
   # User test
   # Date 0 0