Prasanna Yelsangikar
Prasanna Yelsangikar

Reputation: 1009

Is it possible to customize the perforce commands?

I am new to perforce is it possible to modify or add new features in perforce commands with the help of Perforce API's

Upvotes: 0

Views: 52

Answers (2)

Krishna
Krishna

Reputation: 1362

Much can be achieved by using p4 aliases.

An example from here will create a new changelist. More interesting applications can be found on that page.

newChange $(desc) = change -o > $(chg) &&
                   p4subst "$(LT)enter.*$(GT)" $(desc) < $(chg) > $(chg2) &&
                   change -i < $(chg2)

Upvotes: 0

sferencik
sferencik

Reputation: 3249

The Perforce APIs more or less copy the command set that you see when you run p4 help commands on the command-line. There isn't much to gain by merely moving from the command-line (or P4V) to the API.

Having said that, you can always use the existing command set as building blocks for more complicated functionality. That can be achieved by scripting (where you combine multiple commands of the p4 command-line) or by programming (where you combine multiple APIs to higher-level functionality).

What kind of a feature are you after?

Upvotes: 3

Related Questions