Last Comment Bug 1217155 - Advertise clonebundles feature to supported clients
: Advertise clonebundles feature to supported clients
Status: RESOLVED FIXED
:
Product: Developer Services
Classification: Other
Component: Mercurial: bundleclone (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal
: ---
Assigned To: Gregory Szorc [:gps] (away until 2017-03-20)
:
:
Mentors:
Depends on: 1216216
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-21 12:50 PDT by Gregory Szorc [:gps] (away until 2017-03-20)
Modified: 2015-10-23 14:03 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

MozReview Requests
Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:
Show discarded requests

Attachments
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod (40 bytes, text/x-review-board-request)
2015-10-22 02:03 PDT, Gregory Szorc [:gps] (away until 2017-03-20)
smacleod: review+
Details | Review
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod (40 bytes, text/x-review-board-request)
2015-10-22 02:03 PDT, Gregory Szorc [:gps] (away until 2017-03-20)
gps: review+
Details | Review

Description User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-21 12:50:37 PDT
+++ This bug was initially created as a clone of Bug #1216216 +++

The clonebundles feature in Mercurial 3.6 has server-side support for advertising its existence to clients that don't have it enabled. Due to a bug in Mercurial < 3.6, this feature isn't working on our 3.4/3.5 servers (https://selenic.com/repo/hg/rev/3e7f675628ad).

We should work around the bug somehow so the advertisement is there before we upgrade the servers to 3.6.
Comment 1 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-22 02:03:45 PDT
Created attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

scripts/generate-hg-s3-bundles: support not uploading bundles; r?smacleod

This will be needed for testing.
Comment 2 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-22 02:03:47 PDT
Created attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Comment 3 User image Steven MacLeod [:smacleod] 2015-10-22 07:38:11 PDT
Comment on attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

https://reviewboard.mozilla.org/r/22919/#review20455
Comment 4 User image Steven MacLeod [:smacleod] 2015-10-22 07:51:10 PDT
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20461

::: hgserver/clonebundles.py:271
(Diff revision 1)
> +        raise Exception('use built-in clonebundles extension with '
> +                        'Mercurial 3.6+')

It would be nice to have a test that actually triggers this.
Comment 5 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 00:29:43 PDT
Comment on attachment 8677329 [details]
MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod

This will be needed for testing.
Comment 6 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 00:29:47 PDT
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Comment 7 User image Steven MacLeod [:smacleod] 2015-10-23 06:21:31 PDT
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20569

::: hgext/bundleclone/tests/test-clonebundles-compat.t:176
(Diff revision 2)
> +  abort: No module named errors!

This is not the error I was expecting...
Comment 8 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 12:07:15 PDT
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

There are two issues preventing clonebundles' built-in advertisements
from working in <3.6 servers:

1) "cbattempted" argument to "getbundle" wire protocol command isn't
    defined, leading the server to drop it.
2) parsing of boolean arguments is incorrect (this was fixed in
   3e7f675628ad)

This patch hacks our vendored copy of clonebundles.py to work around
both these issues. We throw an exception if a 3.6+ server is detected.
This way, we catch accidental usage of our vendored clonebundles.py when
we upgrade hg.mozilla.org to 3.6.

A test checking for proper behavior has been added.
Comment 9 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 13:30:16 PDT
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ca2878733e98e6ef188f3ed589b38526304ea42e
clonebundles: make advertisement work with <3.6 servers (bug 1217155); r=smacleod
Comment 10 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 14:03:01 PDT
Comment on attachment 8677330 [details]
MozReview Request: clonebundles: make advertisement work with <3.6 servers (bug 1217155); r?smacleod

https://reviewboard.mozilla.org/r/22921/#review20655

This was reviewed by smacleod over IRC.
Comment 11 User image Gregory Szorc [:gps] (away until 2017-03-20) 2015-10-23 14:03:27 PDT
Deployed.

Note You need to log in before you can comment on or make changes to this bug.