~ubuntu-branches/ubuntu/quantal/netbeans/quantal

« back to all changes in this revision

Viewing changes to subversion/main/javahelp/org/netbeans/modules/subversion/docs/svnmodule/svn_branches.html

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
Import upstream version 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 
2
            "http://www.w3.org/TR/html4/loose.dtd">
 
3
<!--
 
4
*     Copyright © 2007 Sun Microsystems, Inc. All rights reserved.
 
5
*     Use is subject to license terms.
 
6
-->
 
7
<html>
 
8
    <head>
 
9
        <title>Working with Branches in Subversion</title>
 
10
        <link href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css"
 
11
            rel="StyleSheet" type="text/css">
 
12
    </head>
 
13
    
 
14
    <body>
 
15
        
 
16
        <h2>Working with Branches in Subversion</h2>
 
17
        
 
18
        <p><small><a href="#seealso">See Also</a></small></p>
 
19
        
 
20
        <p>The IDE's Subversion support enables you to:</p>
 
21
        
 
22
        <ul>
 
23
            <li><a href="#checkout">checkout branches</a> from a remote repository.</li>
 
24
            <li><a href="#create">create branches</a> in the repository you are working from.</li>
 
25
            <li><a href="#switch">switch to a branch</a> in the repository you are working from.</li>
 
26
        </ul>
 
27
        
 
28
        <p>For more information on working with branches, see the Subversion documentation at:</p>
 
29
        
 
30
        <p>
 
31
            <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
 
32
                <param name="content" value="http://svnbook.red-bean.com/">
 
33
                <param name="text" value="&lt;html&gt;&lt;u&gt;http://svnbook.red-bean.com/&lt;/u&gt;&lt;/html&gt;">
 
34
                <param name="textFontSize" value="medium">
 
35
                <param name="textColor" value="blue">
 
36
            </object></p>
 
37
            
 
38
        <h3><a name="checkout"></a>Checking out branches</h3>
 
39
        
 
40
        <p>If you need to edit files on a branch folder that already exists, you can checkout 
 
41
            the branch to copy the files to a local working directory. You must however create 
 
42
            a new local working directory within which to checkout the branch.</p>
 
43
</p>
 
44
            
 
45
        <h4>To checkout a branch to your local working directory:</h4>
 
46
        
 
47
        <ol>
 
48
            <li>Choose Versioning &gt; Subversion &gt; Checkout from the main menu. The 
 
49
                Subversion Checkout wizard opens.</li>
 
50
            <li>In the first panel of the wizard, enter a URL that contains the connection 
 
51
                protocol and location to the repository. Depending on your protocol selection
 
52
                and connection requirements, enter any required parameters, such as username, 
 
53
                password, proxy configuration, etc. Click Next.</li>          
 
54
            <li>In the Folders to Checkout panel of the wizard, specify the folder that 
 
55
                represents the branch you want to check out in the Repository Folder(s) field.
 
56
                You can click the Browse button to choose from a list of all folders in the 
 
57
                repository. Specify the revision number if you want to work from a specific 
 
58
                revision.
 
59
                
 
60
                <ul>
 
61
                    <li>To checkout only the contents of the folder you are specifying 
 
62
                        (i.e. and not the folder itself), select the Skip 
 
63
                        &quot;&lt;<tt>selected_folder</tt>&gt;&quot; and checkout only 
 
64
                        its content option.</li>
 
65
                </ul></li>
 
66
 
 
67
            <li>Specify the local working directory into which you want to checkout the 
 
68
                selected branch folder. Alternately, you can click the Browse button to 
 
69
                navigate to the desired directory on your system.</li>
 
70
            <li>Click Finish to check out the branch folder. The IDE initiates the checkout 
 
71
                action and the IDE's status bar indicates the progress of the files 
 
72
                downloading from the repository to your local working directory. You can 
 
73
                also view files being checked out from the Output window (Ctrl-4).</li>
 
74
        </ol>
 
75
            
 
76
        <h3><a name="create"></a>Creating branches</h3>
 
77
            
 
78
        <p>If you want to work on a separate version of your file system for stabilization 
 
79
            or experimentation purposes, you can do so by creating a branch. To create a 
 
80
            branch in Subversion, you are effectively copying a version-controlled project
 
81
            or folder and adding it to a new location within the repository. The IDE's 
 
82
            Subversion support enables you to select a source from either your local working 
 
83
            copy, or browse to a location in the repository you are working from. You can 
 
84
            create branches in the IDE by choosing Subversion &gt; Copy To from a versioned 
 
85
            file or folder's contextual menu.</p>
 
86
  
 
87
        <h4>To create a branch:</h4>
 
88
        
 
89
        <ol>
 
90
            <li>Select the versioned project or folder (e.g. in the Projects, Files, or 
 
91
                Favorites window) that you want to be the root of your branch and choose 
 
92
                Subversion &gt; Copy To. The Subversion Copy dialog box opens.</li>
 
93
            <li>Under Source, select Local Folder if you want to create a branch from 
 
94
                your local working copy, otherwise select Remote Folder to specify the 
 
95
                version maintained in the repository.
 
96
            
 
97
                <ul>
 
98
                    <li>You can specify a specific revision of the selected item by entering 
 
99
                        a revision number in the Revision text box. Clicking the Search button 
 
100
                        adjacent to the Revision text box allows you to view revisions maintained 
 
101
                        in the repository.</li>
 
102
                    <li>Click the <strong>Skip selected Folder and copy only its Contents</strong> 
 
103
                        option if you want to avoid including the selected folder when creating 
 
104
                        a copy.</li>
 
105
                </ul></li>
 
106
                
 
107
            <li>Under Destination, select the target location for the new branch copy. In 
 
108
                Repository Location, type in a path relative to the repository, otherwise 
 
109
                click the Browse button to open a new dialog that aids in browsing the 
 
110
                repository folders.</li>
 
111
            <li>Enter a description for the new branch folder in the Copy Description text
 
112
                area. If you want to switch to the branch after creating it, select the
 
113
                Switch to Copy checkbox.</li>
 
114
            <li>Click Copy. The IDE creates the branch by copying the folder contents to the 
 
115
                specified location in the repository.</p>
 
116
        </ol>
 
117
 
 
118
        <h3><a name="switch"></a>Switching to a Branch</h3>
 
119
        
 
120
        <p>If you want to switch your local working copy to point to a branch or other
 
121
            location in the repository, you can do so using the Subversion Switch to 
 
122
            command.</p>
 
123
            
 
124
        <h4>To switch to a branch or other location in the repository:</h4>
 
125
        
 
126
        <ol>
 
127
            <li>Select a versioned file or folder (e.g. from the Projects, Files, or Favorites 
 
128
                window) and choose either Subversion &gt; Switch to Copy from the right-click 
 
129
                menu or Versioning &gt; Switch to from the IDE's main menu. The Subversion Switch
 
130
                dialog box opens.</li>
 
131
            <li>For Repository Folder, enter the branch folder you want to switch to, or click 
 
132
                Browse to view a list of all locations in the repository.
 
133
            
 
134
                <ul>
 
135
                    <li>If you need to specify a previous revision, enter the revision number 
 
136
                        for the selected location. Leave blank if you require the most recent 
 
137
                        revision. To display a log of all revisions for the selected location, 
 
138
                        you can click the Search button.</li>
 
139
                </ul></li>
 
140
                
 
141
            <li>Click Switch. The IDE updates your working copy to reflect the content maintained
 
142
                by the newly selected branch location in the repository. Note that any differences 
 
143
                arising between your local working copy and the location that you are switching to 
 
144
                will be overwritten by the new location.</li>
 
145
        </ol>
 
146
 
 
147
        <dl>
 
148
            <dt>
 
149
            <a name="seealso">See Also</a></dt>
 
150
            <dd> <a href="svn_checkout.html">Checking Out Files from a Subversion Repository</a></dd> 
 
151
        </dl>
 
152
        
 
153
        <hr>
 
154
        <small><a href="../credits.html">Legal Notices</a></small>
 
155
        <br><br><br>
 
156
    </body>
 
157
</html>