#263 Solving merge conflict in translations in Weblate
Merged by rcritten. Opened by rffontenelle.
rffontenelle/certmonger fix-merge-conflict  into  master

This is an attempt to solve a merge conflict (seen in the project's alert page in Fedora Weblate) that is currently blocking translations to be pushed from Weblate to this repository. I assume it started after this commit 3301bf42.

I solved a merge conflict in the ru.po commit, so chances is that to merge this PR some manual action is required (which I do not have access).

The alert message:

Weblate could not merge upstream changes while updating the repository.

Rebasing (1/8)
Auto-merging po/ru.po
CONFLICT (content): Merge conflict in po/ru.po
error: could not apply ad8262ed... Translated using Weblate (Russian)
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply ad8262ed... Translated using Weblate (Russian)
(1)

Typical workflow for fixing merge conflicts

  1. Commit all pending changes in Weblate and lock the translation component.
    wlc commit; wlc lock
  2. Add Weblate exported repository as a remote.
    git remote add weblate https://translate.fedoraproject.org/git/certmonger/master/ ; git remote update weblate
  3. Merge Weblate changes and resolve any conflicts.
    git merge weblate/master
  4. Rebase Weblate changes on top of upstream and resolve any conflicts.
    git rebase origin/master
  5. Push changes into upstream repository.
    git push origin master
  6. Weblate should now be able to see updated repository and you can unlock it.
    wlc pull ; wlc unlock

Check the FAQ for info on how to resolve this.

Appeared 9 months ago, last seen a minute ago

Thanks for the patch. It doesn't apply cleanly to master:

$ patch -p1 --dry-run < 263.patch
checking file po/ru.po
checking file po/id.po
checking file po/cs_CZ.po
checking file po/hu.po
checking file po/hu.po
Hunk #1 FAILED at 12.
Hunk #2 succeeded at 1277 (offset -1 lines).
Hunk #3 succeeded at 1409 (offset -1 lines).
Hunk #4 succeeded at 1417 (offset -1 lines).
Hunk #5 succeeded at 1425 (offset -1 lines).
Hunk #6 succeeded at 1502 (offset -1 lines).
Hunk #7 succeeded at 1522 (offset -1 lines).
1 out of 7 hunks FAILED
checking file po/da.po
checking file po/ka.po
checking file po/ko.po

Can you solve this manually merge conflict and the push it?

The situation is: currently Weblate won't push contributions nor update the translation strings template because there is a conflict between commits caused by 3301bf4. Even if one simply put the new translated strings in ru.po there will still be a history conflict.

I was wrong about the merge conflict, these are fine. I'm going to try to re-run CI. It may be that it only works as me :-(

The weblate repo is already locked AFAICT. So I think once this is merged it will unblock it.

Yeah, there are some scenarios where Weblate locks the translations as things went wrong and need someone to manually act upon it. Like a rumba bot meeting an unevenness in the floor, says the interwebs. :-)

Once this is merged or, at least these contributions land in the source code repository, I can ran some Repository Management for this project in Weblate.

My rebuild of the PR was successful, https://copr.fedorainfracloud.org/coprs/rcritten/certmonger/build/6451911/

I skimmed the changes and didn't see anything obviously wrong. Thanks for shepherding this through. Hopefully this will open up certmonger for further translations.

Pull-Request has been merged by rcritten

I unlocked the weblate repo.

Awesome! All push and missing commits were zeroed. Thanks!