<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jun 9, 2017 09:29, "Pierre-Yves David" <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text"><br>
<br>
On 06/08/2017 04:58 PM, Yuya Nishihara wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 7 Jun 2017 14:52:18 -0400, Augie Fackler wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Jun 7, 2017, at 10:29, Yuya Nishihara <<a href="mailto:yuya@tcha.org" target="_blank">yuya@tcha.org</a>> wrote:<br>
On Sun, 04 Jun 2017 15:49:34 +0100, Pierre-Yves David wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User Pierre-Yves David <<a href="mailto:pierre-yves.david@octobus.net" target="_blank">pierre-yves.david@octobus.net</a><wbr>><br>
# Date 1495923158 -7200<br>
#      Sun May 28 00:12:38 2017 +0200<br>
# Node ID c58a31911d96c8fbb083388e55bf22<wbr>cc473cc7b5<br>
# Parent  ae88951457de93c7f6286d449672b0<wbr>b9d20c57f1<br>
# EXP-Topic pushrace<br>
# Available At <a href="https://www.mercurial-scm.org/repo/users/marmoute/mercurial/" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>repo/users/marmoute/mercurial/</a><br>
#              hg pull <a href="https://www.mercurial-scm.org/repo/users/marmoute/mercurial/" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>repo/users/marmoute/mercurial/</a> -r c58a31911d96<br>
check-concurrency: expose the feature as 'server.check-concurrency'<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--- a/mercurial/help/config.txt<br>
+++ b/mercurial/help/config.txt<br>
@@ -1668,6 +1668,16 @@ Controls generic server settings.<br>
    are highly recommended. Partial clones will still be allowed.<br>
    (default: False)<br>
<br>
+``check-concurrency``<br>
+    Level of allowed race condition between two pushing client.<br>
+    - 'strict': push is abort if another client touched the repository<br>
+      while the push was preparing. (default)<br>
+    - 'related': push is only aborted if it affects head that got also<br>
+      affected while the push was preparing.<br>
+<br>
+    This requires compatible client (version 4.3 and later). Old client will<br>
+    use 'strict'.<br>
</blockquote>
<br>
I feel "race" is better than "concurrency" since I think "concurrency" doesn't<br>
have any negative meaning. But obviously I'm not the right person to review<br>
this patch. :)<br>
</blockquote>
<br>
This is tricky. race condition implies to my brain that it's always bad, which isn't necessarily the right feeling here.<br>
</blockquote>
<br>
Maybe I take the current level as check-race=paranoid.<br>
</blockquote>
<br></div>
To me, paranoid also has negative connotation, while the current mode is perfectly fine and even needed if people do extra checking logic during push.<div class="quoted-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I might call it concurrent-push-mode or something (since it's only for pushes, and it's not strictly races either I guess)?<br>
</blockquote></blockquote>
<br></div>
"concurrent-push-mode" is not bad. What about the value?<br>
<br>
concurrent-push-mode=strict  # current behavior, refuse any concurrency<br>
concurrent-push-mode= unrelated  # allow push on unrelated heads</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">These seem good to me. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888"><br>
<br>
-- <br>
Pierre-Yves David<br>
</font></blockquote></div><br></div></div></div>