WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.63k stars 1.02k forks source link

Translation repository stuck on "There are some new commits in the local repository" state #4051

Closed jtiai closed 4 years ago

jtiai commented 4 years ago

Describe the bug After pulling, merging and pushing Weblate reports "There are some new commits in the local repository" even there are none.

I did checked actual local repositories and they're up-to date and there are no outstanding commits nor unpushed changeset in local repository.

Repository backend is mercurial.

To Reproduce Unfortunately I don't know how to reproduce the error.

Expected behavior After described procedure I expected repository state to be clean

Server configuration and status

System check identified some issues:

WARNINGS: ?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems. ?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS. ?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.

INFOS: ?: (weblate.I021) Error collection is not set up, it is highly recommended for production use HINT: https://docs.weblate.org/en/weblate-4.1/admin/install.html#collecting-errors ?: (weblate.I028) Backups are not configured, it is highly recommended for production use HINT: https://docs.weblate.org/en/weblate-4.1/admin/backup.html

Additional context

Regarding to system check I'm fully aware what they do mean.

nijel commented 4 years ago

Weblate does hg outgoing() on the repo to detect this. I have no clue why it might be reporting something in your case.

jtiai commented 4 years ago

If I only knew where to start debugging I could do that.

nijel commented 4 years ago

Go to the Weblate repo (DATADIR/vcs/project/component) and execute hg outgoing() and check how it matches your expectation.

jtiai commented 4 years ago

Progress when I enabled our sentry to track exceptions:

Because weblate docker container uses C-locale (which doesn't work well with Rhodecode) It thinks remote warnings as an changes probably.

RepositoryException: remote: bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
remote: /bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
remote: /opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
remote: sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
remote: /bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
remote: _findLib_gcc: warning: setlocale: LC_ALL: cannot change local...
  File "weblate/trans/models/component.py", line 1260, in do_reset
    self.repository.reset()
  File "weblate/vcs/mercurial.py", line 113, in reset
    self.execute(["strip", "roots(outgoing())"])
  File "weblate/vcs/base.py", line 190, in execute
    args, self.path, fullcmd=fullcmd, local=self.local, merge_err=merge_err
  File "weblate/vcs/base.py", line 177, in _popen
    raise RepositoryException(retcode, output)
nijel commented 4 years ago

Hmm, it should not set locale on the remote connection. We're trying to disable that, but that doesn't seem to work, see https://superuser.com/q/485569/20395

github-actions[bot] commented 4 years ago

Thank you for your report, the issue you have reported has just been fixed.