Version management using CVS

xiaoxiao2021-03-06  42

Quick content index

1. Overview ............................................. ........1

2. Code warehouse .............................................. ..... 7

3. Start a project using CVS ........................................ 29

4. Rabi ....................................... 33

5. Branch and merge ........................................... .... 41

6. Recarsive Behavior ......................................... 49

7. Increase, delete, rename files and directories ................................. 51

8. Review the development history ........................................... ..57

9. Place binary files ........................................... 59

More than 10 developers work ...................................... 61

11 Dunk Version Management .....................................................

12 keyword replacement .......................................... ..73

13 Tracking third-party code ............................................. ..77

14 How do you interact with CVS ........................................ 81

15 special documents ............................................. ...... 83

16 appendix

1) CVS command orientation ........................................... ..... 85

2) CVS command Quick reference .......................................... 115

3) Management file reference book ....................................... 127

4) All environment variables affecting CVS .................................... 141

5) Compatibility between CVS version ...................................... 143

6) I have encountered problems ........................................ ..... 145

7) Credits ............................................. ..... 153

8) Always deal with CVS and this manual .................................. 155

table of Contents................................................. ........ 157

1 Introduction

This chapter writes from people who have never used CVS, perhaps never used any version control tools.

1.1 What is CVS?

CVS is a version control system that uses it you can record the history of your original code file.

For example, when the software is modified (* bugs is translated into a problem here), and you may not find these problems for a long time after doing this. Using CVS, you can easily review the old code version

It is found that these problems have been found. Sometimes it will be very helpful.

You may keep your code versions of your code, which may waste you a lot of code space. CVS uses one

Smart ways to save your multiple versions in a file. It only reserves the different contents of the version. in case

You are one of a group of members in a project, and CVS can help you. Unless you are particularly careful, you easily cover it.

The work of others. Some editors, such as GNUEMACS, try to determine if a file is modified simultaneously.

Unfortunately, this security method will no longer be effective if a person uses other editors. CVS use

Developers have solved this problem independently. Every developer's work is in his own directory, and

CVS will make merge work after completion of each developer.

CVS is created by Dick Grune as a branch of the shell script, October 1986, in its sixth distribution volume

When it was delivered to the newsgroup companies.soures.Unix. However, there is no code in the CVS conflict algorithm from this.

Scripts come in some scripts.

In March 1989, Brian Berlinor designed and wrote CVS code. Jett.polk helped Brian completed CVS in the future

Model design and commercial version support.

You can get CVS in different ways, including free download on the Internet. If you want to download CVS and other CVS

Article gives more information, please see:

http://www.cyxlic.com

http://www.loria.fr/~molli/cvs-index.html.

There is a mailing list called INFO-CVS is the content of CVS. Subscribe or cancel the subscription, please send an email

INFO-CVS-REQUEST@gnu.org

If you prefer the usenet news group, the discussion group of CVS is

Comp.software.confg.mgmt.

In the future, I will build one

Comp.software.confg.mgmt.cvs

News group,

But maybe this will be comp.software.confg.mgmt there after too much discussion.

You may want to subscribe to the Bug-CVS mailing list, which has more information in Appendix H [BUGS]. Subscribe it, please send email to

Bug-cvs-Reqnest@gnu.org.

1.2 CVS can't do

(Unrelated)

2

3 Start a project using CVS

=====================================================================================================================================================

If you change the file name and move them to another directory, you start a new item.

The first thing to do is to consider your document organization. Change file names or mobile files is not impossible, but increase

Understand the potential puzzle, and CVS is particularly sensitive to the directory of the name. See Section 7.4 [Mobile File].

(* Translator Note: The name and movement in UNIX are the same).

The next step is to do in the hands of the hand.

3.1 Creating a file

The first step is to establish a file in the warehouse. This can be done using a variety of different ways.

-------------------------------------------------- ------------------

3.1.1 Creating a directory tree

When you start using CVS, you may have several projects can be managed using CVS. In this case, the easiest way is to use: "import" command. An example is the most easily explained how to use it. Assume you

There are some files you want to put in CVS in "WDIR", and you want them to put them in the data warehouse:

"$ Cvsroot / yoyodyne / rdir"

You can use the following command:

$ CD WDIR

$ cvs inport -m "Inputed Sources" YOYODYNE / RDIR YOYO START

If you don't use the "-m" parameter to record a log information, CVS will call an editor (* Translator Note: Usually VI)

And prompt input information. "YOYO" string is the developer title, "start" is the issuance mark. They don't have any special

The meaning is just because CVS needs to be placed here.

See Chapter 13 [Track Code] to get more information.

You can now check if it is valid, then you can delete your original code catalog.

$ CD

$ mv Dir Dir.orig

$ cvs checkout yoyodyne / dir

$ DIFF -R Dir.orig Yoyodyne / DIR

$ rm -r dir.orig.

In order to avoid accidentally entering the original directory to edit files, deleting the original code is a good idea. Of course,

It is also wise to keep a backup to other places before you delete.

The "checkout" command can use the module name as a parameter (as previously all examples) or a road relative to $ cvsroot

The diameter, as described above. You should check if the permissions in the CVS directory are appropriate, and they should make them belong to a certain one.

Specific group. See 2.2.2. Section [File Permissions].

If you want some files of "Import", you can use some special methods to indicate if these files are

It is a binary file. See C.2 [Wrappers].

-------------------------------------------------- ----------------------------------

3.1.2 Establish a file from other version control systems

If you have any other version of the control system maintenance project, such as RCS, you may want to put these files in CVS,

And to retain the history of these files. Here are some discussions.

From RCS:

If you use RCS, find the RCS file ?? Usually a file called "foo.c" will have "RCS / FOO.c, V" RCS text

Part. (However, it is possible to see the RCS documentation in other places to get relevant information). If the file directory is not in CVS

At, create it in CVS. Then copy these files into the CVS repository catalog (the name in the warehouse must be tape

", V" original file; these files are placed directly in this directory in CVS, not in the "RCS" subdirectory). This is in CVS

A situation that is not much directly entering the CVS warehouse, and does not use the CVS command. Then you can put them

"Checkout" in a new directory.

When you move the RCS file in CVS, the RCS file should be in the state of unlocking, otherwise the CVS will come out when the mobile operation will be

Some problems are now.

From other version control tools

Many version control tools can output standard documents in the "RCS" format. If your version control tool can do this, output the RCS file directly, then follow the example above.

If your version tool can't output an RCS file, you must write a script file, take a version each time.

Then put it in the CVS. The "Sccsarcs" script mentioned below is a good example.

From SCCS:

A script file with a "sccsarcs" can do converting SCCS files into RCS files, this file is placed in CVS original code

The "Contrib" directory of the directory. note:

You must run it on a machine that simultaneously installs RCS and SCCS. And, just in the directory of "Contrib."

Other scripts are the same. (Your method may be a variation of multiple ends)

(* Translator Note: I didn't look at the CVS's Contrib Directory :-(, I don't know what this is what this is.

From PVCS:

There is a script called "pves-to-rcs" in "contrb" to convert PVCs to RCS files. You have to have at the same time

Run it on the PVCS and RCS machines.

Please see the comments in the script to get more details.

3.1.3 Create a directory tree from nothing

Building a new project, the easiest way is to create an empty directory tree as follows:

$ mkdir tc

$ MKDIR TC / MAN

$ MKDIR TC / TESTING

After that, you can "Import" (empty) directory to the warehouse.

$ CD TC

$ CVS IMPORT -M "Created Directory Structure" YOYODYNE / DIR YOYO

Start

Then, add a file (or directory) to the warehouse when a file is added. Check that the permissions in the $ cvsroot are correct.

-------------------------------------------------- -----------------------------------------

3.2 Defining Module

The next step is to define a module in the "MODUYES" file. This is not strict, but the module can easily relevant directories and files.

Associate. The following example can fully demonstrate how to define modules.

1. Get a copy of the module file.

$ cvs checkout cvsroot / modules

$ cd cvsroot

2.

Edit this file and write to the definition module. See Section 2.4 [Management File Introduction]. There is a brief introduction, see the C.1 section

[Module file]. There is a detailed description of it. You can define the module "TC" using the line below:

TC Yoyodyne / TC

3. Submit your changes to the warehouse

$ cvs commit -m "Added Tc Module." Modules

4. Release module file

$ CD

$ cvs release -d cvsroot

4

=======

5 branch and merger

==================

CVS allows you to independently out of a derived code to a separate development version - branch. When you change the text in a branch

These changes do not appear in the main development version and other branch versions.

After this later you can use the merger to move these changes from a branch to another (or the main development version). The merge involves using the "CVS Update -j" command to merge these changes to a working directory. You can confirm

(Commit) This version, and thus affects the copy of these changes to other branches.

-------------------------------------------------- ---------------------------------

5.1 When to create a branch

Assume that the TC.C release has been completed. You are continuing to develop TC.c, which is planned to issue a version of 1.1 after 2 months. Soon you

The customer starts complaining that the code is some problem, you check the release of 1.0 (see 4.4 [Telings]) and found this

An error (this will have a small correction). However, this current version is in an unstable state, and

One month can I hope to stabilize. This will have no way to issue a newest version to correct the problem.

At this time, you can create a branch based on this version tree version 1.0. You can modify the branch of this tree without affecting the trunk. when

When the revision is complete, you can choose whether to merge it with the trunk or continue to keep it in this branch.

-------------------------------------------------- ---------------------------------

5.2 Creating a branch

You can use "tag -b" to create a branch. For example, assuming that you are working in a working copy:

$ cvs tag -b Rel_1_0_patches

This will separate a branch based on the current copy and assign the name of "Rel_1_0_patches".

Knowing the branch is created in a CVS repository, not very important in the work copy. In the case

Sub, create a branch based on the current version does not automatically transfer the current work copy to a new branch. Desire

For details, please see 5.3 [Enter a branch]. You can also create a branch without referring to any working copy.

You can use the RTAG command:

CVS RTAG -B -R REL-1-0 REL-1-0-Patches TC.

"-R Rel-1-0" indicates that this branch is based on the version of the REL-1-0, which is not from the latest version.

Start branch. This is useful for branching from the old version (for example, when amending a past stable version)

When using the "tag" flag, this "-b" flag tells RTAG to create a branch (not the symbol of this version)

connection). Note that tag "Rel-1-0" may have a different version number for different files. Therefore, the result of this command

It is a new version of the branch named "Rel-1-0-Patches" to the TC module, which is based on tag "Rel-1-0"

Version tree.

-------------------------------------------------- ---------------------------------

5.3 Entering the branch

You can enter branches in two ways: re-checkout or from existing copies. Re-checkout

The checkout command is tested on the "-r" identifier, followed by the title of this branch (TAG) name. (See 5.2 [Create a branch]):

$ CVS Checkout -R Rel-1-0-Patches TC.

Or if you have a copy, you can use the "Update -r" command to transfer to this branch.

$ CVS Update -R Rel-1-0-Patches TC.

Or use another equivalent command: $ CD TC

$ cvs update -r Rel-1-0-Patches

This is valid for existing copies of the backbone code or other branches. The above command will turn it to life

Name branch. Similar to the "Update" command. "Update -R" merges any changes you have done, please note

Whether there is conflict.

One, your work copy has turned to a specific branch. It will remain in this branch, unless you

Other operations have been made. This means that the change from this job CHECKIN will be added to this branch's new version.

This, without affecting the backbone and other branch code.

Want to see which branch is based on which branch is based, you can use the "status" command. Find in their output

A "Sticky Tag" domain (see Section 4.9 ["Sticky Tag"], page 38). That is your current branch.

$ cvs status -v driver.c backend.c

============================================================================================================================================================================================================= ==================

File: driver.c status: up-to-Date

Version: 1.7 Sat Dec S 18:25:54 1992

RCS Version: 1.7 /u/cvsroot/yoyodyne/tc/driver.c ,v

Sticky Tag: Rel-1-0-Patches (Branch: 1.7.2)

Sticky Date: (NONE)

Stick Option: (NONE)

EXInship TAG:

Rel-1-0-Patches (BRANCK: 1.7.2)

Rel-1-0 (Revision: 1.7)

============================================================================================================================================================================================================= ==================

File: Backend.c Status: up-to-Date

Version: 1.4 Tue Dec 1 14:39:01

RCS Version: 1.4 / u / cvsroot / yoyodyne / tc / sticky tag: rel-1-0Patches (branch: 1.4.2)

Sticky Date: (NONE)

Sticky Option: (NONE)

EXInship TAG:

Rel-1-0-Patches (Branch: 1.4.2)

Rel-1-0 (Revision: 1.4)

Rel-0-4 (Revision: 1.4)

Please don't confuse because of the branch of each file ("1.7.2" and 1.4.2 ") and confused. Branch's Timers (TAG)

It is the same: "Rel-1-0-Patches", which files for these same devices are the same branch. In the above example, branch is built

Before, "Driver.c" has more changes than "backend.c", so their version number is different. See Section 5.4

[Branch and the backbone version] Go to understand the details of how the branch builds the principle.

-------------------------------------------------- ------------------------------------

5.4 branch and backbone

Usually, the backbone of a file is a growth line (see 4.1 [Dunk version] page):

--- ----- ---- --- -----

! 1.1! ----! 1.2! ----! 1.3! ----! 1.4! ----! 1.5!

--- ----- ---- --- -----

However, CVS is not limited to linear development. The backbone can be divided into different branches, each branch can

To be an independent self-maintenance development line. The changes in one branch can be easily transferred to the backbone.

Each branch has a branch, by a "." Separated decimal odd composition, the branch number

The main line version it is separated. Multiple branches are allowed to separate from a specific version.

All branch versions are dependent on its original separation version number. The following example will show this.

------------

1.2.2.3.2 Branch -> -! 1.2.2.3.2.1!

! -------------

!

------- ------ ---------

1.2.2 Branch -> -! 1.2.2.1! ----! 1.2.2.2! ----! 1.2.2.2!

! --------- ------- -------

!

!

--- ----- ---- --- -----

! 1.1! ----! 1.2! ----! 1.3! ----! 1.4! ----! 1.5! <- Carne ----- ---- - - ---- ----- -----

!

!

! --------- ------- -------

1.2.4 Branch -> -! 1.2.4.1! ----! 1.2.4.2! ----! 1.2.4.2!

------- ------ ---------

How do you create a specific branch number is usually not what you need to consider, but talk about how it works.

When CVS establishes a branch number, it first get the first unused even number, the number started is 2, for example you

When creating a branch from 6.4, the branch number is 6.4.2 Number of all branch numbers is 0 for CVS.

Department, (for example, 6.4.0). (See Section 5.5 [Internal Subject No. 44) Branch 1.1.1 has special meaning, please see 13 chapters

[Track Code].

-------------------------------------------------- ---------------------------------

5.5 internal branch number

This section describes the internal branch of CVS (* Translator Note: Magic Branch translated into internal branch)

characteristic. In most cases, you don't have to consider internal branch numbers, CVS will manage you for you. However,

Some specific conditions, it will appear, so it will be useful to understand how it will work. General, branch number

The code will be composed of odd "." Separated decimal integers. Please see 4.1 [version number]. However, it is not entirely this

Sample, due to efficiency, CVS is sometimes inserted into an additional "0" on the second position of the right end (1.2.4

It turned from 1.2.0.4, 8.9.10.11.1 to 8.9.10.11.0.12, etc.).

CVS will be well carried out behind these transformations, but in some places, this hidden is not complete:

* The internal branch number will appear in the CVS log (LOG) file.

* You cannot use the symbolic branch name for "CVS Admin".

You can use the admin command to reassign a symbolic name of a RCS hope for a branch. in case

R4patches is a file "NumBers.c" assigned to branch 1.4.2 (internal part numbers 1.4.0.2).

Name, you can use the following command:

$ cvs admin -nr4patches: 1.4.2 numbers.c

It will only be valid when you have submitted to this branch at at least one version. Please be very careful not to put a standard

The note (tag) is assigned to a wrong identification number (now I don't see how the deadline yesterday is allocated).

-------------------------------------------------- --------------------------------

5.6 merge a whole branch

You can merge a branch to your work directory in the "-j branch number" in the "UPDATE" command. Make

Use the "-j branch number" to combine this derived branch point and the latest version of the latest version of the latest version to your work directory

"-J" means "join".

Let's examine the tree below:

--- ----- ----- ---

! 1.1! ----! 1.2! ----! 1.3! ----! 1.4! <-

--- ----- ----- ---

!

!

! --------- -------

R1FIX branch -> -! 1.2.2.1! ----! 1.2.2.2!

------- ---------

Branch 1.2.2 Assign a RiFix name. The following example assumes that the module "MOD" only contains a file "M.c"

$ CVS Checkout MOD # get the latest version 1.4

$ CVS Update -j R1Fix M.c # merges all changes in the branch, namely: 1.2 and 1.2.2.2

# Change between this file to this document

record.

$ cvs commit -m "incruded R1fix # established version 1.5

A conflict may occur when merging, if this happens, you can solve it before submitting a new version. please

See Section 10.3 [Conflict].

If your original file contains keywords (see Chapter 12 [Keyword Replacement]). You may get more strict

Conflict more conflict information. See Section 5.10 [Mergers and Keywords] to learn how to avoid this problem.

The "checkout" command also supports the use of "-j" parameters. The following example has a phase effect on the examples used above.

$ CVS Checkout -j R1FIX MOD.

$ cvs commit -m "incruded r1fix"

-------------------------------------------------- -------------------------------

5.7 Multiple merges from a branch.

Continue us above the example. Now this tree looks like this:

--- ----- ---- --- -----

! 1.1! ----! 1.2! ----! 1.3! ----! 1.4! ----! 1.5! <-

--- ----- ---- --- -----

! *

! *

! --------- -------

R1FIX branch -> -! 1.2.2.1! ----! 1.2.2.2!

------- ---------

As discussed above, the "*" of the branch 1.2.2.2 indicates the merger from the Rifix branch to the backbone.

Now let's continue to develop Rifix branches:

---- ----- --- -- ----- ! 1.1! ----! 1.2! ----! 1.3! ----! 1.4! ----! 1.5! <- the trunk

--- ----- ---- --- -----

! *

! *

! --------- ------- -------

R1FIX branch -> -! 1.2.2.1! ----! 1.2.2.2! ----! 1.2.2.3!

------- ------ ---------

Then you may want to merge new changes to the backbone. If you still use "CVS Update -j Fifix M.c"

CVS will try to merge something you have already incorporated, which can write something that does not want to happen.

Therefore, you must express it clear that you want to mean only the content that has not been merged. This needs two

"-J" parameter. CVS combines from the first "-j" version to the second "-j" version of the "-j" version. For example, on us

Example:

CVS Update -J 1.2.2.2 -J R1Fix M.c

If the problem occurs, you need to manually specify the version number of 1.2.2.2, a better way to use:

CVS Update -j R1Fix: Yesterday -j R1Fix M.c

However, a better way is to re-put a lameter to the Rifix branch after each merger, then use the standard

Merge after doing:

CVS update -j merge_from_rifix_to_trunk -j r1fix m.c

-------------------------------------------------- --------------------------------

5.8 Unlike two arbitrary versions

Use two "-j" signs, this Update (and Checkout) command can merge two any different versions

Go to your work directory.

$ CVS Update -J 1.3 Backend.c

The 1.5 version will be restored to version 1.3, so it is necessary to pay attention to the order of the version.

If you use this option when you operate multiple files, you must understand between different files, version

Numbers may be completely different. You have to use the deduction (TAG) instead of using the version number to complete multiple files

Operation. Use two "-j" operations can also resume addressed or deleted files. For example, assume you have one

The file called "File1" is in version 1.1, then you remove it in version 1.2, how to operate below:

$ cvs update -j 1.2 -j 1.1 file1

File1

$ cvs commit -m test

CHECKING IN FILE1;

/ TMP / CVS-Sanity / CVSROOT / FIRST-DIR / FILE1 FILE1, V

New Revision: 1.3; Previous Revision: 1.2 DONE

$

-------------------------------------------------- ----------------------------------

5.9 Merging and Remove Files

If you change the change in merge involving adding or deleting some files, "Update -j" will reflect these changes.

E.g:

CVS Update -a

Touch A B C

CVS ADD A B C; CVS CI -M "Added" A B

CVS tag -b branchtag

CVS Update -R Branchtag

Touch D; CVS Add D

RM A; CVS RM A

CVS CI -M "Added D, Removed A"

CVS Update -a

CVS Update -j Branchtag

After these commands (Note To commit), the file 'a' will be deleted, and the file 'd' will be added to the trunk.

-------------------------------------------------- -----------------------------------

5.10 merges and keywords

If you mean the files contains keywords (see Chapter 12 [Keywords], 73 pages), you will usually be

Numerous conflict reports were obtained when merging, as they were very different in different versions.

Therefore, you often need to use "-kk" when you merge (see Section 12.4 [Alternate Mode], page 75) selection. use

Keyword name, not to extend the value of the keyword, this feature selects to ensure that the merged version

Same, avoid conflicts.

For example: Suppose you have a file as follows:

-------

BR1 -> -! 1.1.2.1!

! ---------

!

!

--- -----

! 1.1! ----! 1.2!

--- -----

And your current work directory copy is the main (1.2 version). So a combination of the following will result

Conflict results. Please see example:

$ Cat File1

Key $ Revision: 1.3 $

...

$ CVS Update -J BR1

U file1

RCS file: / cvsroot / first-dir / file1, v

Retrieving Revision 1.1

Retrieving Revision 1.1.2.1

Meging Differences Between 1.1 and 1.1.2.1 Into file1

Rscmerge: Warning: conflicits during merge

$ Cat File1

$ <<<<<< File1

Key $ Revision: 1.3 $

=======

Key $ RERISION: 1.1.2.1 $

$ >>>>>>> 1.1.2.1

...

The conflict occurs when trying to merge 1.1 and 1.1.2.1 into your working directory. Therefore, when this

Key words from "Revision: 1.1" to "Revision: 1.1.2.1", CVS will try to merge this change to

Your working directory, this has a conflict with changes in your directory "Revision: 1.2". The following is used: "- kk" example:

$ Cat File1

Key $ Revision: 1.3 $

...

$ CVS Update -kk -j BR1

V file1

RCS file: / cvsroot / first-dir / file1, v

Retrieving Revision 1.1

Retrieving Revision 1.1.2.1

Merging Difference Between 1.1 and 1.1.2.1 Into file1

$ Cat File1

Key $ Revision: 1.3 $

...

This version "1.1" and "1.1.2.1" are expanded into simple "revision", so it will not

Conflict.

However, using the "-kk" parameter is also a major problem. That is, it uses the custom of CVS usually used.

Key word extension mode. In special cases, if the mode uses "-kb" for binary files

parameter. This will have a problem. So if you include binary files in your database, you will

These issues must be handled manually without using "-kk".

More than 10 developers work at the same time

---------------------

Conflicts often occur when multiple developers participate in a project at the same time. The general situation often occurs is two people think

When editing a file at the same time. One of its solution is that the file lock or uses the reserved Checkout, this

Method allows a file to allow only one editor at a time. This is the only solution for some version control systems, including

RCS and SCCS. Now in CVS usually uses retention checkout to use "cvs admin-1" command (see A-6-1AB)

[admin selection]). The following will explain that this is not a good intelligent solution, when it is a lot of people like to use

a method. The following will also describe the use of appropriate methods to avoid two people to edit a file, not the software.

The way is forced to achieve this.

The default method in CVS is "unreserved checkout" - non-reserved export. Under this method, developers

You can edit a file at the same time in their work. There is no automatic method of the first submission work, you can know

Another person is editing the file. Another person may get an error message at an attempt to submit. They must use CVS commands

Keep their work to copy the content of the warehouse. This operation is automatic.

CVS can support a variety of different communication mechanisms in Facilitate, not forced to comply with certain rules, such as "Rensed

Checkouts ". The following section describes how these different ways work, and choose a variety of ways involved

Some problems.

10.1 file status

Based on your operations used by your exported files, and these documents have been used in the warehouse, we can

Divide a file into several states. This status can be obtained by the "status" command, they are:

Up-to-date:

For this branch being used, the file is consistent with the final version in the warehouse.

Locally modified:

You modified the file, but there is no "commit".

Locally Added:

Use the "add" command to add files, but no "commit" locally remoded:

You use the "remove" command, but there is no "commit"

Needs Checkout:

Others submitted an updated version. The name of this state is somewhat misleading, you should use "Update" instead of

"Checkout" is updated new version.

Needs patch:

Like "Needs Checkout", the CVS service will only give the Patch (patch) file, not the entire file. and

The effect of giving PATCH and gives the entire file is the same.

Needs Merge:

Some people have submitted an updated version, but you have modified these files.

File Had Conflicts on Merge:

This is a conflict information that is just a "locally modified" image, just the "Update" command. If you have not yet

Resolve conflicts, then you need to solve this problem, to solve the conflict method to see 10.3 [Conflict examples].

Unkown:

CVS does not know the situation about this file. For example, you created a new file without using the "add" command

In order to help make the status of the document, "Status" also reports the work version (Working

Vevision, this is which version of this file is coming, and also reports "Warehouse Version" (Repository "

Vevision. This is the final version of this version of this file in the warehouse.

The selection item of the "status" command is in Appendix B [Invoking CVS]. About "sticky tag" and "sticky

Date "Output content, see 4.9 [Sticky Tags]. See" -k "selection for" Sticky Options "output content,

A.16.1 Section [UPDATE Selection].

You should let the "Update" and "status" commands come together. You use "Update" to make your file update to the most

New status, you use the "status" command to get the "update" command will do what will do. (Of course, the state in the warehouse will be

Can change before you run Update). In fact, if you want to use a command to get the official shape than using "status"

Information information, you can use:

$ cvs -n -q -update

Here "-n" selection means that it is not really executing Update, and only the status is displayed; "- Q" selection means that it does not print each directory

first name. See Appendix B [Use CVS] for more accommodation on the "Update" command.

10.2 Make a file to the most

When you want to update or merge one, use the update command. For a file that is not the latest version, this command is slightly

With the "checkout" command: The latest version is proposed in the warehouse and placed in the working directory. When you use the "Update" command, the file you modified will not be damaged in any case. If there is nothing in the warehouse

The new version, "Update" doesn't have any impact. When you edit a file, there is a new version in the warehouse, that

"Update" will merge all changes to your work directory.

For example, imagine a file you export a 1.4 version of the file and start editing it, someone else is submitted 1.5 edition at a certain time.

After submitting 1.6 version, if you run the update command, CVS will put a change between the 1.4 version of the 1.6 version in your file.

If you change between 1.4 and 1.6 editions too close to your change, then "overlink" conflict

It happened. In this case, a warning message will be output, and then the result is retained in the file contains two editions with conflict code.

This is separated by a particular symbol. See A.16 [Update], you can get a complete description of the "Update" command.

转载请注明原文地址:https://www.9cbs.com/read-53633.html

New Post(0)