Sunday, 7 November 2010

Getting Started with Eclipse and P4Eclipse

How do I set up Eclipse and Perforce workspaces on Windows, Linux, or Mac OS X operating systems?

Prior to downloading P4Eclipse, please check the latest release notes for platform and Eclipse version compatibility. You can find the release notes for the latest P4Eclipse here:

http://www.perforce.com/perforce/doc.current/user/p4eclipsenotes.txt

This article is divided into the following sections for your convenience:

1. Install Eclipse (if you do not have an existing instance of Eclipse)

Download the latest Eclipse version that is supported by P4Eclipse from: http://www.eclipse.orgUncompress the distribution and install. For example, on Linux, run: $ tar -zxvf eclipse-rcp-ganymede-SR1-linux-gtk-x86_64.tar.gz$ cd eclipse$ ./eclipse

Important: Your Eclipse workspace must be different than your Perforce workspace.

You want the files in your Eclipse projects to be under Perforce control, but you do not want the Eclipse metadata to fall under Perforce control, because it is particular to that installation of Eclipse. Therefore, Eclipse project files must NOT be under the Perforce client root.

Please see KB article #1048: Eclipse vs. Perforce Workspaces for a more detailed explanation.

2. Install the Perforce plug-in

The following instructions apply to Eclipse 3.5/3.6:

Uninstall any older versions of P4Eclipse/P4WSAD that might have been installed previously. Please see KB article #1049: Uninstalling the P4Eclipse Plug-In for more detailed instructions. Choose: Help | Install New Software in Eclipse. In the Available Software dialog, click Add... to add a new site. In the pop-up dialog, copy and paste the following URL into the Location box: http://www.perforce.com/downloads/http/p4-eclipse/install/3.5http://www.perforce.com/downloads/http/p4-eclipse/install/3.6Check the box for P4Eclipse and then click Next....

Note: If there is more than one version of Perforce in the list, select the latest one.

Complete the setup by selecting P4Eclipse and clicking Finish. When prompted, restart Eclipse.

Please see the Release Notes for more detailed installation instructions. See the Release Notes for P4WSAD 2009.2 for installation instructions for Websphere Studio and other versions of Eclipse.

3. Configure the Perforce plug-in

Mac Users: Please note that your Preferences window is found under Eclipse | Preferences, rather than the Window menu.

After restarting, verify that the Eclipse workspace is not the same as your Perforce workspace, and is not under the control of Perforce. If you are not prompted, choose: File | Switch Workspace | Other

Open a Perforce perspective by choosing: Window | Open Perspective | Other... | Perforce | OK

P4WSAD/P4Eclipse 2009.1 and later

You will see a "No servers are currently defined..." message under the P4 Connections tab. Create a ?New Connection? by clicking on the green plus icon ().

The Add a New Perforce Server Connection form is displayed.

In the Location section, fill in the fields for the "Host", "Port number", and "Charset" (if you have a Unicode server running).  In the Authentication section, fill in the "User", and "Password" fields. Click Next>.

The Choose a Perforce Client Workspace form is displayed.

Either choose an existing client workspace for your user ID from the list box, or create a new client workspace by entering the name of the client in the Workspace name field and the client root in the Location field. Click Finish>.

The P4 Connections pane shows a list of depots available to you in your Perforce server.

P4WSAD 2008.2

You will see a "No servers are currently defined..." message under the P4 Depots tab. Create a ?New Connection? by clicking on the green plus icon (), and filling in the values for the "Port", "User", and "Client Workspace" (and "Charset" if you have a Unicode server running).

Note: You cannot create a Perforce client workspace with the P4WSAD plug-in, so the client must already exist. Run p4 info from within your client workspace to get the correct P4PORT, P4USER, and P4CLIENT settings.

If you get an error message stating ?P4 command line application not found...?, you need to tell Eclipse where the P4 command-line executable is located. To do this, choose: Window | Preferences | Team (click arrow) | Perforce, and click on the radio button for the "Location:" field under the "Location of p4 executable" section. Specify the path to P4 (or p4.exe executable).

General Settings

Descriptions of each of the following settings can be found in Eclipse's Help: 

Help | Help Contents | Perforce SCM  | Setting Preferences

As of 2009.1, a pure Java NIO interface (P4Java) is the default method for interacting with the Perforce server.

Enabling Label Decorations

As of 2009.1 the decorations are configured by default, and are consistent with P4V.

Choose: Window | Preferences | General | Appearance | Label Decorations
Check the "Perforce" box, and click Apply.
Choose: Window | Preferences | Team | Perforce | Label Decorations
Check the box under Ignored Resource Decoration Text labeled "Decorate files/folders contained in .p4ignore".
Choose appropriate locations for File Decoration Icons such as Bottom Right, Top Left, Top Left, Top Right, Top Right, Bottom Left. Click the "OK" button to accept the changes.

Customize Perspectives

To customize perspectives, choose: Window | Customize Perspective | Command Groups Availability tab | check Perforce | OK

9 users have rated this article 4 out of 5

View the original article here

Switching the Perforce server from case insensitive mode (-C1) to case sensitive mode

How do I switch a Unix Perforce Server running in case insensitive mode (-C1) to case sensitive mode?

Switching a Unix Perforce Server running in case insensitive mode (-C1) to case sensitive mode is similar to migrating a Perforce server from the Windows platform (case insensitive server) to the Unix platform.

Verify the archive files.

To confirm that you do not have any missing or corrupted archive files prior to updating the server, run the following command: p4 verify -q //... > verify.errorsIf you encounter any errors, please contact Perforce support for assistance. Stop the server.

Run p4 admin stop to shut down the Perforce Server.

Take a checkpoint.

Run the following command on the server to take a checkpoint: p4d -r P4ROOT -C1 -jcIt is important to specify the correct path to the Perforce server's root directory (P4ROOT). For more information on how to take a checkpoint, consult the Perforce System Administrator's Guide. Backup the checkpoint and depot subdirectories.

The following steps permanently modify the metadata and archive files. Therefore it is critical that you backup the server's checkpoint and all of its depot subdirectories before proceeding.

Resolve case-related problems.

Inconsistent use of case is fine on a case-insensitive platform; it results in serious issues on a case-sensitive one. Conversely, filenames that differ only by case are allowed on case-sensitive platforms, but collide and cause corruption and data loss in case-insensitive environments. A Perforce tool called p4migrate can help you to find and resolve any case-related problems in your repository. You can download p4migrate from our ftp site:


Select the folder that corresponds with the platform of your original Perforce server.

You will also need to download the current p4migrate documentation. 


Move existing database.
Move the database files (db.*) to a temporary location that can be deleted when the Perforce server has been successfully switched to the case sensitive mode. Restore from checkpoint .

Run the following command to recreate the database (db.*) files from the server's checkpoint free of case-inconsistencies and conflicts: p4d -r P4ROOT -jr checkpoint.nFor more information on how to restore from a checkpoint, consult the Perforce System Administrator's Guide.

Re-verify the archive files.

Run p4 verify to check that depot filenames are still consistent with the restored database: p4 verify -q //... > verify.errorsIf you encounter any errors contact Perforce support for assistance. Update the script starting the Perforce server.
Remove from your Perforce server startup script any occurrence of the "-C1" flag associated with the "p4d" command. Restart the Perforce server.

You can now restart the Perforce server using your Perforce server startup script.


View the original article here

Lock Source file in Perforce while using Maven release plugin

Hi,

I got an error in Hudson console out saying the build fail because Maven release plugin cannot update POM.xml version while there are still unresolved files. The problem is caused by other people updating the POM during the build.

Can any guru teach me how to solve the problem? I am think about a P4 lock, anyone can give me more details of using P4 lock with Maven and hudson?


View the original article here

Data Warehouse QA Manager

A Global Online Betting Company is looking for an experienced Data Warehouse QA Manager to join their team in London.

Candidates should have a strong hands-on knowledge of SQL and PL/ SQL along with an ability to read and understand PL-SQL code and provide review comments to developers and design, develop and execute test cases against the Oracle data warehouse. Extensive Oracle 9i/ 10g experience and experience of testing large-scale OLTP systems and/ or data warehouses is required to successfully fulfil the role. A working knowledge of data warehousing-related concepts (including replication, star schema design, OLAP) and proficiency in black box and white box testing techniques is also expected. Good knowledge of programming in Core Java, a solid understanding of source control systems (preferably Perforce) and a Bachelor's Degree in Computer Science is also required.

The chosen applicant will be responsible for preparing test scenarios based on requirements in JIRA and discussion with various stakeholders. He/ She will prepare and execute test cases in fast paced sprints, provide quality testing of Data Warehouse releases and revise and maintain regression test pack following all DW releases. The QA Manager will also help with the generation of test data for developers when required and work with front-end automation QA engineers from other teams to help build a system that generates repeatable source data for the warehouse. He/ She will be expected to work with all members of the extended DW team to ensure timely delivery of quality code and continuously strive to expand test coverage within the DW.

Candidates should submit their CV in the first instance. The pay rate is negotiable but dependent entirely on experience.


View the original article here

Perforce: Find source changelist for a branch

Short version:

After branching in P4, how can I find out the "source" changelist of the branch?

Long version:

Let's say I have a main branch of my project at

//project/main/...

The latest changelist submitted here is @123, when I decide to create a branch for release 1.0 in

//project/1.0/...

From P4V, a new changelist is created (say @130), resolved and submitted.

From the CLI, it would look something like this:

p4 integrate -c 123 -o //project/main/... //project/1.0/...p4 submit

Later, I look at the changelists under //project/1.0, and see the @130 changelist containing a lot of branched files. How can I find out the changelist no. that this was originally branched from (that is, @123) ?


View the original article here

P4Eclipse

Refactoring in Eclipse (2008.2 and earlier) SUMMARY: To support refactoring in Eclipse, P4WSAD performs a series of edits (check-outs), integrates, adds, and deletes, as needed, to make the repository reflect the changes to your project. Eclip...

View the original article here

Perforce Get Latest Revision doesn't get checked-out files?

This is an elemental thing. Syncing on one computer is in no way influenced by what you have open for edit on another. Syncing retrieves all those files regardless of who has them checked out, unless you have confused the server by messing with files outside the Perforce client. However, you said you used the -f option, which would solve that problem.

Are you sure you don't have those missing files open for add and not for edit?


View the original article here