Perforce Use guide _forp4v

Source: Internet
Author: User
Tags perforce

Perforce Use guide _forp4v


Preface to the first chapter



Perforcescmsystem is a software configuration management tool built on a scalable client/server architecture. With TCP/IP only, developers can access perforce servers through a variety of perforce clients (the GUI, WEB, or command line of several platforms). Perforce can be quickly and easily deployed, even for large or distributed sites, requiring minimal management. Perforce can be used in more than 50 operating systems, including versioning, workspace management, change processing, and a powerful branching model. The p4v described here is a perforce client that can be used across platforms.


1.1.Perforce structure




Chapter II Introduction to the use of perforce


2.1 Client Configuration

2.1.1 Server connection

Get P4V command

Copy the p4v-2010.2.317255 folder to/usr/local/.

Add/usr/local/p4v-2010.2.317255/bin/to the PATH variable

Login Perforce

The terminal loses the person p4v&

The dialog box appears as follows:

Enter your username in the user column



Click on the lower right corner of the OK button, the Password dialog box appears:

Fill in your password








Click OK, and then enter the PERFORCEP4V environment



2.1.2 Client Primary Workspaces







The image above shows the main interface of the perforce, most of which are done under the interface. The interface is divided into three regions:

Area 1: Displays the contents of deport and workspace, called the directory area.

Area 2: Lists some of the operation properties of the file, called the operation area.

Area 3: Give a hint of what is being done, called the information area.


2.1.3.1 Directory Area


The directory area consists of the Depot directory area and the workspace directory area.

1.Depot Directory Area

Shows the visible directory structure on the server (user rights settings are different, visible directories are also different), which is also associated with Workspaceview

The shooting file path is related, and you can specify the display file path. Here, the actions that can be performed include check Out,submit,

Getlatest Revision, Revert files and other operations.





















2Workspace Directory Area



Shows the directory structure of the local workspace that maps to the files on the server, which is also related to Workspaceview.

Operation Ibid.


2.1.3.1 Operation Area



The contents of the operation area consist mainly of several working areas as follows.

1.Pending changelists Work Area

This shows the files that the current user is modifying and the files that other developers are modifying.

Of course, you just need to care about your own project. When you perform an operation such as Markfor Add,checkout, the information is displayed in the Changlist list, and the status is displayed by a different icon. If you have completed the modification, you can submit the update file by executing submit, but you may also perform the revert waiver.


2.Submitted changelists Work Area

Shows the actions that all project team members have made to the project recently.

It can be obtained such as: changlist number, modification time, modify the contents of the document, modify the reason and modify the person and other information.





3.Workspace Work Area

In this workspace, you can display all client workspaces that are connected to the server.

In this workspace, you can perform actions such as creating, editing, modifying, and deleting User workspaces. (Provided there is permission to execute.) )




4.History Work Area

View the change history information for the specified file.




5.Labels Work Area

View all the current label numbers.

In this workspace, you can complete the creation of the label, modify the contents, and so on. (Provided that you have permission to perform this action.) )




6.Branchs Work Area

View all current branch numbers.

Complete branch creation, modification, deletion, etc. in this workspace. (Provided that you have permission to perform this action.) )



In addition to the several working areas described above, there are files, Users, jobs, details, and Fildfiles workspaces. Including the above six kinds.


2.1.3.3. Information area

Consists of a window (panewindows).

Panewindows

This is a very useful window, called the message window area, the bottom of the window is. Any information about your actions will


appear here, including success,warning, error and other information. In particular, after a failure to perform an operation, the information here is closed


Important. Under normal circumstances, can be based on the information here to deal with some unexpected or irregular operation.

Daily operation of 2.2. Perforce

2.2.1. Add folders and files

1. In Workspace Select the folder/file you want to add right click, choose "Markfor Add", add the file.


The Add file behavior is displayed in the Pendingchangelists workspace. When folders and files are added to the workspace, the icon has a red plus sign indicating that the additional folders and files are only present in the client's workspace and have not been submitted to the service

In the warehouse on the service unit. So, right click on the folder or file you want to submit, select Submit, after submission, the file is actually submitted to the warehouse on the server.


Perforce Use guide _forp4v



2. Submit (Submit) Add files/folders

In the process of submit, it is important to write down the description of the change. Description of the details of the information will greatly facilitate the file

of queries and traces. and describe the type of action in English at the beginning of the description. to add; modify

Modify, build to represent compilation, and so on.




When you click Submit, you can see that the red plus sign in front of the file has been removed and the version number of the file is already displayed in the reversion column. At this point, there is a green identification in the lower-right corner of the file, indicating that the file is currently displaying the latest version.



2.2.2. File modification

If you need to modify the file, first will need to modify the file checkout out to the local, before you can make changes.

1. Right-click the file you want to modify, select Checkout command.




At this point the file is checkout out of the top left there is a red hook flag, indicating that the file has been successfully checkout you out. If there is a blue hook mark on the top right of the file, the file has been checkout by someone else. Because Perforce supports parallel operations, you can still modify the files that others have checkout again checkout to your native.




2. Double hit Open already checkout out of the file, modify it.

After the modification, right click on the file, select Submit, write down the description of the change list.




3. Click Submit, file submitted to the server, added a new version.

Here is a reminder that if a file is checkout out and no changes have been made, please do not

Submit operation, but click the right button to select Revertif unchanged, so that after the submission will not increase the number of versions of the file,


Otherwise, the server will add a version of a file that does not make any changes.

It is recommended to think after each change: Why do these changes. If the changes made are meaningless, then it is recommended that you do not

This file is submitted (submit), but revert your modifications.


2.2.2.1. Merging files

Merge operations are primarily used to resolve conflicts arising from changes in the parallel development process.

For example, when more than one person needs to perform a checkout operation on the same file, perforce may complain when the file is being submit. Examples are as follows: There are a, B two people need to perform checkout operations on the CallKeep.cpp file at the same time.



At this point you can see that there are hooks in the upper-left and upper-right corners of the file CallKeep.cpp, indicating that the file is being executed by at least two people

Checkout operation. Because Perforce supports parallel operations, a and B do not conflict when performing checkout.

You may have an error when you submit the file. The first person to perform a submit operation does not have a problem, such as a can be submitted normally,

However, if the content of B modification conflicts with a modification, then B executes the submit times incorrectly and prompts the server to have the latest

Version (i.e. a just submitted version)




b after the latest version of the submission, still error.



And a question mark on the file, indicating that the server does not know what to do, because B needs to submit version content and a conflict, need


B to settle.


At this point, select the file, right click, select Resolve operation.




Perforce offers three automated solutions, namely "acceptmerged", "acceptyours" and "Accepttheirs". Of course, you can also see where the conflict with other people where, to resolve the conflict manually. Click Runmerge Tool to display the interface shown in the following figure.





Zone 1: Displays the contents of a submitted version, the latest version on the current server.

Area 2: Displays A and b at the same time checkout file CallKeep.cpp, then the latest version of the server on the content, that is, a, B modified base version.

Area 3: Shows the contents of the file that B has modified itself.

Area 4: Shows three versions of all conflict places,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.