In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the summary of common cvs commands under Linux". In the daily operation, I believe that many people have doubts about the problems of summarizing common cvs commands under Linux. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "common cvs commands under Linux". Next, please follow the editor to study!
1. Login:
$export CVSROOT=:pserver:username@the_server_name:/home/cvsroot
Note:pserver is the access method, if the server is set to password authentication, it is pserver.
Username is the user name of the CVS server, which can be modified according to your settings.
The_server_name is the name or IP address of the CVS server
/ home/cvsroot is the CVSROOT directory of your CVS server, make changes according to your CVS server settings or ask the administrator.
Log in to CVS server:
$cvs login
At this point, cvs will ask you for your password. Please type in your password on the CVS server:
Passwd:xxxxxxxx
two。 Submit the project-import
Cvs import [- options] repository vendortag releasetag...
Note: this command imports all files (including subdirectories) in the current directory into the source code repository.
Repository: the name of the project with which a repository will be created on the CVS server.
Vendortag: the total tag of the project branch. (not commonly used)
Releasetag: a tag that identifies the input hierarchy of a file. (start is commonly used)
When you use import to submit a project, CVS asks for a description of the project. By default, CVS pops up a text editor. Users can also use-m "log_message" to enter description information.
For example
$cvs import-m "upload the first time as new module" judecvs vs. 0,0,01 start
Tip: import is generally used when importing module for the first time. After modifying the file later, you can directly use the commit command to submit the modified file.
3. Export a project from CVS-- checkout
Cvs checkout [options] modules...
This command exports projects that already exist in the source code repository to the current directory.
Modules: project name
For example, the source file of the judecvs project is retrieved from the warehouse.
$cvs checkout judecvs
4.CVS main command-update updates files in the current working directory
Cvs update [- options] [files...]
This command compares the files in the specified CVS source code library with those in the current directory, and updates the files in the current directory if there is a later version of the source file in the CVS source code library. This command can only be used after the checkout command has been used.
When executing the update command, CVS does not simply overwrite the current file with the new version, but attempts to add changes made by the new version to the current file. If a conflict occurs, CVS uses the string "" to indicate that the conflict occurs. At this time, you can modify the file and resubmit it.
Tip: if you've already done checkout once, you don't need to re-checkout, just go to the directory of the cvstest project and update it:
For example:
$cd judecvs
$cvs update
5.CVS main command-status if you don't want to update directly, just want to see if there are any updates, then:
$cvs status
There is a status report for each file, like this:
=
File: client.c Status: Up-to-date
Working revision: 1.1.1.1 'Some Date'
Repository revision: 1.2 / home2/cvsroot/judecvs/client.c,v
The most important thing here is the Status column, where there may be four states:
Up-to-date: indicates that the file you are going to get is up to date.
Locally Modified: indicates that you have modified the file, but have not submitted it yet. Your version is newer than the one in the warehouse.
Needing Patch: indicates that someone has modified the file and submitted it! Your version is older than the one in the warehouse.
Needs Merge: indicate that you have modified the file, but someone else has also modified it and submitted it to the warehouse!
6.CVS main command-commit saves changes to CVS
Cvs commit [- lnR] [- m 'log_message' |-f file] [- r revision] [files...]
This command compares the source code in the current directory with the latest version in CVS and updates it.
[- m 'log_message']: enter the modification description.
[- r revision]: specify the version.
[files...]: specify the modification file.
$cvs commit-m "add XXX function" client.c
The system will prompt
CVS:-
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in.
CVS:
CVS: Modified Files:
CVS: client.c
CVS:-
After exiting, the system asks whether to continue, enter c, and checkin is completed
Log message unchanged or not specified
A) bort, c) ontinue, e) dit,!) reuse this message unchanged for remaining dirs
Action: (continue) c
Checking in client.c
/ home2/cvsroot/judecvs/client.c,v
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.