Difference between revisions of "SVN - Subversion"

From GLMWiki
Jump to: navigation, search
Line 70: Line 70:
 
== Where to get more help ==
 
== Where to get more help ==
 
http://subversion.apache.org/docs/
 
http://subversion.apache.org/docs/
 +
 +
== Viewing What Gaslight has in SVN ==
 +
http://cvs2/websvn websvn interface to svn repository
 +
http://cvs2/svn direct to repository

Revision as of 17:36, 9 February 2010

Important Note about versions

  • If you plan on using svn to update and commit files from devsys2 through samba you'll need to be sure that your client version is the same an what's on devsys2 (currently 1.4.3) Dave may update it to 1.4.6
  • DO NOT USE a higher version client than this.
  • The vrs # pertains to the svn client and not the application using svn

Installing SVN

Windows

ubuntu

  • Installing svn under ubuntu
    • sudo apt-get install subversion

Mac

More Applications

Importing a Site

  • All sites will be placed under the prod directory of the svn repository
    • svn import [PATH] URL
svn import www.newsite.com http://cvs2/svn/prod/www.newsite.com

Checking Out a Site

Checking in your Changes

  • svn ci [PATH]
svn ci -m "some discriptive comment on what was changed" file1.xxx

Working on Site (Branching)

  • Working on a branched copy is not difficult first create a copy of the site in svn
    • svn copy SRC DST
    • SRC and DST should be URL's of the site to make a branch
svn copy http://cvs2/svn/prod/www.newsite.com -m "branch off from prod/www.newsite.com"

http://cvs2/svn/dev/www.newsite.com

  • You can call the copy anything. In case there's someone else with that site in dev directory just make a new name
svn copy http://cvs2/svn/prod/www.newsite.com http://cvs2/svn/dev/steve.newsite.taskId# -m "branch off from prod/www.newsite.com"
  • Check out the branched copy.
    • svn co URL [PATH]
svn co http://cvs2/svn/dev/www.newsite.com

Merging your work back into the Production (trunk)

  • to merge your copy of your working branch back into the main trunk you'll need to make sure that your work is commited first and then checkout a copy of the trunk.
    • svn co URL [PATH]
svn co http://cvs2/svn/prod/www.newsite.com
    • if you already have this then check that it is updated
    • svn update [PATH]
svn update www.newsite.com
  • You need to know at what point your last commited branch changes was at (what commit vrs #)
    • you can find out by running a svn log command
svn log --verbose --stop-on-copy http://cvs2/svn/dev/www.newsite.com
r98 | steve | 2010-02-03- 09:26:09 -0500 (Wed, 03 Feb 2010) | 2 lines
Changed paths:
 A /dev/www.newsite.com (from /prod/www.newsite.com:97)
branch off from prod/www.newsite.com
  • from this we now know the branch started at revision 98 to get our copy into the trunk we'll need to merge in our changes from revision 98 to the HEAD revision (trunk)
  • svn merge -r N:M SOURCE [PATH]
svn merge -r 98:HEAD www.newsite.com http://cvs2/svn/dev/www.newsite.com

Moving files or directories in SVN

  • svn move SRC DST
svn move http://cvs2/svn/www.oopswrongspot.com http://cvs2/svn/prod/www.nowitscorrect.com

Resolving Conflicts

Where to get more help

http://subversion.apache.org/docs/

Viewing What Gaslight has in SVN

http://cvs2/websvn websvn interface to svn repository http://cvs2/svn direct to repository