如何连接和在Mac上执行与Perforce同步 [英] How to connect & perform Sync with Perforce on Mac

查看:205
本文介绍了如何连接和在Mac上执行与Perforce同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Mac计算机OS x 10.8.5上从命令行访问perforce并执行同步操作

I am trying to access perforce and perform Sync operation from command line on Mac machine OS x 10.8.5

谁能告诉我如何在命令行中访问perforce.

Can any one tell me how to access perforce for command line.

我已将p4客户端放置在/usr/bin目录中,

I have placed p4 client in /usr/bin directory,

从终端执行我的命令时:P4或p4帮助,即时消息出现以下错误消息.

From Terminal when i execute command : P4 or p4 help, im getting below error message.

Perforce客户端错误: 连接服务器失败;检查$ P4PORT. TCP连接到perforce:1666失败. 节点名称未提供servname或未知

Perforce client error: Connect to server failed; check $P4PORT. TCP connect to perforce:1666 failed. nodename not servname provided, or not known

逐步设置Perforce的方法,将不胜感激

Step by step approach to set up Perforce, will be greatly appreciated

注意:P4V gui版本工作正常,我需要从命令行执行bash脚本的Sync命令.

Note: P4V gui version is working fine, I need to execute Sync command from Command line for bash script.

谢谢.

推荐答案

除了下载"p4"可执行文件并将其放置在您的路径中(您已经完成)之外,您还需要设置三个配置设置:

In addition to downloading the 'p4' executable and placing it in your path (which you have already done), you need to set three configuration settings:

  1. P4PORT,这是您的Perforce服务器的网络地址
  2. P4USER,这是您将用于连接到Perforce的用户名
  3. P4CLIENT,这是您在此工作站上使用的工作空间的名称

作为在连接对话框中输入数据的一部分,您已经在P4V中弄清楚了这些.但是您需要为命令行单独设置这些变量,以了解它们.

You have already figured these out in P4V, as part of entering the data in the connection dialog. But you need to set these variables separately for the command line to know about them.

例如,我可以这样做:

  1. p4设置P4PORT = myserver.example.com:1666
  2. p4设置P4USER = bryan
  3. p4设置P4CLIENT = bryan-dev

然后我将能够通过命令行连接到我的Perforce服务器.

and then I would be able to connect with the command line to my Perforce server.

您也可以在外壳程序中使用"export"代替"p4 set":

Instead of 'p4 set', you can also use 'export' in your shell:

  1. export P4PORT = myserver.example.com:1666
  2. export P4USER = bryan
  3. export P4CLIENT = bryan-dev

或者您可以使用P4CONFIG文件.

Or you can use a P4CONFIG file.

底线:设置P4PORT,P4USER和P4CLIENT以匹配您在P4V连接对话框中使用的设置,命令行将准备就绪.

Bottom line: set P4PORT, P4USER, and P4CLIENT to match the settings that you use in your P4V connection dialog, and the command line will be ready to go.

这篇关于如何连接和在Mac上执行与Perforce同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆