Formatting issues when pulling from upstream

A few times I came across formatting issues. Like I pull from upsteram, mvn clean install, and see some locally modified files. For example:

commit 050f62220e8c54f63047a36d23d1c87bdd8f4444
Author: Clifton McIntosh <cliff.mcintosh■■■■■■■■■■>
Date:   Tue May 26 21:35:33 2015 -0500

TRUNK-4717 create a controller to handle requests for displaying a search index view and for rebuilding the search index; create a JSP for the search index view; create a privilege for managing the search index; create properties for the messages on the search index view.
(cherry picked from commit f75e4ac301cdab87f62c351fc4d523c1ff4e1298)

What should I do to make it fixed? Notify the one who created pull request? Notify the one who merged it? Create a new pull request by myself?

May be it’s worth to make Travis to fail on this case?

Alex could you clarify what the issue is? I am trying to understand based on the commit history you posted but I have failed!

Notifying the one who merged it, looks right. And if you are able to point them to a pull request with the formatting changes, that would be awesome!!!

You’ll see nothing in the commit. But if You check it out and run ‘mvn package’, You’ll see it is changed (formatted). See:

git reset --hard HEAD
HEAD is now at dfe1f31 uiFramework.development.moduleid VM argument should load classes from

mvn -DskipTests=true clean install

git status HEAD detached from 02e5026 Changes not staged for commit: (use “git add …” to update what will be committed) (use “git checkout – …” to discard changes in working directory)

    modified:   web/src/main/java/org/openmrs/web/controller/maintenance/SearchIndexController.java
    modified:   web/src/main/java/org/openmrs/web/filter/initialization/InitializationFilter.java
    modified:   web/src/test/java/org/openmrs/web/controller/maintenance/SearchIndexControllerTest.java

I only started build. But sources were changed by maven because of wrong formatting.

Do you know if it’s possible to have travis fail in this case? That would be pretty nice…

What is the best place to put this notification in? How about making a comment to an original issue in jira? Is it necessary to reopen the issue?

I think we can arrange maven-scm-plugin to do it.

1 Like