Recently we've had some projects that were in branches, had been merged back on to the trunk and gone through our QA and testing processes. When it came to merging this project work into the deploy branch we discovered a few issues, odd merge conflicts, silly whitespace clashes and alike. All of these issues got resolved, the code was packaged up and pushed to the live servers. Done, or so we thought.
A few days later when it came to doing another live deploy, I got asked the question "why's SVN showing me a bunch of random files as being modified when I haven't touched them?". Initially I had no good answer, we validated and diff'd the files against the base copies and no changes were there. A quick Google for "files show as modified in svn when they're not" resulted in number of results all pointing towards issues with svn:mergeinfo properties.
The scenario that leads you in to this situation basically runs a bit like this (simplified!):
- do some work on a branch
- merge that branch to trunk
- merge that change in to your deploy branch
- resolve the conflicts in whatever way you need to
- commit and deploy
Everything is committed, up to date, no files have changed and it's all working yet in your project working directory when you run a svn status you still have some miscreant files.
Remove the offending mergeinfo property flags.
Commit the reverted, cleanup mergeinfo issues.
Make sure that your code is all sorted and updated.
Now, you can get back to what you wanted to do in the first place which was merge you changes.
Now you can commit the changes.
Note that if you haven't got the code up to date you might see an error along theses lines:
You should now have a nice, tidy, up to date SVN repository.
All of these merge issues and the lengthy steps undertaken to get the house in order again raises the question what do we do next?
SVN was and is great when there are a handful of developers sitting next to each other all working on the same project. Everything is relatively simple and linear from a development / workflow standpoint. When that team grows as we have over the years this becomes more and more of a challenge. You need multiple branches for different projects, you have different teams working on them and eventually they all need to come back together.
So, what's the answer? In a word, git. All our new projects are now using it and we're slowly migrated the SVN repositories as well. There's many comparisons between SCM's on the web but with the rapid world of web app development git is shining through as the best choice. It allows for increased flexibility both in terms of it's functionality but also the ease multiple teams and projects can interact and be cherry picked to deploy when they're ready.Orginally published at dev.venntro.com