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 ...
随机推荐
- FZU 1018 枚举dp
题意 给出一个数字组成的立方体 在其中选取一个体 使这个体中的数字之和最小 不可以不选 fzu的题目分类动态规划里面不是按难度排得 是按照题号..记得以前做题碰到过算 矩阵里面求子矩阵的最大和的 不会 ...
- 基于 jQuery Jcrop 插件的功能模块:头像剪裁
/** Jcrop version: 0.9.12 jQuery version: 1.9.0 Author: 小dee Date: 2014.10.30 */ 先看看他山之石:博客园的头像模块也是使 ...
- mysql字段额外属性,除去字段类型外的其他属性
如果你不想字段为 NULL 可以设置字段的属性为 NOT NULL, 在操作数据库时如果输入该字段的数据为NULL ,就会报错. AUTO_INCREMENT定义列为自增的属性,一般用于主键,数值会自 ...
- coreDate 简化版
建表: 自动生成: 代码: // // RootViewController.m // coreDate 简化版 #import "RootViewController.h" #i ...
- typecho流程原理和插件机制浅析(第一弹)
typecho流程原理和插件机制浅析(第一弹) 兜兜 393 2014年03月28日 发布 推荐 5 推荐 收藏 24 收藏,3.5k 浏览 虽然新版本0.9在多次跳票后终于发布了,在漫长的等待里始终 ...
- SET GLOBAL long_query_time=0
SHOW VARIABLES LIKE '%long%'
- by maintaining a log containing a record of each transaction’s activities - The Commit/Rollback Protocol
Computer Science An Overview _J. Glenn Brookshear _11th Edition Before a transaction is allowed to a ...
- Ubuntu/Deepin下常用软件汇总(持续更新)
最近开始用Ubuntu了,好多软件都不是常用的了,在这边留底,以免忘记.如果没有写安装方法,则直接在软件源中可以找到 UNetbootin U盘制作工具,制作Ubuntu的安装U盘超好用 Braser ...
- 五 mybatis的SqlMapConfig.xml详解
SqlMapConfig.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE conf ...
- 添加Ubuntu的库文件路径
添加Ubuntu的库文件路径 http://blog.csdn.net/r91987/article/details/6879062 关于ubuntu添加共享库路径: 1. 将绝对路径写入 /etc/ ...