• This is Slide 1 Title

    This is slide 1 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

  • This is Slide 2 Title

    This is slide 2 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

  • This is Slide 3 Title

    This is slide 3 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

Monday, 17 March 2014

Installing Subversion


This documentation was written to describe Subversion 1.5. If you are running a newer version of Subversion, we strongly suggest that you visit http://www.svnbook.com/ and consult the version of this book appropriate for your version of Subversion.

Installing Subversion

Subversion is built on a portability layer called APR—the Apache Portable Runtime library. The APR library provides all the interfaces that Subversion needs to function on different operating systems: disk access, network access, memory management, and so on. While Subversion is able to use Apache as one of its network server programs, its dependence on APR does not mean that Apache is a required component. APR is a standalone library usable by any application. It does mean, however, that like Apache, Subversion clients and servers run on any operating system that the Apache httpd server runs on: Windows, Linux, all flavors of BSD, Mac OS X, NetWare, and others.
The easiest way to get Subversion is to download a binary package built for your operating system. Subversion's web site (http://subversion.tigris.org) often has these packages available for download, posted by volunteers. The site usually contains graphical installer packages for users of Microsoft operating systems. If you run a Unix-like operating system, you can use your system's native package distribution system (RPMs, DEBs, the ports tree, etc.) to get Subversion.
Alternatively, you can build Subversion directly from source code, though it's not always an easy task. (If you're not experienced at building open source software packages, you're probably better off downloading a binary distribution instead!) From the Subversion web site, download the latest source code release. After unpacking it, follow the instructions in the INSTALL file to build it. Note that a released source package may not contain everything you need to build a command-line client capable of talking to a remote repository. Starting with Subversion 1.4 and later, the libraries Subversion depends on (apr, apr-util, and neon) are distributed in a separate source package suffixed with -deps. These libraries are now common enough that they may already be installed on your system. If not, you'll need to unpack the dependency package into the same directory where you unpacked the main Subversion source. Regardless, it's possible that you may want to fetch other optional dependencies such as Berkeley DB and possibly Apache httpd. If you want to do a complete build, make sure you have all of the packages documented in the INSTALL file.
If you're one of those folks that likes to use bleeding-edge software, you can also get the Subversion source code from the Subversion repository in which it lives. Obviously, you'll need to already have a Subversion client on hand to do this. But once you do, you can check out a working copy of the Subversion source repository fromhttp://svn.collab.net/repos/svn/trunk/[59]
$ svn checkout http://svn.collab.net/repos/svn/trunk subversion
A    subversion/HACKING
A    subversion/INSTALL
A    subversion/README
A    subversion/autogen.sh
A    subversion/build.conf
…
The preceding command will create a working copy of the latest (unreleased) Subversion source code into a subdirectory named subversion in your current working directory. You can adjust that last argument as you see fit. Regardless of what you call the new working copy directory, though, after this operation completes, you will now have the Subversion source code. Of course, you will still need to fetch a few helper libraries (apr, apr-util, etc.)—see the INSTALL file in the top level of the working copy for details.


[59Note that the URL checked out in the example ends not with svn, but with a subdirectory thereof called trunk. See our discussion of Subversion's branching and tagging model for the reasoning behind this.

Version Control with Subversion


This documentation was written to describe Subversion 1.5. If you are running a newer version of Subversion, we strongly suggest that you visit http://www.svnbook.com/ and consult the version of this book appropriate for your version of Subversion.

Version Control with Subversion

For Subversion 1.5

(Compiled from r3305)

Ben Collins-Sussman

Brian W. Fitzpatrick

C. Michael Pilato

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
(TBA)

Table of Contents
Foreword
Preface
Audience
How to Read This Book
Conventions Used in This Book
Organization of This Book
This Book Is Free
Acknowledgments
From Ben Collins-Sussman
From Brian W. Fitzpatrick
From C. Michael Pilato
What Is Subversion?
Is Subversion the Right Tool?
Subversion's History
Subversion's Architecture
Subversion's Components
What's New in Subversion
1. Fundamental Concepts
The Repository
Versioning Models
The Problem of File Sharing
The Lock-Modify-Unlock Solution
The Copy-Modify-Merge Solution
Subversion in Action
Subversion Repository URLs
Working Copies
Revisions
How Working Copies Track the Repository
Mixed Revision Working Copies
Updates and commits are separate
Mixed revisions are normal
Mixed revisions are useful
Mixed revisions have limitations
Summary
2. Basic Usage
Help!
Getting Data into Your Repository
svn import
Recommended Repository Layout
Initial Checkout
Disabling Password Caching
Authenticating As a Different User
Basic Work Cycle
Update Your Working Copy
Make Changes to Your Working Copy
Examine Your Changes
See an overview of your changes
Examine the details of your local modifications
Undoing Working Changes
Resolve Conflicts (Merging Others' Changes)
Viewing conflict differences interactively
Resolving conflict differences interactively
Postponing conflict resolution
Merging conflicts by hand
Discarding your changes in favor of a newly fetched revision
Punting: Using svn revert
Commit Your Changes
Examining History
Generating a List of Historical Changes
Examining the Details of Historical Changes
Examining local changes
Comparing working copy to repository
Comparing repository revisions
Browsing the Repository
svn cat
svn list
Fetching Older Repository Snapshots
Sometimes You Just Need to Clean Up
Disposing of a Working Copy
Recovering from an Interruption
Summary
3. Advanced Topics
Revision Specifiers
Revision Keywords
Revision Dates
Properties
Why Properties?
Manipulating Properties
Properties and the Subversion Workflow
Automatic Property Setting
File Portability
File Content Type
File Executability
End-of-Line Character Sequences
Ignoring Unversioned Items
Keyword Substitution
Sparse Directories
Locking
Creating Locks
Discovering Locks
Breaking and Stealing Locks
Lock Communication
Externals Definitions
Peg and Operative Revisions
Changelists
Creating and Modifying Changelists
Changelists As Operation Filters
Changelist Limitations
Network Model
Requests and Responses
Client Credentials Caching
Summary
4. Branching and Merging
What's a Branch?
Using Branches
Creating a Branch
Working with Your Branch
The Key Concepts Behind Branching
Basic Merging
Changesets
Keeping a Branch in Sync
Mergeinfo and Previews
Undoing Changes
Resurrecting Deleted Items
Advanced Merging
Cherrypicking
Merge Syntax: Full Disclosure
Merges Without Mergeinfo
More on Merge Conflicts
Blocking Changes
Merge-Sensitive Logs and Annotations
Noticing or Ignoring Ancestry
Merges and Moves
Blocking Merge-Unaware Clients
The Final Word on Merge Tracking
Traversing Branches
Tags
Creating a Simple Tag
Creating a Complex Tag
Branch Maintenance
Repository Layout
Data Lifetimes
Common Branching Patterns
Release Branches
Feature Branches
Vendor Branches
General Vendor Branch Management Procedure
svn_load_dirs.pl
Summary
5. Repository Administration
The Subversion Repository, Defined
Strategies for Repository Deployment
Planning Your Repository Organization
Deciding Where and How to Host Your Repository
Choosing a Data Store
Berkeley DB
FSFS
Creating and Configuring Your Repository
Creating the Repository
Implementing Repository Hooks
Berkeley DB Configuration
Repository Maintenance
An Administrator's Toolkit
svnadmin
svnlook
svndumpfilter
svnsync
fsfs-reshard.py
Berkeley DB utilities
Commit Log Message Correction
Managing Disk Space
How Subversion saves disk space
Removing dead transactions
Purging unused Berkeley DB logfiles
Berkeley DB Recovery
Migrating Repository Data Elsewhere
Filtering Repository History
Repository Replication
Repository Backup
Managing Repository UUIDs
Moving and Removing Repositories
Summary
6. Server Configuration
Overview
Choosing a Server Configuration
The svnserve Server
svnserve over SSH
The Apache HTTP Server
Recommendations
svnserve, a Custom Server
Invoking the Server
svnserve as daemon
svnserve via inetd
svnserve over a tunnel
svnserve as Windows service
Built-in Authentication and Authorization
Create a users file and realm
Set access controls
Using svnserve with SASL
Authenticating with SASL
SASL encryption
Tunneling over SSH
SSH configuration tricks
Initial setup
Controlling the invoked command
httpd, the Apache HTTP Server
Prerequisites
Basic Apache Configuration
Authentication Options
Setting up HTTP authentication
SSL certificate management
Authorization Options
Blanket access control
Per-directory access control
Disabling path-based checks
Extra Goodies
Repository browsing
Apache logging
Write-through proxying
Other Apache features
Path-Based Authorization
Supporting Multiple Repository Access Methods
7. Customizing Your Subversion Experience
Runtime Configuration Area
Configuration Area Layout
Configuration and the Windows Registry
Configuration Options
Servers
Config
Localization
Understanding Locales
Subversion's Use of Locales
Using External Editors
Using External Differencing and Merge Tools
External diff
External diff3
Summary
8. Embedding Subversion
Layered Library Design
Repository Layer
Repository Access Layer
Client Layer
Inside the Working Copy Administration Area
The Entries File
Pristine Copies and Property Files
Using the APIs
The Apache Portable Runtime Library
URL and Path Requirements
Using Languages Other Than C and C++
Code Samples
Summary
9. Subversion Complete Reference
The Subversion Command-Line Client: svn
svn Options
svn Subcommands
svn add
svn blame
svn cat
svn changelist
svn checkout
svn cleanup
svn commit
svn copy
svn delete
svn diff
svn export
svn help
svn import
svn info
svn list
svn lock
svn log
svn merge
svn mergeinfo
svn mkdir
svn move
svn propdel
svn propedit
svn propget
svn proplist
svn propset
svn resolve
svn resolved
svn revert
svn status
svn switch
svn unlock
svn update
svnadmin
svnadmin Options
svnadmin Subcommands
svnadmin crashtest
svnadmin create
svnadmin deltify
svnadmin dump
svnadmin help
svnadmin hotcopy
svnadmin list-dblogs
svnadmin list-unused-dblogs
svnadmin load
svnadmin lslocks
svnadmin lstxns
svnadmin recover
svnadmin rmlocks
svnadmin rmtxns
svnadmin setlog
svnadmin setrevprop
svnadmin setuuid
svnadmin upgrade
svnadmin verify
svnlook
svnlook Options
svnlook Subcommands
svnlook author
svnlook cat
svnlook changed
svnlook date
svnlook diff
svnlook dirs-changed
svnlook help
svnlook history
svnlook info
svnlook lock
svnlook log
svnlook propget
svnlook proplist
svnlook tree
svnlook uuid
svnlook youngest
svnsync
svnsync Options
svnsync Subcommands
svnsync copy-revprops
svnsync help
svnsync initialize
svnsync synchronize
svnserve
svnserve Options
svndumpfilter
svndumpfilter Options
svndumpfilter Subcommands
svndumpfilter exclude
svndumpfilter include
svndumpfilter help
svnversion
svnversion
mod_dav_svn
mod_dav_svn Configuration Directives
mod_authz_svn
mod_authz_svn Configuration Directives
Subversion Properties
Versioned Properties
Unversioned Properties
Repository Hooks
start-commit
pre-commit
post-commit
pre-revprop-change
post-revprop-change
pre-lock
post-lock
pre-unlock
post-unlock
A. Subversion Quick-Start Guide
Installing Subversion
High-Speed Tutorial
B. Subversion for CVS Users
Revision Numbers Are Different Now
Directory Versions
More Disconnected Operations
Distinction Between Status and Update
Status
Update
Branches and Tags
Metadata Properties
Conflict Resolution
Binary Files and Translation
Versioned Modules
Authentication
Converting a Repository from CVS to Subversion
C. WebDAV and Autoversioning
What Is WebDAV?
Autoversioning
Client Interoperability
Standalone WebDAV Applications
Microsoft Office, Dreamweaver, Photoshop
cadaver, DAV Explorer
File-Explorer WebDAV Extensions
Microsoft Web Folders
Nautilus, Konqueror
WebDAV Filesystem Implementation
WebDrive, NetDrive
Mac OS X
Linux davfs2
D. Copyright
Index

How To Set Up An SVN Repository In 7 Simple Steps

AJ Roach Profile Photo
A. J. Roach

on

 
May 25, 2010

How To Set Up An SVN Repository In 7 Simple Steps

For some time now, I've wanted to have an svn set up on my shared web host similar to what we have here at civicactions.  Having to make changes on my local machine for any personal (non-civicactions client) sites, then scp those files up to my server is ridiculous -- especially since when working on client sites, I've become so used to simply commiting the changes to a repository and then updating that repository on the server side.  All that said though, I kept putting off the svn set up because as a simple drupal and civicrm developer, I was afraid that a system admin task like setting up svn would be too involved and maybe a bit over my head.  Turns out, I should've done it months ago.  It's crazy easy!

Step 1

Make sure that svn is installed on your web host.  Just ssh into your account and type
which svn
Lucky for me, my shared host already had svn installed at /usr/bin/svn.  If you're not so lucky, then you'll need to install svn yourself.  Depending on your system and your set up, there are multiple ways to do this.  For this and all other svn questions, I'd recommend the svn red book.  One of the finest examples of open source software documentation I've ever seen.  Extremelyhelpful.  Of course, if you're on a shared host like me, then you probably won't have the access you need in order to install svn.  In that case, contact your system administrator and ask them to install svn for you.

Step 2

Create your repository. Once svn is installed on your host, you can proceed with the repository set up.  Just ssh into your server and create a repository wherever you'd like it.  In my case I put my repository in my user directory.  I would've preferred to have it in the root directory, but because it's a shared host, I don't have write access to anything outside of my user directory.  To create the repository, issue the following command:
svnadmin create ~/myrepository

Step 3

Create your SVN user: Now that your repository is successfully set up, you'll need to create an svn user.  Simply open the svnserve.conf file in the editor of your choice:
pico ~/myrepository/conf/svnserve.conf
and add the following:
anon-access = none
auth-access = write
password-db = passwd
Now you'll need to create a password file:
pico ~/myrepository/conf/passwd
Add a line in that file for your user in the format =
exampleuser = examplepassword

Step 4

Create a hierarchy for your repository: This step is optional.  It's not needed in order to get svn to work properly, but if you're planning on keeping multiple projects under revision control, then it's a good idea to get organized before you start importing those projects.  In my case, I'll be working on upgrading one of my sites from Drupal 5 to Drupal 6 soon (yes, I know...  I've been putting that off too.), so I wanted a trunk for the Drupal 5 project and a trunk for the soon-to-be-upgraded Drupal 6 project.  You can create directories in your repository in almost the same way you create them on your file system, using mkdir.  You'll need to use svn's mkdir command though like so: NOTE: Relative paths don't seem to work here.  svn doesn't seem to like '~', so remember to start with the root directory (so it'll look like 'file:///root/rest/of/path...'.  With three forward slashes.
svn mkdir file:///path to your repository/myrepository/d5
svn mkdir file:///path to your repository/myrepository/d6
Now you're almost there.  Next, you'll need to import the files you want to keep under version control into your new repository.  Do that with the svn import command.
svn import /path to your project/myD5project file:///path to your repository/myrepository/d5
svn import /path to your project/myD6project file:///path to your repository/myrepository/d6

Step 5

Run the svn server as daemon:
svnserve -d

Step 6

Check out your repository onto your local machine: Back on your local machine, go to where you keep your nerd stuff.  In my case it's in ~/workspace.  Then use the svn co command to check out a copy of your project.
cd ~/workspace
svn co svn+ssh://username@hostname/path to repository/myrepository/d6

Step 7

Go get a tasty beverage and rest comfortably in the knowledge that you'll never have to scp another file again.  Well, except for maybe the occasional mysqldump file...
You might check to make sure that you have the proper directories listed in step 4. I've seen that error when i either had a trailing slash, However, if I were doing this now for my own use, I would probably use Git instead of svn.You should keep captcha right below the text area, I missed to see it or just hit enter Thank you. 
dear  siri want how to  configure for connect svn sever linux to windows.
On step 4 I get the following error:svn: '.' is not a working copy
You might check to make sure that you have the proper directories listed in step 4. I've seen that error when i either had a trailing slash, or was missing a period to indicate the current directory.  You can also try "svn cleanup ." from the directory you are having trouble with.
i created a folder "d5" with svn mkdir. then i import a file "whatever" into that folder using svn import but i get error:svn: Path 'file:///.........../db5' already existsbut if i introduce ANOTHER_FOLDER then it imports it.svn mkdir file:///path to your repository/myrepository/d6svn import /path to your project/myD5project file:///path to your repository/myrepository/d5/ANOTHER_FOLDER 
i created a folder "asdf" with svn mkdir. then i import a file "whatever" into that folder using svn import but i get error svn path already exists.
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) optionssvn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found can any one guide me here?
Not sure why you would use svnserve, much better to use apache to serve svn.http://www.duchnik.com/tutorials/vc/installing-and-configuring-svn-on-ce...cheers! 
Do you know if you have to have Apache 2 installed, or will good old Apache 1.3.42 do? 
I did this a few years ago, not on a shared hosting account but on a VPS I have at Slicehost. Slicehost has an amazing collection of well-written articles on all kinds of sysadmin and LAMP topics. With their articles on Subversion I was able to get my repo up and running easily.
That series of articles will lead you through the process and give you a bit more detail about security, multiple repositories, and while very easy to follow, explain some of the 'why' behind the 'how'.
Here are some slides from a presentation a colleague and I did on Git and SVN a month or two ago: Version Control with SVN and Git.
However, if I were doing this now for my own use, I would probably use Git instead of svn.
Thank you for writing this, I was really looking for it. So far I have only used on Windows SVN without command line but mouse, right click left click to checkout or commit etc and only for local development never tried at hosting company account.
I wish you would have created a screenshot based version.
Info may be helpful to you:
a. when I searched your page was in top 6 on google
b. I can't see this specific article/post at any other web page
c. What hosting company you did this svn stuff, mine is Godaddy
d. I often get the development by myself or independent contractor so want to keep track using svn type tool/process

SUGGESTION:
You should keep captcha right below the text area, I missed to see it or just hit enter

Thank you.