Patchwork [1,of,6,remotenames-ext] Back out "remotenames: push anonymous head if --force is given"

login
register
mail settings
Submitter Ryan McElroy
Date Feb. 19, 2018, 11:53 a.m.
Message ID <6b80188783ee26260301.1519041218@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/28150/
State New
Headers show

Comments

Ryan McElroy - Feb. 19, 2018, 11:53 a.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@fb.com>
# Date 1519040197 28800
#      Mon Feb 19 03:36:37 2018 -0800
# Node ID 6b80188783ee2626030113a9b2319f2fd14a8119
# Parent  905b79d62df82d8ca16ecac175e6236fe959f4ed
Back out "remotenames: push anonymous head if --force is given"

Original commit changeset: 905b79d62df8

There are already two ways to do this:
* set remotenames.forcecompat = True
* set remotenames.pushanonheads = True

The backed out revision violated the expectation of someone who does not have
forcecompat = true. It also did not have any tests.
Sean Farley - Feb. 20, 2018, 11:44 p.m.
Ryan McElroy <rm@fb.com> writes:

> # HG changeset patch
> # User Ryan McElroy <rmcelroy@fb.com>
> # Date 1519040197 28800
> #      Mon Feb 19 03:36:37 2018 -0800
> # Node ID 6b80188783ee2626030113a9b2319f2fd14a8119
> # Parent  905b79d62df82d8ca16ecac175e6236fe959f4ed
> Back out "remotenames: push anonymous head if --force is given"
>
> Original commit changeset: 905b79d62df8
>
> There are already two ways to do this:
> * set remotenames.forcecompat = True
> * set remotenames.pushanonheads = True
>
> The backed out revision violated the expectation of someone who does not have
> forcecompat = true. It also did not have any tests.

I actually quite liked this, to be honest. Those settings are fairly
unintuitive settings and --force is the de facto way to override a push
on the client.

Also, it seems you pushed this less than a day (which was a holiday!) of
it being on the list. That's seems a bit rushed, no?
Ryan McElroy - Feb. 21, 2018, 10:35 a.m.
On 2/20/18 11:44 PM, Sean Farley wrote:
> Ryan McElroy <rm@fb.com> writes:
>
>> # HG changeset patch
>> # User Ryan McElroy <rmcelroy@fb.com>
>> # Date 1519040197 28800
>> #      Mon Feb 19 03:36:37 2018 -0800
>> # Node ID 6b80188783ee2626030113a9b2319f2fd14a8119
>> # Parent  905b79d62df82d8ca16ecac175e6236fe959f4ed
>> Back out "remotenames: push anonymous head if --force is given"
>>
>> Original commit changeset: 905b79d62df8
>>
>> There are already two ways to do this:
>> * set remotenames.forcecompat = True
>> * set remotenames.pushanonheads = True
>>
>> The backed out revision violated the expectation of someone who does not have
>> forcecompat = true. It also did not have any tests.
> I actually quite liked this, to be honest. Those settings are fairly
> unintuitive settings and --force is the de facto way to override a push
> on the client.
>
> Also, it seems you pushed this less than a day (which was a holiday!) of
> it being on the list. That's seems a bit rushed, no?

Sorry I'm out of touch with US holidays. I pushed in draft phase and I'm 
happy to drop them all.
Sean Farley - Feb. 23, 2018, 7:10 a.m.
Ryan McElroy <rm@fb.com> writes:

> On 2/20/18 11:44 PM, Sean Farley wrote:
>> Ryan McElroy <rm@fb.com> writes:
>>
>>> # HG changeset patch
>>> # User Ryan McElroy <rmcelroy@fb.com>
>>> # Date 1519040197 28800
>>> #      Mon Feb 19 03:36:37 2018 -0800
>>> # Node ID 6b80188783ee2626030113a9b2319f2fd14a8119
>>> # Parent  905b79d62df82d8ca16ecac175e6236fe959f4ed
>>> Back out "remotenames: push anonymous head if --force is given"
>>>
>>> Original commit changeset: 905b79d62df8
>>>
>>> There are already two ways to do this:
>>> * set remotenames.forcecompat = True
>>> * set remotenames.pushanonheads = True
>>>
>>> The backed out revision violated the expectation of someone who does not have
>>> forcecompat = true. It also did not have any tests.
>> I actually quite liked this, to be honest. Those settings are fairly
>> unintuitive settings and --force is the de facto way to override a push
>> on the client.
>>
>> Also, it seems you pushed this less than a day (which was a holiday!) of
>> it being on the list. That's seems a bit rushed, no?
>
> Sorry I'm out of touch with US holidays. I pushed in draft phase and I'm happy
> to drop them all.

It's alright. I was thinking of maybe just going ahead and splitting the
extension up before this sprint. We can just punt on this and discuss it
there.

Patch

diff --git a/remotenames.py b/remotenames.py
--- a/remotenames.py
+++ b/remotenames.py
@@ -853,7 +853,7 @@  def expushdiscoverybookmarks(pushop):
 
     if not pushop.to:
         ret = exchange._pushdiscoverybookmarks(pushop)
-        if not pushop.allowanon and not pushop.force:
+        if not pushop.allowanon:
             # check to make sure we don't push an anonymous head
             if pushop.revs:
                 revs = set(pushop.revs)