Case changes in a repository (git) will not be recognized

In our git repository a file was renamed/moved from Foo to foo with git mv command. So it is no problem in windows if you checkout the repository.

The problem is continua ci uses mercurial to save the different branch heads in the agent directory.
by just adding the file mercurial will not recognize the case change. 
Now it is impossible to build the java application because it will try to build it with Foo.java instead of foo.java. 


This is a problem with git and mercurial on windows. The only solution is to delete the file, commit, re-add it with the new name, commit, push. Then Continua will pick up the change.

This is not really a problem with git and windows it is more a problem how continuaci will commit this change to the continuaci repository for branch caching.

Lets be more specfic:

We develop currently version 7.10.0. I have 3 build configurations:

1) with branch “release/7.0.0” (until it is completly tested and released)
2) with branch “develop” (current development for the planned version 7.10.0)

Everything is fine so far no problems. The filename (case) change was in version 6.20.0 and was commited with the git mv command so it is no problem in windows even if ignore case is set to true. The git mv command will delete and readd the file so it will be recognized.

Now an important customer needs an update for version 5.30.0. So i created a support branch “support/5.30.x” and a new build configuration:

3) with branch "support/5.30.x"
And now the build will fail because continuaci will copy the head of the branch to the agent and commit the difference between 7.10.0 and 5.30.0 to the internal hg repository. The case change at this file between these two branches (or version) in 6.20.0 will not be recognized. 

There is nothing i could do to fix this except changing the name of the file in each branch i would use and this is no solution.

Possible solution could be:
a) continuaci dont use hg for branch caching. Instead just use robocopy for mirroring the branch heads to the agent. This needs more space but it is safe.
b) continuaci should detect case changes between branches and use the “hg rename foo FOO” before commiting a branch head to the internal hg repository
c) continuaci should use git with ignore case set to false and forced checkouts (to avoid collisions)


The only chance i have at the moment to use finalbuilder for repository handling which is not what i expected by moving from finalbuilder webserver to continuaci.

a) That’s what we did initially… it’s too slow, and uses way too much space.
The reason for using mercurial (we could have, and perhaps should have chosen git but thats with hindsight) is that it solved many of the problems we were dealing with in making sure the agents had the correct version of the source available to put in the build workspaces.

b) That might be possible… we first have to detect the case change, it’s not as simple as it sounds.

c) This sounds more feasable, but we’ll have to investigate it.

The git support is currently being rewritten to deal with issues with merge commits. We’ll test and hopefully fix the case issue as part of that task.

Is there any news for this problem?

Regards

Hi Dave,

We’re currently investigating this and hope to implement a solution soon.

 

Hi dave should this be fixed in 1.7.80RC? I tried it yesterday but the case change between our branches is still not recognized.

Regards

Hi Dave,

Yes, it should be fixed. At least it works for us…

Were the files that you tested part of a changeset that was already detected and listed in Continua before you installed the new version?  If so can you either test with new commits, including changes to those files, or reset the repositories. The case of the file names is fixed once the changes are already in the repository cache.

If it still doesn’t work, can you let us know which version of the git command line you have installed? e.g. type “git version” into a command line. Can you also enable debug logging, restart the server before committing some more changes to the relevant files? Run builds on the new change sets then send the debug log to support@finalbuilder.com. Include commit hashs so we can identify the relevant commits in the debug log and ideally the output of “git log --graph --decorate --source --name-status --topo-order --parents -m” for your repository.


Hi Dave,

I tried already a reset without success. To make it easier to understand i drawed this picture from the git repository:



Now i made 2 build configuration:
1) develop (7.10.0) -> everything is fine.
2) support 5.30.x build configuration and this will fail because the file DBTables.java will be added as DbTables.java in the hg agent repo.
Note that the filename “DBTables.java” was not changed in one of the current branches!



Best regards dave

Hi Dave,

Thank you for the extra details. We do understand your issue and have reproduced it in version 1.6. We have not, however, managed to reproduce this behaviour in 1.7 in our tests yesterday and again today with a similar repository . We therefore need to understand how this is working differently on your system. 

Can you please send a debug log - details on enabling debugging are documented at http://wiki.finalbuilder.com/displa…ug+Logging? Ensure you restart the server after updating the debug log and before following the steps to reproduce the issue, then send the debug log to support@finalbuilder.com. We also would like to know the version of your Git command line (on the server) as this may also be relevant to the cause of the issue.


Hi Dave as you requested i sended all details to support@finalbuilder.com

btw i have noticed that the git log command will just output all informations if the latest branch is checked out (in this case develop).
If the branch support/5.30.x is the head it will not contain the case change mentioned here because it will just print the history until this version.
(as mentioned maybe this could the problem?)

I sended you the complete output (until develop) in a seperate mail.

Regards
Dave