GurdeepS
GurdeepS

Reputation: 67223

Questions about source control etiquette

When using svn in Eclipse, can I add files normally or do I need to tell SVN about an add? If so, how?

Also, is it a must to always do an update to get the latest code from the server when working on a project? The problem with this is that sometimes another team member may work on the code I am working on and check in at every milestone without informing me (when the task is not pair-based, either).

Finally, is there a sandbox feature in svn? Like a local repository of my code which is still WIP. If so, where?

Thanks

Upvotes: 0

Views: 206

Answers (2)

Sanjay T. Sharma
Sanjay T. Sharma

Reputation: 23208

The steps which I usually follow when using SVN in a team setting:

  • Synchronize the project with repository; this shows me all the changes made to the project files which I can then inspect in a diff sort of view by double-clicking the file
  • If all the changes are OK or don't affect me, I do a complete UPDATE TO HEAD
  • If I encounter a conflict, I make sure that all those conflicts are resolved. After this is done, perform step 2
  • Make small changes, test small changes and commit frequently as far as possible.

Finally, is there a sandbox feature in svn? Like a local repository of my code which is still WIP

Not that I know of though DVCS's have the concept of differentiating between "commit" and "push" which might be what you are looking for.

Upvotes: 0

prodigitalson
prodigitalson

Reputation: 60413

When using svn in Eclipse, can I add files normally or do I need to tell SVN about an add? If so, how?

You can still use another SVN client like the commandline or what have you. Just make sure you refresh your project in Eclipse before trying to commit.

Also, is it a must to always do an update to get the latest code from the server when working on a project? The problem with this is that sometimes another team member may work on the code I am working on and check in at every milestone without informing me (when the task is not pair-based, either).

Its not a must but It's adviseable to do so before you commit. Firstly because your changes my break the project if they arent in sync with the changes others have committed. Secondly, if your changes modify a file that has been changed and commited since the last time you did an update svn is going to make you do an update on that file before it allows you to commit anyway.

Finally, is there a sandbox feature in svn? Like a local repository of my code which is still WIP. If so, where?

No there isnt. There is your "Working Copy" and there is the "Repository". This is one of the use of branches in svn. Each team member could have their own branch, or each feature could have its own branch for isolated development. Developers can then commit to the branch they are working on as they see fit, and when they are done someone can merge that branch back to the trunk.

Upvotes: 2

Related Questions