Skip to content

December 7, 2011

Subversion & Eclipse – Branching a linked resource inside a Subversion-managed Eclipse project

We use Subversion to manage all our Flash projects. We also have a separate project for our class libraries, and we usually add this project (or a subdirectory of it) as a linked resource to our Flash projects. For most projects this is a great way to share and maintain the class library.

A combination of factors has recently made this less workable than we’d like. A new coder (based on the other side of the country in Perth, WA) has created the need to branch our class library. When all the developers sit in the same room it’s much easier to be lazy and manage the refactoring process in an ad-hoc fashion, but distance means extra discipline is required.

Branching the code library is easy, just follow the Subclipse/Tortoise/Subversion documentation. To integrate the branch in the (separate) Flash project repo I created a new ‘src_branch’ folder and checked out the branch I wanted from our class library.

So now we have one checked-out repo (the class library) inside another different checked-out repo (the Flash project). Updates and commits work like this:

  • The class library repo updates and commits normally (right-click, choose Team/Commit), but has the Subversion ‘question mark’ icon because the Flash Project repo doesn’t know about it.
  • The Project repo will update normally, but we can’t commit the project files by choosing the root directory and committing (Subversion gives an error and says we need to update first, even when we have the latest revision). Instead we need to CTRL-click to select the items inside the Project folder (except for the class library repo) and then we commit those items.

It’s a little convoluted at first, but is working well and preventing the breakages that were becoming too common. It also means we’re free to build major updates and replacements to our architecture, something that’s really only become possible with the additional developer.

Read more from Best Practice

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments