up previous next
Up: Introduction Previous: Creating a new CVS repository Next: Checking the module back in

Importing a module with WinCVS

Now that you have a local repository set up, the act of importing of a directory into CVS with WinCVS is reasonably straightforward (especially after you've done it several times!).

Importing a new directory into the CVS repository using WinCVS

To import an existing directory into the CVS repository as a new module, start WinCVS, then use it's GUI to navigate to the folder you want to import into your repository. In my case the directory I want to import into CVS is named "C:AlDDProjectsWinCVS-CreateAModule", so I navigate to that directory using WinCVS, then right-click the directory name, and choose the "Import module ..." option. (Note that this can also be done through the "Remote" menu and its "Import module ..." menu item.) This is shown in Figure 4.

Figure 4: The WinCVS Import Module dialog.
The WinCVS Import Module dialog

The Import Filter dialog

After selecting that menu item you'll see a dialog titled "Import filter", as shown in Figure 5. In my case everything I'm importing is a plain text file, so in the "Entry kind" column I change each file to the TEXT option. If you are importing any binary files - things like spreadsheets, Word documents, images, PDF documents, Java jar files - you'll want to make sure these files are imported as binary files. WinCVS is relatively smart and knows about a lot of file extensions, but if it has any questions about the type of one or more files you will see this dialog.

Figure 5: The WinCVS Import Filter dialog.
The WinCVS Import Filter dialog

The Import Settings dialog

Clicking OK on that dialog brings up the next dialog, titled "Import settings". The first tab on this dialog is titled "Import settings", which I've shown in Figure 6:

Figure 6: The WinCVS Import Settings dialog.
The WinCVS Import Settings dialog

On this dialog the CVSROOT option should be set to the CVSROOT you created during the "Creating a BNew Repository" portion of this tutorial. If not, type in the location of the repository here. For example, my repository is named "c:cvsroot".

The Import Options tab on the Import Settings dialog

Once again you can also click through the "Import options" and "Global" tabs, but I recommend not changing anything yet. One note on the "Import options" tab is that the "Local folder to import" should show the full path to the directory you are importing into the CVS repository. In my case it shows "C:AlDDProjectsWinCVS-CreateAModule", as you can see in Figure 7.

Figure 7: The Import Options tab of the Import Settings dialog.
The Import Options tab of the WinCVS Import Settings dialog

Clicking OK

With this configuration you should be able to click the OK button and have your directory imported into your CVS repository. If everything is successful you should see a message like this in the output pane on the bottom of your WinCVS client:

cvs -d c:\cvsroot import -I ! -I CVS -m "no message" -- WinCVS-CreateAModule avendor arelease (in directory C:\Al\DDProjects\WinCVS-CreateAModule\)
cvs import: cwd\texttt{C:\Al\DDProjects\WinCVS-CreateAModule ,current}C:\Al\DDProjects\WinCVS-CreateAModule
N WinCVS-CreateAModule/#CreateANewModule.tex#
N WinCVS-CreateAModule/CreateANewModule.tex
N WinCVS-CreateAModule/CreateANewModule.tex~

No conflicts created by this import

\textbf{*}\textbf{* CVS exited normally with code 0 }\textbf{*}*

If you see a message like this, congratulations, your directory contents are now stored in your CVS repository!

If you're really anxious - or just plain curious - you can verify that this worked by looking at the contents of your repository. If you'll remember, my repository is located in the directory "c:cvsroot", so if I look in there I should see a new directory with the name I just provided. Sure enough, if I use the Windows Explorer I can see this new repository, as shown in Figure 8.

Figure 8: A view of the repository from the Windows Explorer.
A view of the CVS repository from the Windows Explorer