I am trying to push a repository where the latest commits contain lots of changes (thousands of added files), so it is expected that it takes long. At the first attempt I got a "gateway timeout" error, probably the server's fault. At the second attempt, however, and after several minutes uploading data, I got a bullshit error: "repository changed while pushing. Please try again". Nothing changed in the repository. If something really changed by just stadning idle in front of the computer, and doesn't show up doing "hg status", then it's something irrelevant that shouldn't cause this error. When performing such operations that take long is precisely when one needs the software to be more resilient. That stuff fails in the middle of uploading several megabytes after several minutes, is particularly annoying because it makes you waste a lot of time.
I've put the ticket in priority normal according to our bug triaging process https://www.mercurial-scm.org/wiki/ManagingBugs#Priorities. The "repository changed while pushing" message is indicating that the server repository changed during the second push. What may happened is the first push data correctly arrived to the hg server but the configured timeout in your gateway (often 60s) was not enough for the hg server to finish processing it. In addition, the hg server continues to process data even in case the connection is dropped by the gateway. When you tried to pushed a second time, the server was still processing the first push and when it finished, it told you that between the time it received the second push and the time it starts processing it, the server repository changed. You can try two things: - Increase your timeout duration - If you have this kind of errors while pushing multiple independent heads, you can tune the concurent push mode setting (`hg help server.concurrent-push-mode` is your friend).
I see. The error should be clearer, e.g. "REMOTE repository changed while pushing". It's not obvious, I thought it referred to local changes.
Sure, someone should add "remote" somewhere in that error message.
Created attachment 2021 [details] Added keyword remote to 'repository changed while pushing' error
Fixed by https://mercurial-scm.org/repo/hg/rev/58ebf5083843 Taapas Agrawal <taapas2897@gmail.com> push: add "remote" to 'repository changed while pushing' messages (issue5971) Differential Revision: https://phab.mercurial-scm.org/D4933 (please test the fix)
Bug was set to TESTING for 7 days, resolving