This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Questions about SVN and Intellij IDEA 8  RSS feed

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am fairly new to IDEA and SVN and had some questions. But first, some background. I inherited a subversion project (Someone handed me a backup of a project in a jump drive and I opened it up in IDEA).

My questions are:
In the project window, If I right click on the project name I see "Synchronize 'The project name'." What does this do? Will it pull everything from the svn repository and overwrite (i.e., throw away my changes) my files or will it merge changes into my files indicating to me that these file have been merged?

What will right click on project directory->Subversion->Update Directory... do? Will it get things that are newer in the repository and merge them with my files indicating to me that some files have been merged?

Basically, what I am trying to figure out is 1) how do get the latest trunk from svn and in the process overwrite whatever I have changed locally? (that is, throw away whatever changes I have made locally) and 2) how do I get what is new from svn and have IDEA merge this with what I have so that after I oversee the merged files, I can check them in?
Thank you.

author and iconoclast
Posts: 24220
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"Update" will pull changes from the repository and merge them into your existing files. As long as the changes aren't too drastic, this will happen automatically, and you'll end up with files containing the most up-to-date files plus your local changes. If they're too drastic, you'll get merge errors, and the files will contain 'alternate sections' -- basically a tag followed by your version of the conflict area, followed by a tag, followed by the repository version, followed by a closing tag. You would then have to edit the file to resolve the conflict.

Synchronize will do the above, then commit any modified files back to the repository.

In neither case will your local changes be lost. This is the whole point of using a source control system.

All of this is pure Subversion stuff, by the way; IntelliJ isn't doing anything special other than giving you access to Subversion commands.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!