Next: , Previous: Starting a new project, Up: Basic Use


Adding files to a project

When you create working files, say main.c and doc/foobar.1, you can add them to the version of P1 you are creating by editing the Files entry of P1.prj to look like this:

     (Files
       (main.c ())
       (doc/foobar.1 ())
     )

The Files list identifies the names of the files as they appear relative to the working directory in which you start. The empty lists after each name contain information indicating where these files came from in the repository; since these are new files, the lists are empty to indicate that your files did not come from the repository, but are new. The information in these lists has a format internal to prcs, and you need not worry about it. Even though the project descriptor P1.prj itself is not explicitly listed in the Files list, it is implicitly considered one of the files in the project.

When you have many files to add to the Files list—as for example when you have an existing directory structure full of files that you wish to bring under version control—it is inconvenient to do so by hand. Prcs can add them for you automatically with the command

     % prcs populate P1

which finds all files in the current directory and its subdirectories and adds them to the Files list in P1.prj. At this point, you can edit P1.prj to remove files that you don't want to save (e.g., compiled object files or backup files).