Patchwork [1,of,3] test-log: make test more resilient to hash changes

login
register
mail settings
Submitter Matt Harbison
Date April 10, 2015, 3:38 a.m.
Message ID <0d5394e845d2a60d7315.1428637082@Envy>
Download mbox | patch
Permalink /patch/8586/
State Superseded
Headers show

Comments

Matt Harbison - April 10, 2015, 3:38 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1428633383 14400
#      Thu Apr 09 22:36:23 2015 -0400
# Node ID 0d5394e845d2a60d73152fa5be501e14a1f41c94
# Parent  7b26d433ab78988a19cadcead645196999b59568
test-log: make test more resilient to hash changes

I ran into this when adding a field to 'extras'.
Matt Mackall - April 10, 2015, 8:53 p.m.
On Thu, 2015-04-09 at 23:38 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1428633383 14400
> #      Thu Apr 09 22:36:23 2015 -0400
> # Node ID 0d5394e845d2a60d73152fa5be501e14a1f41c94
> # Parent  7b26d433ab78988a19cadcead645196999b59568
> test-log: make test more resilient to hash changes
> 
> I ran into this when adding a field to 'extras'.

I see why you did this.. but I think I'd rather you just update the
nodes.

Patch

diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -1918,9 +1918,7 @@ 
 
 Even when a head revision is linkrev-shadowed.
 
-  $ hg log -T '{node}\n' -r 4
-  50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
-  $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2
+  $ hg debugobsolete `hg log -T '{node}\n' -r 4`
   $ hg log -G a
   @  changeset:   3:15b2327059e5
   |  tag:         tip