I work on a project using maven and svn. Today after a svn update, the maven build was failing on the svn trunk. When I looked in the svn logs, I saw something strange: a commit affecting two branches. Few files were commited on the foo branch - the expected result of this commit - and one were commited on the trunk (the reason of the maven fail), all of this in one commit. This commit was made on Eclipse using a SVN plugin (I don't know which one). Merges between this two branches had already been made few days ago, and the developer had an up to date working copy. This was fixed easily by reverting the delictuous file, but I don't understand what happend and I would like to understand it. Is this the result of an unfixed conflict, or an auto-commited unstaged file from a switched branch ? On svn, isn't a working copy linked to one branch ?
One commit in two branches: what happened?
svn;branching;merging;scm
As previously noted in the comments, a commit which affects a branch and a trunk at the same time is technically possible, so it looks more like PEBCAK.I can see two reasons.The person had both the trunk and the branch checked out, and the person mistakenly changed the trunk when thinking he was working on the branch. It happens.There is a symlink pointing at the files in the trunk, so changing the branch actually affected the trunk as well.