This is an archive of the discontinued Mercurial Phabricator instance.

narrow: move the ellipses server capability to core
ClosedPublic

Authored by pulkit on Sep 29 2018, 8:04 PM.

Details

Summary

This will be used in core logic to determining whether a server is ellipses
enabled or not. And also this will ease moving narrow related things to core.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 29 2018, 8:04 PM
pulkit updated this revision to Diff 11500.Sep 30 2018, 12:10 PM
martinvonz added inline comments.
tests/test-narrow-clone.t
48 ↗(On Diff #11500)

This doesn't look right. I suspect it was done by a mistaken run-tests.py -i

pulkit added inline comments.Sep 30 2018, 8:07 PM
tests/test-narrow-clone.t
48 ↗(On Diff #11500)

I just ran run-tests.py -i and it popped up and I accepted it. I will check if the test pass without this change or not.

martinvonz added inline comments.Oct 1 2018, 2:02 AM
mercurial/hg.py
582–583 ↗(On Diff #11500)

This patch seems to do more than what it says, and more than what the previous patch did. Can we separate out this functional change? IIUC, this makes it so we start writing the ellipses requirement to the clone if the source repo has the ellipses capability. I'm not sure that's the right thing to do -- just because the server supports ellipses doesn't necessarily mean that all users want that. I know they user/client has no say on that decision (it's controlled by the "narrowservebrokenellipses" config), but we might want to change that. OTOH, since that's how the server currently works, it's probably fine to set the requirement based on the server capability. I mostly just wanted to make sure keep this in mind. (But I would still prefer to see the refactoring separated from the functional change.)

martinvonz added inline comments.Oct 1 2018, 2:08 AM
mercurial/hg.py
582–583 ↗(On Diff #11500)

Oh, I think you actually meant to leave this change for the next patch, right? Because ELLIPSES_REQUIREMENT that's used below doesn't seem to exist yet.

tests/test-narrow-clone.t
48 ↗(On Diff #11500)

I forgot to say earlier that it's a common problem with run-tests.py -i that it doesn't know where to put lines around optional lines. So I'm pretty sure the test will pass even if you revert this change.

pulkit updated this revision to Diff 11516.Oct 1 2018, 12:01 PM

@martinvonz I have removed the logic of adding a new ellipses requirement from current series as coupling that and this series for review turned out to be a bad idea. This series now only tries to do some cleanup and introduce a new wireprotocol command.

btw, "narrow: move the ellipses server capability to core" should probably be changed to more closely match "narrow: move the ellipses server capability to core"

indygreg accepted this revision.Oct 1 2018, 12:53 PM
This revision is now accepted and ready to land.Oct 1 2018, 12:53 PM
This revision was automatically updated to reflect the committed changes.