<br><br><div class="gmail_quote">On Mon Nov 17 2014 at 2:34:29 PM Matt Mackall <<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2014-11-14 at 16:21 -0800, Martin von Zweigbergk wrote:<br>
> # HG changeset patch<br>
> # User Martin von Zweigbergk <<a href="mailto:martinvonz@google.com" target="_blank">martinvonz@google.com</a>><br>
> # Date 1415949135 28800<br>
> #      Thu Nov 13 23:12:15 2014 -0800<br>
> # Node ID c2491406f4623e148bee137b1862ff<u></u>0b609e4235<br>
> # Parent  991098579940552536d0a99fa3602d<u></u>d1661aa388<br>
> merge: drop underscore prefix from _checkunknown()<br>
<br>
> The method has been called from commands.py since 3eab42088be4<br>
> (update: just merge unknown file collisions, 2012-02-09), so drop the<br>
> underscore prefix that suggests that it's private.<br>
<br>
I look at the underscore in Python as advisory: you shouldn't be using<br>
this unless you have to. And when you see it used like this, you should<br>
think "ah, this is a hack of some sort".<br>
<br>
And in this case, it certainly is: we definitely don't want the commands<br>
layer to know about this obscure merge detail. So I think the underscore<br>
is correct as it stands and leaves an appropriate code smell here.<br>
Removing it is only going to reduce the probability that a future Martin<br>
will be bothered enough to properly refactor away the hack.<br></blockquote><div><br></div><div>Oh, it didn't seems like an obscure merge detail to me at first, but that's good to hear. It turns out the series of which this is the second patch turned out deleting _checkunknown() altogether. I'm glad to hear it wasn't a completely delusional idea.</div><div><br></div></div>