Re: Directory structure for project in Eclipse using Subclipse
"Uttormark, Tim" <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <9FF69050257FC0479018211CD530F8BC0DD7CEA1@CORP2K3MAIL.corp.peopleclick.com> |
In SVN, the trunk, branches, and tags are all implemented as directories. The distinction in use is purely convention, not implementation. If you aren't familiar with the concepts, SVN has excellent online documentation, including a free entire O'Reilly book accessible through the project website http://subversion.tigris.org The convention is that tags are used for the same purpose as labels in other source control systems. In line with this, our projects treated tags as read-only. We would never have active development going on from a tag. If necessary we would have gone back and started a branch from a tag, but never needed to. The design of your directory structures (trunk, tags, branches) in the SVN server is independent of the client which you use to access them. I personally used 3 different clients simultaneously -- Tortoise, Subclipse, and the command line clients. The command line scripts were used from ant. Often our tags were created from ant, e.g., we tagged each CruiseControl build with the build number. I used Tortoise when working in from Windows Explorer. I used it when creating new branches or tags manually. Most often I also checked in using Tortoise. Generally I just found it easier to visualize what I was doing from Tortoise. I used subclipse primarily for fetching updates into my Eclipse workspace. When you use clients outside of Eclipse to do updates, you have to be careful to manually refresh the Eclipse project otherwise it does not recognize the changes. I would suggest that you start with trunk, branches and tags as per the SVN convention, but just leave tags and branches empty for a while. Set up the trunk the way that you like (to match the way that you work), and then use it for a while. If it isn't working well, then move things around. Try the different clients to see which you like best. Configure each client as needed (e.g., so that it doesn't flag class files as changes or try to check them into the repository). -- Tim Uttormark Principal Java Architect, Peopleclick -----Original Message----- From: Richard O. Hammer [mailto:[email protected]] Sent: Friday, October 03, 2008 6:03 PM To: Java Users Group Cc: Uttormark, Tim Subject: Re: [Juglist] Directory structure for project in Eclipse using Subclipse Tim, Thank you. I am still having trouble making sense of this. Do you keep track of tags? And if so would you suggest a separate Eclipse project for each tag? Do you use Subclipse's mechanism to "Configure Branches/Tags"? (found in the context menu for a project -> Team -> Configure Branches/Tags) Subclipse keeps on making directories in places that seem wrong to me. I am wondering if it would be easier to forget Subclipse and do all my version control from a command prompt. Thanks again, Rich Hammer Uttormark, Tim wrote: > Assuming that you are using the "standard/suggested" setup for branching > in subversion, each directory under "branches" should represent the > entire content of "trunk" at a different point in time. > > What you want then is one Eclipse project for trunk, and another for > each branch. The Eclipse .project and .classpath files go immediately > under the trunk and branch directories, and are versioned along with the > branch. For instance, the set of jars can change over time; this is > reflected in a change to the .classpath file in each branch/trunk. You > would not want to try to share one .classpath across branches as it > could not account for this. > > So: > > projectHome_current (maps to SVN trunk, represents V3 in my example) > - src > - bin > - .project > - .classpath (has jars needed for current [V3] build) > > projectHome_v1 (maps to SVN branches/v1_branch) > - src > - bin > - .project > - .classpath (has jars needed for v1 build) > > projectHome_v2 (maps to SVN branches/v2_branch) > - src > - bin > - .project > - .classpath (has jars needed for v2 build) > > > -- Tim Uttormark > Principal Java Architect, Peopleclick > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Richard O. Hammer > Sent: Friday, October 03, 2008 1:52 PM > To: Java Users Group > Subject: [Juglist] Directory structure for project in Eclipse using > Subclipse > > I am trying to figure out how to set up a project in Eclipse that will > use Subversion through the Subclipse plug-in. I want a directory > structure that is logical and useful. > > The documentation I see suggests using three directories under the > project home, one each for: trunk, branches, and tags. But how does > that relate to the src and bin directories Eclipse likes to use? Are > all five of those in the project home? Or is there some way to set up > Eclipse to recognize a structure like this: > > projectHome > - trunk > - src > - bin > -tags > -branches > > Or am I supposed to have a top level package named "trunk" in a > structure like this: > > projectHome > -src > - trunk > - tags > - branches > -bin > > What works? > > Thank you, > Rich Hammer > > _______________________________________________ > Juglist mailing list > [email protected] > http://trijug.org/mailman/listinfo/juglist_trijug.org > >