|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Product Reviews Advanced Source Control In VisualAge For Java
Advanced Source Control In VisualAge For Java
By: Tim deBoer
Mar. 1, 2001 12:00 AM
For software developers source code is more than just files on a disk - it's the result of hours of thought and work and must be protected. If you look at the number of software tools available to help developers track and store their source code, you'll see that code protection is a key part of any serious software development effort. A software configuration management (SCM) tool is as important as a compiler or debugger, but as any experienced developer can tell you, getting your favorite tools to work together isn't always easy - especially when they're from different companies. VisualAge for Java version 3.5 includes an External Version Control (EVC) tool that interacts with external SCM systems. Each project in VisualAge for Java can be associated with an SCM system (called "adding a project to version control") and a specific group of files in the SCM system's source code. Once you've added a project to version control, you can add classes to your SCM systems, check classes in and out of the system, and import the most recently checked-in version of a class from the SCM system into the Integrated Development Environment (IDE). In Part 1 we discuss the following:
In Part 2 we'll continue with a discussion on path prefixes and refreshing your SCM files in the IDE. Using the Team Server Instead of the EVC Tool The VisualAge for Java repository is inseparable from the IDE and is at the heart of most functions offered by the product. However, developers don't need to learn its SCM role if they're using another SCM tool. If you prefer a third-party SCM tool, you can use a local repository instead of the shared repository. There are certain advantages to using only a local repository and the EVC tool:
However, there are several reasons why developers may also wish to use a shared repository:
There's no single right answer. The decision of which method to use depends on the characteristics and requirements of your development team. The remainder of this article assumes that an external SCM tool will be used by the development team, and discusses how VisualAge for Java's EVC tooling bridges the gap. Automatic Versioning of Your SCM Files Versioned copies of your code can be very useful. If, for example, you refresh your project and accidentally replace a file you've changed with another unchanged version from your SCM system, you can simply replace the new version in the workspace with the older version from the repository using the Replace With > Another Edition menu item. Although developers using the tool don't need to worry about the internal versioning that occurs, the tool itself relies on this information to track changes and determine courses of action during processing. Merging Changes You can modify the source code for a project associated with an external SCM tool even if the code has not been checked out yet. The edits are allowed and you're reminded that you didn't check out the source yet. In addition, the status icon beside the filename shows a warning symbol. If it's necessary to check in the changes later, you can check out the file, resolve any conflicts, and then check in the code. You can merge the code of an older version of a file with the code contained in a newer version. For example, you can import a file into the IDE without checking it out, then edit it and save your changes. If you then decide you want to check the file out from your SCM system but don't want to lose your changes, simply check out the file, compare the new and old versions, and merge any changes. If you check out a file that someone else has changed, the difference is detected and you're asked how you want to proceed. You can either ignore the changes, leaving your source in the workspace, or you can ask to load the most recent version. This is where the automatic versioning comes in handy. Loading the new code will replace your changes, but they're safely versioned in the repository. Using the IDE's "Compare With" functionality, you can bring your modifications into the current source code and check in a properly merged file without accidentally deleting your co-worker's efforts. Working with Class Groups and Resource Files However, any resource files associated with the selected project or package won't be checked in. Since resource files are not actually contained in projects or packages (they're only associated with them), any SCM actions you perform at a project or package level won't affect them. Instead, you must work with the files separately in the Resources page of the Workbench or Project browser. Conclusion The EVC tool in VisualAge for Java version 3.5 enables you to manage your source code from within the IDE and work with many external configuration management systems. This allows you to enjoy the benefits of your SCM system while still taking advantage of VisualAge for Java's powerful development environment. In Part 2 we'll continue this topic with an article on path prefixes and refreshing your SCM files in the IDE. Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
|
||||||||||||||||||||||||||||||||||||||||||||||||