Perforce 使用笔记
Perforce requires at least two executables: the server (p4d), and at least one Perforce client
program (such as p4 on UNIX, or p4.exe on Windows).
If you have Administrator privileges, it is usually best to install Perforce as a service. If
you don’t, install it as a server.
Windows Installation
Use the Perforce installer program to install or upgrade the Perforce Server, Perforce
Proxy, or the Perforce Command-Line Client.
Windows services VS windows servers
To run any task as a Windows server, a user account must be logged in, because shortcuts
in a user’s Startup folder cannot be run until that user logs in. A Windows service, on the
other hand, is invoked automatically at boot time and runs regardless of whether or not a
user is logged in to the machine.
The Perforce service (p4s.exe) and the Perforce server (p4d.exe) executables are copies
of each other; they are identical apart from their filenames. When run, they use the first
three characters of the name with which they were invoked (that is, either p4s or p4d) to
determine their behavior. For example, invoking copies named p4smyserver.exe or
p4dmyservice.exe invokes a service and a server, respectively.
Starting and stopping the Perforce service
services.msc or user command line: p4 admin stop
Starting and stopping the Perforce server
The server executable, p4d.exe, is normally found in your P4ROOT directory. To start the
server, first make sure your current P4ROOT, P4PORT, P4LOG, and P4JOURNAL settings are
correct; then run: %P4ROOT%\p4d
To start a server with settings different from those set by P4ROOT, P4PORT, P4LOG, or
P4JOURNAL, use p4d command-line flags. For example:
c:\test\p4d -r c:\test -p 1999 -L c:\test\log -J c:\test\journal
starts a Perforce server process with a root directory of c:\test, listening to port 1999,
logging errors to c:\test\log, and with a journal file of c:\test\journal. The p4d
command-line flags are case-sensitive.
To stop the Perforce server, use the command:
p4 admin stop
Windows configuration parameter precedence
Under Windows, Perforce configuration parameters can be set in many different ways.
When a Perforce client program (such as p4 or P4V), or a Perforce server program (p4d)
starts up, it reads its configuration parameters according to the following precedence:
1. The program’s command-line flags have the highest precedence.
2. The P4CONFIG file, if P4CONFIG is set
3. User environment variables
4. System environment variables
5. The Perforce user registry (set by p4 set)
6. The Perforce system registry (set by p4 set -s)
When a Perforce service (p4s) starts up, it reads its configuration parameters from the
environment according to the following precedence:
1. Windows service parameters (set by p4 set -S servicename) have the highest
precedence.
2. System environment variables
3. The Perforce system registry (set by p4 set -s)
User environment variables can be set with any of the following:
• The MS-DOS set command
• The AUTOEXEC.BAT file
• The User Variables tab under the System Properties dialog box in the Control Panel
System environment variables can be set with:
• The System Variables tab under the System Properties dialog box in the Control Panel
Moving between machines of the same architecture
If the architecture of the two machines is the same (for example, SPARC/SPARC, or
x86/x86), the versioned files and database can be copied directly between the machines,
and you only need to move the server root directory tree to the new machine. You can use
tar, cp, xcopy.exe, or any other method. Copy everything in and under the P4ROOT
directory - the db.* files (your database) as well as the depot subdirectories (your
versioned files).
1. Back up your server (including a p4 verify before the backup) and take a
checkpoint.
2. On the old machine, stop p4d.
3. Copy the contents of your old server root (P4ROOT) and all its subdirectories on the
old machine into the new server root directory on the new machine.
4. Start p4d on the new machine with the desired flags.
5. Run p4 verify on the new machine to ensure that the database and your versioned
files were transferred correctly to the new machine.
(Although the backup, checkpoint, and subsequent p4 verify are not strictly necessary,
it’s always good practice to verify, checkpoint, and back up your system before any
migration and to perform a subsequent verification after the migration.)
Delete a workspace
From the "View" menu, select "Workspaces". You'll see all of the workspaces you've created. Select the workspaces you want to delete and click "Edit" -> "Delete Workspace", or right-click and select "Delete Workspace". If the workspace is "locked" to prevent changes, you'll get an error message.
To unlock the workspace, click "Edit" (or right-click and click "Edit Workspace") to pull up the workspace editor, uncheck the "locked" checkbox, and save your changes. You can delete the workspace once it's unlocked.
In my experience, the workspace will continue to be shown in the drop-down list until you click on it, at which point p4v will figure out you've deleted it and remove it from the list.
Perforce 使用笔记的更多相关文章
- 【Tools】Pro Git 一二章读书笔记
记得知乎以前有个问题说:如果用一天的时间学习一门技能,选什么好?里面有个说学会Git是个很不错选择,今天就抽时间感受下Git的魅力吧. Pro Git (Scott Chacon) 读书笔记: ...
- [Git00] Pro Git 一二章读书笔记
记得知乎以前有个问题说:如果用一天的时间学习一门技能,选什么好?里面有个说学会Git是个很不错选择,今天就抽时间感受下Git的魅力吧. Pro Git (Scott Chacon) 读书笔记: ...
- 《Linux就该这么学》自学笔记_ch21_使用Git分布式版本控制系统
<Linux就该这么学>自学笔记_ch21_使用Git分布式版本控制系统 文章主要内容: 分布式版本控制系统 使用Git服务程序 提交数据 移除数据 移动数据 历史记录 还原数据 管理标签 ...
- Git、Github、Gitkraken 学习笔记
<Git.Github.Gitkraken 学习笔记> 一.写在前面 1.参考资料 本文参考 <Pro Git> 一书. 在官网有免费在线版可供阅读:https://git-s ...
- git-简单流程(学习笔记)
这是阅读廖雪峰的官方网站的笔记,用于自己以后回看 1.进入项目文件夹 初始化一个Git仓库,使用git init命令. 添加文件到Git仓库,分两步: 第一步,使用命令git add <file ...
- js学习笔记:webpack基础入门(一)
之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...
- SQL Server技术内幕笔记合集
SQL Server技术内幕笔记合集 发这一篇文章主要是方便大家找到我的笔记入口,方便大家o(∩_∩)o Microsoft SQL Server 6.5 技术内幕 笔记http://www.cnbl ...
- PHP-自定义模板-学习笔记
1. 开始 这几天,看了李炎恢老师的<PHP第二季度视频>中的“章节7:创建TPL自定义模板”,做一个学习笔记,通过绘制架构图.UML类图和思维导图,来对加深理解. 2. 整体架构图 ...
- PHP-会员登录与注册例子解析-学习笔记
1.开始 最近开始学习李炎恢老师的<PHP第二季度视频>中的“章节5:使用OOP注册会员”,做一个学习笔记,通过绘制基本页面流程和UML类图,来对加深理解. 2.基本页面流程 3.通过UM ...
随机推荐
- [IT新应用]存储入门-文件级存储及块级别存储的选择
http://www.techrepublic.com/blog/the-enterprise-cloud/block-level-storage-vs-file-level-storage-a-co ...
- Configuration.ConfigurationSettings.AppSettings已过时
1.在项目中引用System.Configuration.dll,在需要的页面加上using System.Configuration; 2.把ConfigurationSettings.AppSet ...
- Linq中常用的方法
这几天闲着也是闲着,就仔细的研究了一下Linq的语法,还有他的一些扩展方法的使用. 下面是一些常用的扩展方法. Aggregate 自定义的聚合计算 All 检测序列中所有元素是否都满足指定的条件 A ...
- 物联网操作系统HelloX V1.80测试版发布
经过HelloX开发团队近半年的努力,在HelloXV1.79版本基础上,增加许多功能特性,并对V1.79版本的一些特性进行了进一步优化之后,正式形成HelloX V1.80测试版本.经相对充分的测试 ...
- Android高级之第十一讲Hybird开发
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 随着移动端应用平台的兴起,需求和交互方式的多样化,H5开发逐渐在移动端流行起来:常见的移动产品有We ...
- node中定时器的“先进”用法
var DSQ = setInterval(function(){ console.log('zzq'); },1000); setTimeout(function(){ clearInterval( ...
- 在Asp.net MVC中访问静态页面
有时候由于一些特殊的需要,我们需要在MVC中访问HTML页面,假如您将这个页面放在Views中的话,去访问将会收到一个404,但是放在Views外面的目录则不受此限制. 那么我们就来解决View里面的 ...
- NOIP2013,复赛及同步赛,报名及比赛,专题页面
本通知的对象仅仅是福州第十九中学的学生 所有参加复赛以及同步赛的选手,请务必要仔细阅读:<关于CCF NOIP2013复赛有关事宜的通知>,里面有比赛的时间.地点.以及比赛费用的说明. 参 ...
- oracle 表查询二
1.使用逻辑操作符号问题:查询工资高于500或者是岗位为manager的雇员,同时还要满足他们的姓名首字母为大写的J?select * from emp where (sal > 500 or ...
- Fiddler-008-简单模拟性能测试
通过 Fiddler 可以简单的模拟性能测试的并发测试,此方法非常的简单,直接讲述如何使用,敬请参阅! 首先我们要获取需要并发的 HTTP请求,此操作非常简单,则在此不再赘述.获取到响应的 HTTP请 ...