> On Jun 17, 2017, at 12:11, Denis Laxalde <de...@laxalde.org> wrote:
> 
> Pulkit Goyal a écrit :
>>> Thanks for working on this!
>>> 
>>> I wonder if this tersestatus function couldn't be unit-tested (might be
>>> easier if it didn't need the "repo" argument). I'd make it easier to
>>> understand its behaviour I think.
>> 
>> Okay in that case, I will need to pass two other arguments for
>> repo.root and repo.dirstate._ignore as root and ignorefn respectively.
>> Or you mean to say not using them?
> 
> If you need data, pass them to the function. Having two arguments with a
> defined purpose is probably clearer/safer than one "repo" argument on
> which you can basically do anything.

I haven't looked at the code, but this is generally good architectural advice. 
I don't know that I'd block taking the patches on that though.

Will try to look these through in the next couple of days.

(It'd be nice if we could have more unit tests in hg and not *have* to test 
everything with functional tests - in theory we should be able to get 
equivalent coverage without doing nearly so much disk IO. We've historically 
been bad about even trying to move the needle.)


_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to