[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Getting started with subversion

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 15 Jul 2010 00:15:54 -0400

Let's get through this one step at a time:

First of all, if you are trying to use Subversion just to version your
own designs and files, you are probably better off with TimeMachine.
It versions your files and is very simple to use. All you need is a
$100 USB hard drive to connect to your Mac. Remember that it isn't if
your hard drive will fail, it is when, so the $100 investment is your
guarantee that you won't lose your valuable work.

You can also use Dropbox (http://dropbox.com) which is free for 2Gb of
space (which is quite a bit more than you realize). Dropbox versions
your files, and has some great collaboration features that allow to
share files with other users.

If you are doing development and need to use Subversion, I suggest you
get a book about Unix (Mac OS X is a type of Unix on the command line
level). For now, here are some important things to know:

1). "$HOME" represents your "Home" directory. For you, this is
"/Users/TommyHome". Knowing this can save you a lot of typing trouble.

2). "ls" is the command to list things on your Mac. By default, it
lists all the files and directories in the current directory. Typing
"ls -l" gives you a long listing.

3). "cd" changes your directory. You can give it a "relative path"
(i.e. the path from the current directory) or an absolute path (i.e.,
the path from the "root" file system).

4). "/" represents the root file system. If you type in the command
"cd /", it will go to the "root" directory. Typing "ls" will list all
of the directories and one will be called "Users". Typing "cd Users"
from the root directory will change into the Users directory. If you
do an "ls" there, you will see a directory "TommyHome". If you type in
"cd $HOME", you will go to your home directory no matter what
directory you are in the computer at the command prompt.

5). One more nice command is the "PWD" command. This will print our
your current directory. Also, "$PWD" (with a dollar sign) represents
the current directory. (If you have the default BASH Unix shell set).

========================

Okay, with those preliminaries out of the way, open the Terminal and
do the following. The "$" will represent your command prompt. This can
be changed, so in Unix, it is common just to put "$":

$ cd $HOME
$ svn mkdir svn_repos
$ cd mkdir svn_repos
$ svnadmin create newrepo

This will create a Subversion repository at /Users/TommyHome/svn_repos
called "newrepo". You can find this in Pathfinder. Now, you will want
to create a working directory:

$ cd $HOME
$ svn checkout file://$PWD/svn_repos/newrepo svn_project

This will allow you to checkout an EMPTY repository in Subversion in a
directory under your $HOME directory called "svn_project". When you
open a new Pathfinder window, you should see this directory.

If you're a developer, I highly suggest you get the book "Learning
Unix for Mac OS X" from O'Reilly and Associates
(http://oreil.ly/buTnGv) and Learning the VI and VIM Editors from
O'Reilly (http://oreil.ly/au5Srf). The Mac is a powerful development
platform, and unlike Windows, comes free with almost all development
tools.

On Wed, Jul 14, 2010 at 3:33 PM, Thomas Garrod <whidbeytomas_at_gmail.com> wrote:
> I'm sorry guys (and gals), I have a very basic question: How to you get
> files into your repository. I've got the O'Reilly book (2nd Edition), but
> I'm afraid is presumes too much of me.
> I looked at chapter 2, page 18, and it includes the following:
> ...typically use this when you have an existing tree of files that you want
> to begin tracking in your Subversion repository. For example:
> $ svnadmin create /ver/svn/newrepos
> $ svn import mytree file:///var/svn/newrepos/some/project \
>
> For the first line: what part of this is variable?
> For the second line: how do I know what to enter for "var/svn?newreos/
> some/project?"
>
> The path to my files on my computer is Macintosh HD/Users/TommyHome/
> KeelWorks/Projects/GraphicArt.
>
> My command client is Path Finder is set to "Macintosh: MyTaxes09
> TommyHome$" This is wrong, but I don't know how to change the
> directory. All tips accepted, except "get a brain" (I tried that).
>
> When I typed 'svnadmin create /ver/svn/newrepos' I got the following
> response:
> svnadmin: Repository creation failed
> svnadmin: Could not create top-level directory
> svnadmin: Can't create directory '/var/svn/newrepos': No such file or
> directory
> Macintosh:GraphicArt TommyHome$
> If someone would simple pretend that I am a 2-year old and tell me how to
> add files to the repository, I would be eternally grateful (or at least for
> a long time).
> Tomas

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-07-15 06:16:34 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.