Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge conflict that cannot be locally reproduced #8755

Closed
2 tasks done
eighthave opened this issue Feb 6, 2023 · 11 comments
Closed
2 tasks done

merge conflict that cannot be locally reproduced #8755

eighthave opened this issue Feb 6, 2023 · 11 comments
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@eighthave
Copy link
Contributor

Describe the issue

In https://hosted.weblate.org/projects/f-droid/website/, it says there is a merge conflict. I cannot reproduce it locally. I do:

git fetch weblate
git checkout -b w weblate/master
git rebase master

And it rebases fine every time. I also tried including the commits that Weblate say conflict, e.g. 11e2219ed. But it still says there is a merge conflict.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. https://hosted.weblate.org/projects/f-droid/website/#repository
  2. click on Update -> Rebase
  3. Wait for it to finish
  4. See merge conflict
error: could not apply 11e2219ed... Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 11e2219ed... Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Auto-merging po/_posts.he.po
CONFLICT (content): Merge conflict in po/_posts.he.po

Expected behavior

If there is no merge conflict locally, I can't see why there is one in Weblate.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Feb 7, 2023

I can still reproduce this on the server. Do you have some git configuration (~/.gitconfig) which might affect this?

For some reason, git doesn't recognize d7fca0ded34e60836b51c84479d2774ec73249bd (which is already in upstream repo) to be a cherry-pick of 11e2219ed7fcc519f3086640926bd7b1043c5529, and stops on that, even though there is actual conflict.

I've just manually fixed that in the Weblate repo...

@eighthave
Copy link
Contributor Author

I don't think my git config should affect it. Here's my ~/.gitconfig:

[pull]
	ff = only
[transfer]
	fsckObjects = true
[advice]
	skippedCherryPicks = false

And the relevant bits in the repo's .git/config:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true

@eighthave
Copy link
Contributor Author

I'm using git v2.39.1 from Debian/bookworm.

@nijel
Copy link
Member

nijel commented Feb 7, 2023

We're on git 2.30.2, that might cause some differences... Will try to play with this more later.

@nijel nijel self-assigned this Feb 8, 2023
@nijel nijel added the enhancement Adding or requesting a new feature. label Feb 8, 2023
@nijel nijel added this to the 4.16 milestone Feb 8, 2023
@nijel
Copy link
Member

nijel commented Feb 8, 2023

It turns out that the Weblate git configuration is guilty here – the merge driver for PO files didn't gracefully handle this.

@nijel nijel closed this as completed in 20c04d0 Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

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

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@rtsisyk
Copy link

rtsisyk commented Feb 11, 2023

I use the same tooling as @eighthave and have the same issue:

Local gettext tooling:

# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Organic Maps
# This file is distributed under the same license as the Organic Maps Website package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Organic Maps Website 1.0\n"
"Last-Translator: Amparo0 <nnoe@disroot.org>\n"
"Language-Team: Catalan <https://hosted.weblate.org/projects/organicmaps/website/ca/>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.16-dev\n"

Weblate:

# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Organic Maps
# This file is distributed under the same license as the Organic Maps Website package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr "Project-Id-Version: Organic Maps Website 1.0\nPO-Revision-Date: 2023-02-10 09:15+0000\nLast-Translator: Amparo0 <nnoe@disroot.org>\nLanguage-Team: Catalan <https://hosted.weblate.org/projects/organicmaps/website/ca/>\nLanguage: ca\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=n != 1;\nX-Generator: Weblate 4.16-dev\n"

po4a configuration has --msgmerge-opt='--no-wrap':

https://github.com/organicmaps/organicmaps.github.io/blob/77adf46254c75dce137c465ba2b3b7a70bd6b748/.po4a.cfg#L3-L5

Weblate has Customize gettext output - No line wrapping:

image

All other strings are ok, only PO Entry Header is affected.

https://hosted.weblate.org/addons/organicmaps/website/
organicmaps/organicmaps.github.io#113

@nijel
Copy link
Member

nijel commented Feb 11, 2023

@rtsisyk That's not related to this issue. Moreover, I think Weblate behaves correctly – you ask it to not wrap lines, and it does not wrap them.

@rtsisyk
Copy link

rtsisyk commented Feb 11, 2023

@rtsisyk That's not related to this issue. Moreover, I think Weblate behaves correctly – you ask it to not wrap lines, and it does not wrap them.

Thanks for the quick response.You are right, Weblate behaves as requested.

@eighthave how to you deal with this issue in F-Droid repo?

@eighthave
Copy link
Contributor Author

eighthave commented Feb 13, 2023 via email

@rtsisyk
Copy link

rtsisyk commented Feb 13, 2023

I'm not sure what your issue is, but in F-Droid, we reformat msgid/msgstr entries gettext files to be a single line, if that is useful to you.

This idea is not bad. I will check this option. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants