1<div id="Moving-directories"></div>
2<div class="header">
3<p>
4Previous: [[cvs: Moving and renaming files#Moving and renaming files|Moving files]], Up: [[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories|Adding and removing]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
5</div>
6
7----
8
9<div id="Moving-and-renaming-directories"></div>
10=== Moving and renaming directories ===
11<div id="index-Moving-directories"></div>
12<div id="index-Renaming-directories"></div>
13<div id="index-Directories_002c-moving"></div>
14
15The normal way to rename or move a directory is to
16rename or move each file within it as described in
17[[cvs: The Normal way to Rename#The Normal way to Rename|Outside]].  Then check out with the &lsquo;<code>-P</code>&rsquo;
18option, as described in [[cvs: Removing directories#Removing directories|Removing directories]].
19
20If you really want to hack the repository to rename or
21delete a directory in the repository, you can do it
22like this:
23
24
25# Inform everyone who has a checked out copy of the directory that the directory will be renamed.  They should commit all their changes, and remove their working copies, before you take the steps below.
26
27
28# Rename the directory inside the repository.
29
30<div class="example" style="margin-left: 3.2em">
31 $ cd $CVSROOT/<var>parent-dir</var>
32 $ mv <var>old-dir</var> <var>new-dir</var>
33</div>
34
35
36# Fix the <small>CVS</small> administrative files, if necessary (for instance if you renamed an entire module).
37
38
39# Tell everyone that they can check out again and continue working.
40
41
42If someone had a working copy the <small>CVS</small> commands will
43cease to work for him, until he removes the directory
44that disappeared inside the repository.
45
46It is almost always better to move the files in the
47directory instead of moving the directory.  If you move the
48directory you are unlikely to be able to retrieve old
49releases correctly, since they probably depend on the
50name of the directories.
51
52This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
53