1 <sect1 id="ch04-checkfiles">
2 <title>Check all relevant files have been added and removed</title>
3 <?dbhtml filename="checkfiles.html" dir="chapter04"?>
5 <para>If you are adding files, you need to run a
6 <userinput>cvs add</userinput> command on each of them (something like
7 <userinput>cvs add chapter06/kernel*.xml</userinput> will work). A good
8 trick if you've only added files (not taken any away) is to run a
9 <userinput>cvs up</userinput> which will give an output something like
12 <para><screen>gerard:~/lfs-book$ cvs up
13 ? temp/thisfileneedstobeadded
14 cvs server: Updating .
15 cvs server: Updating appendixa
17 cvs server: Updating temp
19 R temp/thisfilehasbeendeleted
20 M temp/thisfilehasbeenmodified
21 U temp/thisfilehasbeenupdatedfromtheserver
22 RCS file: /home/cvsroot/LFS/BOOK/temp/thisfilehasconflicts,v
23 retrieving revision 1.1
24 retrieving revision 1.2
25 Merging differences between 1.1 and 1.2 into thisfilehasconflicts
26 rcsmerge: warning: conflicts during merge
27 cvs server: conflicts found in temp/thisfilehasconflicts
28 C temp/thisfilehasconflicts
29 RCS file: /home/cvsroot/LFS/BOOK/temp/thisfilehashadchangesmergedin,v
30 retrieving revision 1.1
31 retrieving revision 1.2
32 Merging differences between 1.1 and 1.2 into
33 thisfilehashadchangesmergedin
34 M temp/thisfilehashadchangesmergedin
35 cvs server: Updating template</screen></para>
37 <para>([snip]'s were added by me, not the server). If you look at the first
38 column, you will see various different letters which all mean different
41 <para><userinput>?</userinput>: This is what CVS reports when it doesn't
42 know what to do with a file. Generally it means that you've forgotten
43 to <userinput>cvs add</userinput> a file to the repository but can also
44 just be temporary editor files which CVS doesn't know what to do with.
45 If it's just temporary files, don't worry, it won't try and commit them
46 when you do a <userinput>cvs ci</userinput> because you haven't added
47 them. Instead it'll just leave them alone.</para>
49 <para><userinput>A</userinput>: This is a file which has been added to
50 CVS using <userinput>cvs add</userinput> but has not yet been committed.
51 When you're ready to commit it, simply do a
52 <userinput>cvs ci</userinput> on it (and don't forget that nearly all cvs
53 operations can be performed on as many files at once as you like; indeed,
54 if you specify no file, it'll either give you an error (if it doesn't make
55 sense; like with <userinput>cvs add</userinput> or
56 <userinput>delete</userinput>) or simply perform the action on all files
57 from that directory downwards in the tree; for example with
58 <userinput>cvs ci</userinput>).</para>
60 <para><userinput>R</userinput>: This is a file which has been removed
61 from CVS using <userinput>cvs delete</userinput> but has not yet been
62 committed. The equivalent of 'A' for added files.</para>
64 <para><userinput>M</userinput>: This is a file which has been modified
65 in your local repository and hasn't been checked in. If there have also
66 been changes in the remote copy, it means that CVS successfully merged
67 them. Even so, if (as in the file thisfilehashadchangesmergedin above)
68 changes have been automatically merged, you should look them over to
69 check that they make sense. Then, when you're ready, commit.</para>
71 <para><userinput>U</userinput>: This is a file which was unchanged
72 locally but changed remotely. The changes were successfully applied to
73 your local copy. You don't need to commit on this message as you
74 haven't made any local changes.</para>
76 <para><userinput>C</userinput>: This one can be a nasty one to resolve. It
77 means that you have made local changes but at the same time someone has made
78 remote changes which can't be automatically merged with yours. You will have
79 to go through the files (usually named with .'s and version numbers) and
80 sort the conflict out yourself. Due to the nature of the LFS book,
81 this doesn't happen very often. But if you make local changes and wait a
82 long time to commit them, somebody else may eventually edit that same file
83 and commit it before you do. When that happens, these conflicts
86 <para>Once you know why you're getting each symbol, and they're all
87 correct, you can proceed to the next step.</para>