Making the Jump to Subversion
Pages: 1, 2, 3
4.3 Committing changes.
When you are ready to commit the changes you've made to your local work area and share them with the rest of your team, you need to commit those changes to the repository. Take a look at the status of your work area to verify what changes will be committed to the repository:
svn status
Before you commit your changes, you'll need to make sure your work area is up-to-date with the latest version of the repository (using svn update). And once everything looks ready to go, commit your project work area via the following command:
svn commit -m "Look at all the work I did"
You can optionally select files individually or in groups by specifying them in the command as follows:
svn commit -m "Look at some of the work I did" ./README.txt
4.4 Conflict resolution.
If you've made changes to a file, and your changes conflict with the changes it has in the repository, you won't be able to check in your changes until you resolve them (see page 28, Resolve Conflicts). When you attempt to update, Subversion will create three temporary copies of the file experiencing conflict:
filename.mine (your version – pre-update)
filename.r<OLDREV> (the version before you made your changes)
filename.r<NEWREV> (the newest revision from the repository)
It is now up to you to manually edit the filename file using the other three temporary files as reference to merge the changes from your version and the new repository version. Once this is finished let Subversion know the conflict is resolved by issuing the command:
svn resolved filename
This will delete the .mine, .r<OLDREV> and .r<NEWREV> copies of the file and you will be able to proceed with checking in your changes.
Conclusion
Congratulations! You've set up an industrial-strength revision control system, one that is secure, fast, flexible, and free.
Subversion and Apache provide a myriad of options and configurations that can be tailored to suit just about any type of organization's or individual's needs. The setup described in this article is designed to get you up and running with a solid, secure configuration with as little administrative overhead as possible. I hope that once you become comfortable with this basic configuration you will explore the many ways of enhancing your use of Subversion.
|
Related Reading
Version Control with Subversion |
Resources and Tips
Some useful resources and links:
- The Subversion book online
- Version Control with Subversion
- Converting a project from CVS to Subversion
- Official Subversion Project Site
- Subversion Project Links
- Subversion FAQ
- Linux Journal: Setting Up Subversion for One or Multiple Projects
- Setting up HTTPS on OS X
- Setting up HTTPS in Apache2
Things to Do
- Set up regular repository backups.
- Set up Apache for automatic launch, follow the instructions for configuring automatic launch via SystemStarter.
Things to Watch Out For
Some applications that store documents as directory bundles may delete the .svn folder that Subversion uses from inside the bundle directory. EOModeler will delete the .svn directory when you save your document. This is annoying but not difficult to work around -- when you are ready to check in your changes, if Subversion displays the status code '~' (meaning: versioned item obstructed by some item of a different kind) perform the following steps (based on a model named MyModel):
% mv MyModel.eomodeld MyModel.mine
% svn update MyModel.eomodeld
% mv MyModel.eomodeld/.svn MyModel.mine/
% rm -r MyModel.eomodeld
% mv MyModel.mine MyModel.eomodeld
An important note for former CVS users: Use svn status where you would have used cvs update to check the status of your work area. Use svn -u status to include working revision and server out-of-date information from the repository.
When Things Go Wrong
- Read Version Control with Subversion, see the subversion online resources, mailing lists, FAQs, etc.
- You made a backup, right?
- Send me an email and I'll try to help.
Adam Swift is a longtime software engineer, developing WebObjects applications since its first release, and Cocoa software since it was called the AppKit on his NeXT slab, circa 1991.
Return to MacDevCenter.com.
-
Using Subversion (SVN) in OS X with XCode & Apache2
2006-11-06 18:05:41 bsodmike [View]
-
Bash script for packages
2006-04-09 08:37:09 wrashi [View]
-
Updated Owner Information
2006-04-09 07:08:41 wrashi [View]
-
Updated Owner Information
2006-10-11 06:45:29 Elise_van_Looij [View]
-
Odd Error
2006-01-13 15:05:05 lolajl [View]
-
Odd Error
2006-10-11 06:42:24 Elise_van_Looij [View]
- Trackback from http://www.stephanjaeger.com/users/stephan/diary/archives/2005/10/macdevcentercom.php
Trackback Message
2005-10-24 08:14:04 [View]
-
/usr/local/apache/etc Directory
2005-07-13 12:32:50 lolajl [View]
-
/usr/local/apache/etc Directory
2006-10-11 06:47:31 Elise_van_Looij [View]
-
cvs2svn does not work?
2005-01-23 03:25:35 Thomas_Ganter [View]
-
cvs2svn does not work?
2005-01-25 13:04:29 aswift [View]
- Trackback from http://www.andrewsavory.com/blog/archives/000392.html
Subverting Subversion
2004-10-05 03:16:13 [View]
-
EOModeler .svn fix
2004-09-21 13:34:01 JimMcLoughlin [View]
- Trackback from http://morten.dk/blog/archives/3-Subversion-day-1.html
Subversion day 1
2004-09-10 01:09:38 [View]
-
Another Subversion StartupItem
2004-09-02 12:25:55 aswift [View]
-
Can't import to svn
2004-08-27 14:08:39 jaw6 [View]
-
Can't import to svn
2004-09-28 11:53:07 christian_u [View]
-
Can't import to svn
2005-06-24 07:52:29 mizumitai [View]
-
Resource Forks
2004-08-25 13:00:43 chopblock [View]
-
Resource Forks
2005-01-28 08:49:26 mizumitai [View]
- Trackback from http://shawnsmiley.com/archive/0001/01/01/159.aspx
Choosing a version management tool
2004-08-19 18:53:38 [View]
- Trackback from http://shawnsmiley.com/archive/0001/01/01/159.aspx
Choosing a version management tool
2004-08-19 18:52:28 [View]
-
Apache2 StartUpItem
2004-08-18 05:30:36 robbevan [View]
-
Can't Log into idisk
2004-08-12 15:41:37 lolajl [View]
-
Can't Log into idisk
2004-08-13 05:27:39 aswift [View]
-
Can't Log into idisk
2004-08-13 09:26:35 lolajl [View]
-
Subversion works for me
2004-08-12 09:51:59 hopelessOne [View]
-
svnX : a GUI for svn
2004-08-12 05:12:53 dominiqueperetti [View]
- Trackback from http://channels.lockergnome.com/linux/archives/20040811_subversion_powerful_revision_control_system.phtml
Subversion - powerful revision control system
2004-08-11 18:40:07 [View]
- Trackback from http://www.alpha-geek.com/2004/08/11/subversion_for_cvs_users
Subversion for CVS Users
2004-08-11 12:23:31 [View]
-
caution
2004-08-11 12:17:46 synthoria [View]
-
Problem under 10.2.8
2004-08-11 09:18:45 guyumbright [View]
-
Problem under 10.2.8
2004-08-11 11:53:34 guyumbright [View]
-
Apple and Subversion
2004-08-11 09:12:56 jeffhuff [View]
-
Apache 2 Required?
2004-08-11 08:26:59 lolajl [View]
-
Apache 2 Required?
2004-08-11 16:09:20 omnival [View]
-
Apache 2 Required?
2004-08-11 08:46:52 aswift [View]
-
Apache 2 Required?
2004-09-03 15:56:37 jamestichenor [View]
- Trackback from http://www.extragroup.de/weblog/extragroup/vwi/archives/001115.html
Subversion
2004-08-11 01:48:16 [View]

