[PATCH] hg Incoming/Outgoing: Recursion on sub repositories

Mads Kiilerich mads at kiilerich.com
Fri Sep 24 10:02:19 CDT 2010


On 09/24/2010 02:26 PM, Adrian Buehlmann wrote:
> A general suggestion/comment about *.t files, which is rather unrelated
> to this specific proposed patch (apologies for jumping in here).
>
> On 24.09.2010 13:54, Erik Zielke wrote:
>> diff -r f540780feaa4 -r f4620cbb6d5a tests/test-subrepo-recursion.t
>> --- a/tests/test-subrepo-recursion.t	Thu Sep 23 16:58:37 2010 +0200
>> +++ b/tests/test-subrepo-recursion.t	Fri Sep 24 12:00:55 2010 +0200
>> @@ -273,6 +273,9 @@
>>     comparing with */test-subrepo-recursion.t/repo/foo (glob)
>>     searching for changes
>>     no changes found
>> +  comparing with */test-subrepo-recursion.t/repo/foo/bar (glob)
>> +  searching for changes
>> +  no changes found
>>     [1]
>>
>
> I think the name of the test (test-subrepo-recursion.t) should not be
> made visible in the test output.
>
> I.e.
>
>      comparing with */test-subrepo-recursion.t/repo/foo (glob)
>
> should preferably be written as:
>
>      comparing with */repo/foo (glob)
>
> Like this, the name of the test file becomes irrelevant inside the test.
> Which will make it easier to later move tests from one *.t file to another.

Perhaps even better something like

1: expose tmpd in environment - for example as TESTTMP
2: use TESTTMP instead of HGTMP in tests ... where it makes sense
3: automatically do .replace(TESTTMP, '$TESTTMP') on all test output

That would perhaps remove some of the fine new (glob)/(re) filters :-(

/Mads


More information about the Mercurial-devel mailing list