How to set latest P4 CL# into property?

tpatil created the topic: How to set latest P4 CL# into property?
We have CI setup using bamboo, P4 & maven. When I trigger the build from bamboo it gives me the CL# on which the build is done on build results page.

How can I get this value/property in pom.xml? I want to add to this CL# to MANIFEST.MF file.

Thanks,
-Tushar

How to set latest P4 CL# into property?
This may serve your ur purpose…
p4 changes -s submitted -m1

plz refer following articles as well

stackoverflow.com/questions/47007/determ…ynced-to-in-perforce
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

tpatil replied the topic: Re:How to set latest P4 CL# into property?
/**
*Usage in pon.xml
* * test.maven
* maven-p4-plugin
*
*
*
* p4changes
*

*
* //depot/ABC/2/X/...
*

*

*

*
*
* Goal which touches a timestamp file.
*
* @goal p4changes
*
* @phase process-sources
*/
public class P4RevisionMojo extends AbstractMojo {

private Process p;
private Properties prop;
private MavenProject project;
/**
* @parameter expression="${p4.url}" default-value="./..."
* @required
* @since 1.0
*/
private String suffix;
/**
* @parameter expression="${p4.port}" default-value="${env.P4PORT}"
* @optional
* @since 1.0
*/
private String p4port;
/**
* @parameter expression="${p4.client}" default-value="${env.P4CLIENT}"
* @optional
* @since 1.0
*/
private String p4client;
/**
* @parameter expression="${p4.user}" default-value="${env.P4USER}"
* @optional
* @since 1.0
*/
private String p4user;
/**
* @parameter expression="${p4.passwd}" default-value="${env.P4PASSWD}"
* @optional
* @since 1.0
*/
private String p4passwd;

public void execute() throws MojoExecutionException {
try {
String cmd = "p4 changes -m 1 " + url;
this.getLog().info("Executing P4 command: " + cmd);
p = Runtime.getRuntime().exec(cmd);
BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = stdInput.readLine();

String property = "p4.revision";
if (suffix != null && suffix.length() > 0) {
property = property.concat("." + suffix);
}

prop.setProperty("buildtstamp", new Date().toString());
prop.setProperty(property, "000000");
while (line != null) {
String[] line_items = line.split(" ");
if (line_items.length >= 1) {
if (line_items[0].equalsIgnoreCase("Change")) {
prop.setProperty(property, line_items[1]);
this.getLog().info("P4 Revision ${" + property + "} :::: " + prop.getProperty(property));
}

}
return;
}

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

Tagged :

P4 shelve

rajeshkumar created the topic: p4 shelve
Store files from a pending changelist in the depot, without submitting them.

Shelving is the process of temporarily storing work in progress on a Perforce Server without submitting a changelist. Shelving is useful when you need to perform multiple development tasks (such as interruptions from higher-priority work, testing across multiple platforms) on the same set of files, or share files for code review before committing your work to the depot.
The p4 shelve command creates, modifies, or discards shelved files in a pending changelist. Shelved files persist in the depot until they are discarded (by means of p4 shelve -d) or replaced by subsequent p4 shelve commands.
After shelving files, you can revert or modify them in your client workspace, and restore the shelved versions of those files to your workspace with the p4 unshelve command.
While files are shelved, other users can unshelve the shelved files into their own workspaces, or into other client workspaces.
Files that have been shelved can also be accessed with the p4 diff, p4 diff2, p4 files, and p4 print commands, using the revision specifier @=change, where change is the pending changelist number.
If no arguments are specified, p4 shelve creates a new changelist, adds files from the user’s default changelist, and (after the user completes a form similar to that used by p4 submit), shelves the specified files into the depot. If a file pattern is given, p4 shelve shelves only the files that match the pattern.

For More Info…
www.perforce.com/perforce/doc.current/ma…s/cmdref/shelve.html
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Alternate to p4 proxy

scmuser created the topic: Alternate to p4 proxy
Hi,

I know p4 proxy which enables the p4 server working in distributed environment…do you know any alternate to p4 proxy which can replicate the p4 server to remote location with all p4 operationb supported as its in p4 proxy?

rajeshkumar replied the topic: Re: Alternate to p4 proxy
Hi,

if you are looking for any of the answer of the following questions, perforce answer is NO…

1/ Is there any alternate ways to setup P4 Proxy Server? NOT using p4p/p4ps

ANSWER: NO

2/ Is There ways to setup perforce server distributed in 2 different location where each time submit operation happens with nearest located server and BOTH server sync the DB and versioning files with each other?

ANSWER: NO
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Need correct P4win and p4v installer

scmuser created the topic: Need correct P4win and p4v installer
My Server version is 2004.2 and I would like to have supported p4win and p4v which will support to my perforce server in 64 bit.

Could you please let me know from where I can download right installer?

rajeshkumar replied the topic: Re: Need correct P4win and p4v installer
the current version of the P4V client is only compatible with Perforce servers 2005.2 and later. The last version of P4V that worked with P4D 2004.2 was P4V 2008.2 which can be downloaded from our ftp site.

The 64bit version can be downloaded from:

ftp://ftp.perforce.com/perforce/r08.2/bin.ntx64/

and the 32bit version can be downloaded from:

ftp://ftp.perforce.com/perforce/r08.2/bin.ntx86/
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Use of p4 spec command

scmuser created the topic: Use of p4 spec command
Use of p4 spec -o label command

“p4 spec” is an unsupported command and thus not documented in the command reference. The only reference we have is “p4 help spec”:

spec — Edit spec definitions (unsupported)

p4 spec [-d -i -o] type

Edit any type of specification: branch, change, client, depot,
group, job, label, spec, stream, trigger, typemap, or user. Only
the comments and the formatting hints can be changed. Any fields
that you add during editing are discarded when the spec is saved.

‘p4 jobspec’ is equivalent to ‘p4 spec job’, and any custom spec
(include the job spec) can be deleted with ‘p4 spec -d type’.

Please let me know if you have any further questions.

Tagged :

P4 replication: do not read compressed journals?

scmuser created the topic: p4 replication: do not read compressed journals?
p4 replicate and p4 pull (when replicating metadata) do not read compressed journals. Therefore, the master server must not compress rotated journals until the replica server has fetched all journal records from older journals

Based on the major issue, how should be solve this?

Tagged :

P4 replication issues

scmjobs created the topic: P4 replication issues
URL www.perforce.com/perforce/r10.2/manuals/…/10_replication.html

In Given URL, Above, it has particular system requirement….

p4 replicate and p4 pull (when replicating metadata) do not read compressed journals. Therefore, the master server must not compress rotated journals until the replica server has fetched all journal records from older journals.

Questions:
1. How to make sure that replica Server has fetch all journal records from older journals?
2. After fetching all journal records, can i compress journal?
3. if I compress jounral after fetch, will Master and replicate server will do replication??

Tagged :

P4 Replication and P4 Broker Questions

scmuser created the topic: P4 Replication and P4 Broker Questions
I would like to implement such a functionality in which if my broker has redirect p4 command to Rep1 server, and same time I got another sync command, it should redirect to rep2 from broker as rep 1 is already busy.

Tagged :

Different Perforce Tools and Their Short Summary | Know About Different Perforce tools

different-perforce-tools

Different Perforce Tools and Their Short Summary

Clients
P4V: Visual Client – (Included in the P4V Installer)
Provides access to versioned files through a graphical interface and also includes tools for merging and visualizing code evolution.
P4Merge: Visual Merge Tool – (Included in the P4V Installer)
Provides graphical three-way merging and side-by-side file comparisons
P4: Command-Line Client – (Included in the Perforce Server Windows Installer)
(Included in the Perforce Server Windows Installer)
P4Web: Web Client – (Included in the P4Web Installer)
Provides convenient access to versioned files through popular web browsers

Server
P4D: Server – (Included in the Perforce Server Windows Installer)
Stores and manages access to versioned files, tracks user operations and records all activity in a centralized database.
P4P: Proxy Server – (Included in the Perforce Server Windows Installer)
A self-maintaining proxy server that caches versioned files remotely on distributed networks.

Plug-ins & Integrations
P4WSAD: Plug-in for Eclipse and WebSphere Studio
Access Perforce from within the Eclipse IDE and the Rational/WebSphere Studio WorkBench family of products
P4SCC: SCC Plug-in – (Included in the P4V Installer)
Enables you to perform Perforce operations from within IDEs that support the Microsoft SCC API including Visual Studio.
P4EXP: Plug-in for Windows Explorer – (Included in the P4V Installer)
Allows Windows users direct access to Perforce.
P4DTG: Defect Tracking Gateway – (Included in the P4DTG Installer)
Allows information to be shared between Perforce’s basic defect tracking system and external defect tracking systems.
P4GT: Plug-in for Graphical Tools
Provides seamless access to version control for files from within Adobe Photoshop, SoftImage XSI, Autodesk’s 3ds max, and Maya
P4OFC: Plug-in for Microsoft Office
Allows documents to be easily stored and managed in Perforce directly from Microsoft Word, Excel, PowerPoint and Project.

Tools & Utilities
P4Report: Reporting System
Supports leading tools such as Crystal Reports, Microsoft Access, and Microsoft Excel, or any reporting
tool that interfaces with an ODBC data source.
P4Thumb: Thumbnail Generator
Creates thumbnails of graphics files managed by Perforce and stores the thumbnails in the server for presentation in P4V.
P4FTP: FTP Plug-in
Allows FTP clients like Dreamweaver, Netscape, and Internet Explorer to access files in Perforce depots.’
Links to Download: http://www.perforce.com/perforce/downloads/platform.html

Good Video Tutorial Links
http://www.perforce.com/perforce/media_library/tutorials.html
http://www.perforce.com/perforce/demo/testdrive.html

Tagged : / / / / / / / / / / / / / / / / / /