Closed Bug 1217155 Opened 9 years ago Closed 9 years ago

Advertise clonebundles feature to supported clients

Categories

(Developer Services :: Mercurial: bundleclone, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(2 files)

+++ 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.
scripts/generate-hg-s3-bundles: support not uploading bundles; r?smacleod

This will be needed for testing.
Attachment #8677329 - Flags: review?(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.
Attachment #8677330 - Flags: review?(smacleod)
Attachment #8677329 - Flags: review?(smacleod) → review+
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 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.
Attachment #8677330 - Flags: review?(smacleod)
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.
Attachment #8677329 - Attachment description: MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r?smacleod → MozReview Request: scripts/generate-hg-s3-bundles: support not uploading bundles; r=smacleod
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.
Attachment #8677330 - Flags: review?(smacleod)
Attachment #8677330 - Flags: review?(smacleod)
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 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.
Attachment #8677330 - Flags: review?(smacleod)
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ca2878733e98e6ef188f3ed589b38526304ea42e
clonebundles: make advertisement work with <3.6 servers (bug 1217155); r=smacleod
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.
Attachment #8677330 - Flags: review+
Deployed.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8677330 - Flags: review?(smacleod)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: