Subversion
Subversion is considered by many to be the successor to CVS for affordable electronic file version control. Many Operating System distributions come with svn already installed. For example Apple's OS X 10.5.X now includes svn 1.4.X, where previous releases required special installers.
# yum list \*subversion\* ... Available Packages subversion.i386 1.4.2-4.el5 base subversion-devel.i386 1.4.2-4.el5 base subversion-javahl.i386 1.4.2-4.el5 base subversion-perl.i386 1.4.2-4.el5 base subversion-ruby.i386 1.4.2-4.el5 base # yum install subversion ... Installed: subversion.i386 0:1.4.2-4.el5 Dependency Installed: apr.i386 0:1.2.7-11 apr-util.i386 0:1.2.7-7.el5_3.1 neon.i386 0:0.25.5-10.el5 perl-URI.noarch 0:1.35-3 postgresql-libs.i386 0:8.1.11-1.el5_1.1 Complete! # yum list \*inet\* ... Available Packages perl-IO-Socket-INET6.noarch 2.51-2.fc6 base xinetd.i386 2:2.3.14-10.el5 base # yum install xinetd ... Installed: xinetd.i386 2:2.3.14-10.el5 Complete!
$ ls -lhd /public/svn drwxrwsr-x 7 rickatech subvsn 4.0K Jul 5 20:40 /public/svn $ svnadmin create /public/svn
$ ls -R um um: notes.txt $ svn import um file:///public/svn/um -m "fp" Adding um/notes.txt Committed revision 1.
$ svn co file:///public/svn/um A um/notes.txt Checked out revision 1. $ ls -Ra .: . .. um ./um: . .. notes.txt .svn ./um/.svn: . .. entries format prop-base props text-base tmp ... $ svn info um Path: um URL: file:///public/svn/um Repository Root: file:///public/svn Repository UUID: 2a33dff9-0b7b-49a1-a411-a1b6993661c1 Revision: 2 Node Kind: directory Schedule: normal Last Changed Author: rickatech Last Changed Rev: 2 Last Changed Date: 2009-07-05 20:52:13 -0700 (Sun, 05 Jul 2009)
$ svn co file:///public/svn/um $ svn co svn://192.168.2.24/um A um/notes.txt Checked out revision 1. $ svn co svn://localhost/um ... requires authentication, creates ~/.subversion user settings ... $ svn co svn co file:///public/svn/um ... bypasses authentication, creates ~/.subversion user settings ...
# cd /public/svn # ls -al conf dav db format hooks locks README.txt # cd /public/svn/conf # rcsdiff * diff -r1.1 passwd 8a9,10 > rickatech = 1234 diff -r1.1 svnserve.conf 11a12 > anon-access = none 18c19 < # password-db = passwd --- > password-db = passwd # service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
Common commands ...
|
|
Review existing tags and branches. Create a tag, delete a tag.
$ svn list https://svn.motmd.com/svn/foobar branches/ tags/ trunk/ $ svn list https://svn.motmd.com/svn/foobar/tags 1.0.0/ ... 1.0rc3/ $ svn copy -m "Rick's patches" https://svn.motmd.com/svn/foobar/trunk https://svn.motmd.com/svn/foobar/tags/1.0.5 ... $ svn delete -m "poof" https://svn.motmd.com/svn/foobar/1.0.5 ...
Switch working files from trunk to branch. This is a handy non-invasive way to see what files have changed since a branch was made. Reverse the parameters to switch from branch back to trunk.
$ svn status
$ svn info | grep URL
URL: .../svn/nimbus/trunk
$ svn switch .../svn/nimbus/tags/1.0.4
D public_htdocs/XPButtonUploadText_61x22.png
D public_htdocs/swfupload
A public_htdocs/flash
A public_htdocs/flash/swfupload_f9.swf
...
U nimbus.tmproj
U classes/ComponentNew.php
$ svn info | grep URL
URL: .../nimbus/tags/1.0.4 svnlook is a non-invasive command that works directly on the file system to get status and other state information. It can not be used with a repository URL (red-bean.com).
$ svnlook diff -r 6185 /disk1/svn_repos/nor1upgrades
Modified: trunk/include/classes/UtilsNor1.php
===================================================================
--- trunk/include/classes/UtilsNor1.php 2010-08-10 16:41:21 UTC (rev 6184)
+++ trunk/include/classes/UtilsNor1.php 2010-08-10 19:07:50 UTC (rev 6185)
@@ -720,11 +720,20 @@
$emailQueue->_type = EmailQueue::$_TYPE_EXTROOMCD;
$emailQueue->_status = EmailQueue::$_STATUS_WAIT;
if (self::hasValidObjStatus($property) && self::hasValidObjStatus($chain)) {
- $emailQueue->save();
- $emailQueue->_body = "Please add the room code '$code' into iProp (test system)\r\n"
- ."Property: ".$property->_name." (".$chain->_name.")";
- $emailQueue->save();
- } else {
+ $emailQueue->save(); /* Note: email body is written to .../emails/[year]/[month]/... */
+ $emailQueue->_body = "<!--\r\n<TEXT>\r\n";
+ $emailQueue->_body .= "Please add the room code '$code' into iProp (test system)\r\n";
+ $emailQueue->_body .= "Property: ".$property->_name." (".$chain->_name.")\r\n";
+ $emailQueue->_body .= "\r\nURI:\r\n".$_SERVER['REQUEST_URI'].")\r\n";
+ $emailQueue->_body .= "</TEXT> -->\r\n";
+ $emailQueue->_body .= "<HTML>";
+ $emailQueue->_body .= "\n<p>Please add the room code '$code' into iProp (test system)";
+ $emailQueue->_body .= "\n<br>Property: ".$property->_name." (".$chain->_name.")";
+ $emailQueue->_body .= "\n\n<p>URI:\r\n".$_SERVER['REQUEST_URI'].")</p>";
+ $emailQueue->_body .= "\n</HTML>\n";
+ $emailQueue->save();
+ }
+ else {
return Errors::addDebug(__METHOD__, "No email, because property or chain is not active yet");
}
$ svnlook log -r 6185 /disk1/svn_repos/nor1upgrades
RESOLVED - bug 2214: Include DLMI request URL in error email
https://bugs.nor1solutions.com/show_bug.cgi?id=2214
$ svnlook info -r 6185 /disk1/svn_repos/nor1upgrades
rarmstrong
2010-08-10 19:07:50 +0000 (Tue, 10 Aug 2010)
116
RESOLVED - bug 2214: Include DLMI request URL in error email
https://bugs.nor1solutions.com/show_bug.cgi?id=2214