Jenkins builds sometime fail with "Your local changes to the following files would be overwritten by merge"
+ git merge --no-edit origin/devel error: Your local changes to the following files would be overwritten by merge: wiki/src/doc/about/features.de.po wiki/src/doc/about/features.fr.po wiki/src/doc/about/features.pt.po wiki/src/doc/advanced_topics.index.de.po wiki/src/doc/advanced_topics.index.fr.po wiki/src/doc/advanced_topics.index.pt.po wiki/src/doc/anonymous_internet/Tor_Browser.de.po wiki/src/doc/anonymous_internet/Tor_Browser.fr.po wiki/src/doc/anonymous_internet/Tor_Browser.pt.po wiki/src/doc/first_steps/installation.de.po wiki/src/news/version_1.4.de.po wiki/src/news/version_1.4.fr.po wiki/src/news/version_1.4.pt.po wiki/src/support/faq.de.po wiki/src/support/faq.fr.po wiki/src/support/faq.pt.po wiki/src/support/known_issues.de.po wiki/src/support/known_issues.fr.po wiki/src/support/known_issues.pt.po Please, commit your changes or stash them before you can merge. error: The following untracked working tree files would be overwritten by merge: wiki/src/doc/advanced_topics/paperkey.de.po wiki/src/doc/advanced_topics/paperkey.fr.po wiki/src/doc/advanced_topics/paperkey.pt.po Please move or remove them before you can merge.
I suspect that running
git clean -fdx before merging would be enough to fix that.
Remove files that are not under version control when building in Jenkins.
Jenkins is keeping per-build workspaces around, as shown by errors seen when it
merges the base branch into the to-be-built branch: "The following untracked
working tree files would be overwritten by merge". That's probably a useful
optimization, except it breaks the build e.g. when new translatable files have
been introduced without the corresponding PO files at some point.
Don't modify files in the source tree before having possibly merged the base branch into it.
Previously, when building in Jenkins, we refreshed the wiki (twice) and
translations before merging the base branch. As a result, we're seeing build
failures with the "Your local changes to the following files would be
overwritten by merge" error message.
Let's now build the wiki and refresh translations only after having merged the
base branch, which makes more sense anyway: we want to include changes from the
base branch into the wiki and translations. And while we're at it, let's refresh
the wiki only once when building in Jenkins.
Note that Vagrant builds will still build the wiki before setting up the ramdisk
and running live-build: those builds don't merge the base branch anyway, so they
can as well keep the wiki build caching mechanism, which is a nice optimization.
#5 Updated by intrigeri over 4 years ago
- Assignee set to anonym
Explicitly assigning to the current RM, since apparently anonym missed it last time he said he had cleaned his review'n'merge plate. anonym, when you're RM, please make sure you take care for Ready for QA tickets that are assigned to nobody :)