My favorites | Sign in
Project Home Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92


<!-- ================================================================= -->
<!-- ================================================================= -->
<!-- ================================================================= -->
<sect1 id="svn.reposadmin.projects">
<title>Adding Projects</title>

<para>Once your repository is created and configured, all that
remains is to begin using it. If you have a collection of
existing data that is ready to be placed under version control,
you will more than likely want to use the <command>svn</command>
client program's <literal>import</literal> subcommand to
accomplish that. Before doing this, though, you should
carefully consider your long-term plans for the repository. In
this section, we will offer some advice on how to plan the
layout of your repository, and how to get your data arranged in
that layout.</para>


<!-- =============================================================== -->
<sect2 id="svn.reposadmin.projects.import">
<title>Creating the Layout, and Importing Initial Data</title>

<para>After deciding how to arrange the projects in your
repository, you'll probably want to actually populate the
repository with that layout and with initial project data.
There are a couple of ways to do this in Subversion. You
could use the <command>svn mkdir</command> command (see <xref
linkend="svn.ref"/>) to create each directory in your
skeletal repository layout, one-by-one. A quicker way to
accomplish the same task is to use the <command>svn
import</command> command (see <xref
linkend="svn.tour.importing"/>). By first creating the layout
in a temporary location on your drive, you can import the
whole layout tree into the repository in a single
commit:</para>

<screen>
$ mkdir tmpdir
$ cd tmpdir
$ mkdir projectA
$ mkdir projectA/trunk
$ mkdir projectA/branches
$ mkdir projectA/tags
$ mkdir projectB
$ mkdir projectB/trunk
$ mkdir projectB/branches
$ mkdir projectB/tags
&hellip;
$ svn import . file:///path/to/repos --message "Initial repository layout"
Adding projectA
Adding projectA/trunk
Adding projectA/branches
Adding projectA/tags
Adding projectB
Adding projectB/trunk
Adding projectB/branches
Adding projectB/tags
&hellip;
Committed revision 1.
$ cd ..
$ rm -rf tmpdir
$
</screen>

<para>You can verify the results of the import by running the
<command>svn list</command> command:</para>

<screen>
$ svn list --verbose file:///path/to/repos
1 harry May 08 21:48 projectA/
1 harry May 08 21:48 projectB/
&hellip;
$
</screen>

<para>Once you have your skeletal layout in place, you can begin
importing actual project data into your repository, if any
such data exists yet. Once again, there are several ways to
do this. You could use the <command>svn import</command>
command. You could checkout a working copy from your new
repository, move and arrange project data inside the working
copy, and use the <command>svn add</command> and <command>svn
commit</command> commands. But once we start talking about
such things, we're no longer discussing repository
administration. If you aren't already familiar with the
<command>svn</command> client program, see <xref
linkend="svn.tour"/>.</para>

</sect2>
</sect1>

Change log

r3306 by cmpilato on Sep 15, 2008   Diff
Tag 1.5 version of the English book (also
known "Version Control With
Subversion, second edition", or "ISBN 10:
0-596-51033-0", or "ISBN 13:
9780596510336", or "Pilato's Bane", or
...)
Go to: 

Older revisions

r2681 by cmpilato on Feb 11, 2007   Diff
* src/en/book/ch-repository-admin.xml
  More hammerin' and sawin' on yet
another massive chapter.

* src/en/book/ORPHANED-TOPICS
...
All revisions of this file

File info

Size: 3633 bytes, 92 lines
Powered by Google Project Hosting