en:docs:cvs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
en:docs:cvs [2013/03/11 21:08] valeriusen:docs:cvs [2014/05/21 20:42] – external edit 127.0.0.1
Line 1: Line 1:
 +===== osFree (was for Netlabs) CVS/SVN readme =====
 +
 (c) Ulrich Moeller, November 12, 1999 (c) Ulrich Moeller, November 12, 1999
  
Line 48: Line 50:
 <code>CVSROOT=:pserver:guest@http://www.netlabs.org/netlabs.cvs/warpin</code> <code>CVSROOT=:pserver:guest@http://www.netlabs.org/netlabs.cvs/warpin</code>
  
-For the osFree” use:+For the "osFreeuse:
  
 <code>CVSROOT=:pserver:guest@http://www.netlabs.org/netlabs.cvs/osfree</code> <code>CVSROOT=:pserver:guest@http://www.netlabs.org/netlabs.cvs/osfree</code>
Line 66: Line 68:
 The following terms should be known when working with SVN (or even reading the documentation): The following terms should be known when working with SVN (or even reading the documentation):
  
-  * Repository” is the unit CVS uses for managing projects. For example, “xworkplace”, “warpin”, and “xwphelpers” are three repositories on the Netlabs CVS server. Repositories are mirrored locally in a subdirectory of your CVS root directory, if you followed the above setup.+  * "Repositoryis the unit CVS uses for managing projects. For example, “xworkplace”, “warpin”, and “xwphelpers” are three repositories on the Netlabs CVS server. Repositories are mirrored locally in a subdirectory of your CVS root directory, if you followed the above setup.
   * Repositories are usually equivalent to projects. However, repositories are just a directory on the server and can be created in any way. For example, we created the “xwphelpers” repository for code that is shared between XWorkplace and WarpIN.   * Repositories are usually equivalent to projects. However, repositories are just a directory on the server and can be created in any way. For example, we created the “xwphelpers” repository for code that is shared between XWorkplace and WarpIN.
-  * Checkout: “Checking out” code means that you retrieve (or update) a local copy of files in a repository. You can check out an entire repository or single files from it.</div>+  * "Checkout": “Checking out” code means that you retrieve (or update) a local copy of files in a repository. You can check out an entire repository or single files from it.</div>
   * To check out code, use the “cvs checkout” command. Details follow in the next section.   * To check out code, use the “cvs checkout” command. Details follow in the next section.
-  * Commit: If you have write access to the CVS server (which requires that you have been given a user name and password by the Netlabs admin, Adrian Gschwend), you can change the repository by “committing” your local copy back onto the server. Once the code has been committed, all other developers can check it out again and will have the updates.</div>+  * "Commit": If you have write access to the CVS server (which requires that you have been given a user name and password by the Netlabs admin, Adrian Gschwend), you can change the repository by “committing” your local copy back onto the server. Once the code has been committed, all other developers can check it out again and will have the updates.</div>
   * To commit code to the server, use the “cvs commit” command. See the CVS reference for details. Again, this requires that you have been granted write access by the server administrator.   * To commit code to the server, use the “cvs commit” command. See the CVS reference for details. Again, this requires that you have been granted write access by the server administrator.
   * Usually, with most projects, only a limited number of people have write access to the server, for obvious reasons. But this is a “project policy” issue and not a CVS restriction.   * Usually, with most projects, only a limited number of people have write access to the server, for obvious reasons. But this is a “project policy” issue and not a CVS restriction.
-  * Merge: This can happen if you have checked out your local copy of a repository already and do another “checkout” later.+  * "Merge": This can happen if you have checked out your local copy of a repository already and do another “checkout” later.
  
 If SVN then finds that a file has been changed on the server and your local copy needs to be updated, it “merges” all changes into the local copy. That is, it does not simply overwrite the local copy with the new version on the server, but will compare (diff) the two files and patch the local copy! As a result, you will not lose changes you made to your local copy when you check out updates. If SVN then finds that a file has been changed on the server and your local copy needs to be updated, it “merges” all changes into the local copy. That is, it does not simply overwrite the local copy with the new version on the server, but will compare (diff) the two files and patch the local copy! As a result, you will not lose changes you made to your local copy when you check out updates.
Line 81: Line 83:
 This happens automatically if you do “cvs checkout” after your initial checkout. Note that you can also use “cvs update”; the difference is that “update” will not retrieve new files, but only update existing local files. See the CVS reference for details. This happens automatically if you do “cvs checkout” after your initial checkout. Note that you can also use “cvs update”; the difference is that “update” will not retrieve new files, but only update existing local files. See the CVS reference for details.
  
-  * Conflicts: This happens if CVS cannot successfully merge changes into your local copy. Most frequently, this occurs when two developers have modified the same lines in the same source file. Of course, CVS cannot resolve these conflicts by itself, so it will put two versions into the file marked with special characters. (With C files, this will cause compilation to fail, which is intentional so that you have to manually resolve the conflict.)+  * "Conflicts": This happens if CVS cannot successfully merge changes into your local copy. Most frequently, this occurs when two developers have modified the same lines in the same source file. Of course, CVS cannot resolve these conflicts by itself, so it will put two versions into the file marked with special characters. (With C files, this will cause compilation to fail, which is intentional so that you have to manually resolve the conflict.)
  
 <code>    See the CVS reference for details. </code> <code>    See the CVS reference for details. </code>
Line 87: Line 89:
 ==== CHECKING OUT THE CODE ==== ==== CHECKING OUT THE CODE ====
  
-Change to the osFree root directory (e.g. F:\cvs\osFree) set the osFree environment as described above (HOME, USER, CVSROOT), and log on if you haven't logged on yet.+Change to the osFree root directory (e.g. "F:\cvs\osFree") set the osFree environment as described above (HOME, USER, CVSROOT), and log on if you haven't logged on yet.
  
-The command for getting source from the server is cvs checkout. With checkout, you need to specify the module to check out. For the purpose of this explanation, we will consider a module” a directory name. Note that CVS normally operates on directories recursively! So if you use+The command for getting source from the server is "cvs checkout". With checkout, you need to specify the module to check out. For the purpose of this explanation, we will consider a "modulea directory name. Note that CVS normally operates on directories recursively! So if you use
  
 cvs checkout . cvs checkout .
Line 95: Line 97:
 (mind the dot) from the XWorkplace root directory, this will retrieve the entire code tree and create new local files if they don't exist yet. This can take a while for bigger projects. Again, use maximum compression (see section 3). (mind the dot) from the XWorkplace root directory, this will retrieve the entire code tree and create new local files if they don't exist yet. This can take a while for bigger projects. Again, use maximum compression (see section 3).
  
-cvs checkout” allows you to specify file masks as well. For example, if you type+"cvs checkoutallows you to specify file masks as well. For example, if you type
  
 cvs checkout src/shared/*.c cvs checkout src/shared/*.c
Line 101: Line 103:
 only those files are checked out. Mind the forward slashes. only those files are checked out. Mind the forward slashes.
  
-By contrast, cvs update” only updates local files which have been changed on the server. It does not create new files. Since I frequently create new files on the server, using checkout” will probably be the better general choice.+By contrast, "cvs updateonly updates local files which have been changed on the server. It does not create new files. Since I frequently create new files on the server, using "checkoutwill probably be the better general choice.
  
-You will see that CVS puts out lots of information about the files that were worked on. A typical CVS output from update” or “checkout” looks like this:+You will see that CVS puts out lots of information about the files that were worked on. A typical CVS output from "updateor “checkout” looks like this:
  
 <code>? doc/progref.ipf <code>? doc/progref.ipf
Line 111: Line 113:
 M src/classes/xcenter.c</code> M src/classes/xcenter.c</code>
  
-I strongly recommend redirecting standard output when using cvs update” or checkout” so you know what CVS has done, since these lines scroll of the screen very quickly. You can simply use cvs checkout . > checkout.log. An even better choice is tee, another GNU program, which prints the output to the screen and logs it in a file at the same time.+I strongly recommend redirecting standard output when using "cvs updateor "checkoutso you know what CVS has done, since these lines scroll of the screen very quickly. You can simply use "cvs checkout . > checkout.log". An even better choice is "tee", another GNU program, which prints the output to the screen and logs it in a file at the same time.
  
 In each such line, the first letter tells you what CVS has done to the file: In each such line, the first letter tells you what CVS has done to the file:
  
-?: CVS does not know the file. It is in your local tree, but not in the repository. This happens if you have added files to your local copy yourself. +|?: |CVS does not know the file. It is in your local tree, but not in the repository. This happens if you have added files to your local copy yourself. | 
- +|U: |This is the most frequent one. It means that CVS has “U”pdated a local file with a new copy from the server and occurs during “checkout” or “update”. | 
-U: This is the most frequent one. It means that CVS has “U”pdated a local file with a new copy from the server and occurs during “checkout” or “update”. +|P: |Similar to "U", except that the server has only sent a **P**atch instead of the entire file. The result isn't any different from "U"; the file has been updated. | 
- +|M: |This means that your local file was **M**odified before the update. You get this no matter if the file was updated (i.e. changes were merged successfully) or not. | 
-P: Similar to U, except that the server has only sent a Patch instead of the entire file. The result isn't any different from U; the file has been updated. +|C: |This happens if merge failed and a **C**onflict occured. You need to manually edit all files which have been marked with "C"; if they are C source files, they will no longer compile. | 
- +|R: |A local file has been removed because it is no longer in the repository (i.e. has been removed by someone with write access). |
-M: This means that your local file was Modified before the update. You get this no matter if the file was updated (i.e. changes were merged successfully) or not. +
- +
-C: This happens if merge failed and a Conflict occured. You need to manually edit all files which have been marked with C; if they are C source files, they will no longer compile. +
- +
-R: A local file has been removed because it is no longer in the repository (i.e. has been removed by someone with write access). +
  
-=== Discussion ===+~~DISCUSSION~~