Domanda

I recently got into a slight argument with the other developer on my team about the correct way to develop with SVN and Eclipse. My way of developing in multiple branches is by creating new workspaces for each branch. The reason I create new workspaces for each branch is so that I can separate features/bug fixes from each other and from trunk. However, this doesn't mean that I am only supportive of people who use this methodology.

I don't care about how others use SVN as long as they put proper commit messages in the logs so that if anything happens (be it me or anybody else) we could always rollback.

The other developer on my team has a strong believe that the way I am creating new workspaces for each branch is NOT the way SVN was intended for use and grilled me pretty hard on it. They told me "you're not using SVN the way it was intended." The way they use it is by using a single workspace and switching around the directory between branches/trunk during development.

Although I feel this can get messy and confusing quite fast especially in our work environment where we work on multiple branches at once, it is one way people can develop.

Can someone put some clarity into the way I'm supposed to think about developing with multiple branches? Or am I correct as in there is no right or wrong way to do it and just different people prefer different methods?

Thank you

È stato utile?

Soluzione

I prefer your colleagues way because your process:

  • Creates a lot of clutter on your desktop
  • Switching/creating branches has more work involved. Have to pull branch into new directory, create a new workspace, switch IDE to new workspace
  • Arguably just as messy and confusing as the alternative. You will probably forget to switch workspaces from time to time and accidentally make a bunch of changes that you have to migrate to another directory.

The upside to your method is that you can have changes to the working copy on multiple branches without committing them, but for your colleague they would have to either commit their changes or try to temporarily stash them before switching branches.

Once you migrate to Git using the stash feature or committing locally is a great solution to that one drawback to your colleague's preference, and definitely using one workspace is the most common way in Git.

It's ignorant of your colleague to grill you on this. SVN doesn't have an "intention" for Eclipse workspaces. They're completely unrelated. Developers should choose the process that is most comfortable to them and least likely to make mistakes with.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
scroll top