monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 0e31f30e483148a81491feadd8a


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 0e31f30e483148a81491feadd8ad37f831559a67
Date: Sun, 8 Jul 2012 00:30:51 +0200 (CEST)

revision:            0e31f30e483148a81491feadd8ad37f831559a67
date:                2012-07-07T22:31:41
author:              Richard Hopkins <address@hidden>
branch:              net.venge.monotone
changelog:
Correct failing tests for the dropped/modified conflict resolution

The logic is fine, but the syntax used is ambiguous to Lua. See section 2.5.8
of the Lua 5.1 reference manual which states

> As an exception to the free-format syntax of Lua, you cannot put a line
> break before the '(' in a function call. This restriction avoids some
> ambiguities in the language. If you write
>
>    a = f
>   (g).x(a)
>
>
> Lua would see that as a single statement, a = f(g).x(a). So, if you want
> two statements, you must add a semi-colon between them. If you actually
> want to call f, you must remove the line break before (g). 

To fix, make sure we put () representing a function call on the same line
as the function call itself; in this case the call to 'samelines'.

This was found originally on a SUSE Linux Enterprise 11 SP2 system with
Lua 5.1.4 and this patch fixes it on that system. For posteriry it's
reported that the original code also succeeded on other systems (although
the Lua version was omitted), such as

+ Windows XP SP3 MingW & Cygwin
+ Windows 7 MingW & Cygwin (32 bit)
+ Debian testing

manifest:
format_version "1"

new_manifest [a7eff2073a16b94b40f7ab735d4a4801ca8f5702]

old_revision [5e388bf9c81ccae5c77334ade34211c1c9a1af62]

patch "test/func/resolve_conflicts_dropped_modified_2/__driver__.lua"
 from [6ac477e0740d4af2cae4bc7cb33099e98cd1fb45]
   to [e1bd2fed5032ea4cb911ffc1289b1830e2195e1c]

patch 
"test/func/resolve_conflicts_dropped_modified_upstream_vs_local/__driver__.lua"
 from [d582ad7875b4a98b2a0c60e05b7cfeaa80187f5a]
   to [e7f37ed8b1a65325390ad4f1ade33904e7535381]
============================================================
--- test/func/resolve_conflicts_dropped_modified_2/__driver__.lua	6ac477e0740d4af2cae4bc7cb33099e98cd1fb45
+++ test/func/resolve_conflicts_dropped_modified_2/__driver__.lua	e1bd2fed5032ea4cb911ffc1289b1830e2195e1c
@@ -30,8 +30,7 @@ check(mtn("show_conflicts", left_1, righ
 right_1 = base_revision()
 
 check(mtn("show_conflicts", left_1, right_1), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]     506d8ed51b06c0080e8bb307155a88637045b532",
   "mtn: [right]    a2889488ed1801a904d0219ec9939dfc2e9be033",
   "mtn: [ancestor] f80ff103551d0313647d6c84990bc9db6b158dac",
@@ -45,8 +44,7 @@ check(mtn("explicit_merge", "--resolve-c
 check(mtn("conflicts", "resolve_first", "keep"), 0, nil, true)
 
 check(mtn("explicit_merge", "--resolve-conflicts", left_1, right_1, "testbranch"), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]  506d8ed51b06c0080e8bb307155a88637045b532",
   "mtn: [right] a2889488ed1801a904d0219ec9939dfc2e9be033",
   "mtn: keeping 'file_2'",
@@ -67,8 +65,7 @@ check(mtn("show_conflicts", left_2, righ
 left_2 = base_revision()
 
 check(mtn("show_conflicts", left_2, right_2), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]     5a144a43f03692e389f3ddd4c510a4d9754061d5",
   "mtn: [right]    3df3126220588440def7b08f488ca35eaa94f1b6",
   "mtn: [ancestor] 506d8ed51b06c0080e8bb307155a88637045b532",
============================================================
--- test/func/resolve_conflicts_dropped_modified_upstream_vs_local/__driver__.lua	d582ad7875b4a98b2a0c60e05b7cfeaa80187f5a
+++ test/func/resolve_conflicts_dropped_modified_upstream_vs_local/__driver__.lua	e7f37ed8b1a65325390ad4f1ade33904e7535381
@@ -30,8 +30,7 @@ check(mtn("show_conflicts", upstream_1, 
 local_1 = base_revision()
 
 check(mtn("show_conflicts", upstream_1, local_1), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]     1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
   "mtn: [right]    a2889488ed1801a904d0219ec9939dfc2e9be033",
   "mtn: [ancestor] f80ff103551d0313647d6c84990bc9db6b158dac",
@@ -45,8 +44,7 @@ check(mtn("explicit_merge", "--resolve-c
 check(mtn("conflicts", "resolve_first", "drop"), 0, nil, true)
 
 check(mtn("explicit_merge", "--resolve-conflicts", upstream_1, local_1, "testbranch"), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]  1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",
   "mtn: [right] a2889488ed1801a904d0219ec9939dfc2e9be033",
   "mtn: dropping 'file_2'",
@@ -84,8 +82,7 @@ check(mtn("show_conflicts", upstream_2, 
 
 -- Show that 'show_conflicts' reports the attribute resolution properly.
 check(mtn("show_conflicts", upstream_2, local_2), 0, nil, true)
-check(samelines
-("stderr",
+check(samelines("stderr",
  {"mtn: [left]     c0ed8c29ffad149af1c948969e8e80d270999b13",
   "mtn: [right]    dd1ba606b52fddb4431da3760ff65b65f6509a48",
   "mtn: [ancestor] 1e700864de7a2cbb1cf85c26f5e1e4ca335d2bc2",

reply via email to

[Prev in Thread] Current Thread [Next in Thread]