perforce

perforce学习心得

匿名 (未验证) 提交于 2019-12-02 23:49:02
原文链接: http://www.cnblogs.com/YingLoveHaiTao/archive/2011/11/11/2245425.html Perforce学习心得 软件配置管理(SCM)是一款构建于可伸缩客户/服务器结构之上的软件配置管理工具。SCM管理源码并保持其安全的良好艺术,它能实现源码与其他团队成员之间保持共享,并且能够对之加以保护。良好地利用SCM,你能够容易地跟踪软件的发行和新的开发分支;这样以来,可以更为容易地标识和修正发行产品中的错误。仅仅应用TCP/IP,开发人员就能够通过多种Perforce客户端(几种平台的GUI、WEB、或命令行)访问Perforce服务器。Perforce能够被快速和容易地部署,即使对大型或分布式的站点,也只要求最小限度的管理。Perforce可以使用在50多个操作系统中,它包括版本控制、工作空间管理、变更处理和一个强大的分支模型。 版本控制的功能:跟踪记录整个软件的开发过程,包括软件本身和相关文档(所带来的结果是:可标识不同阶段的软件及相关文档,进行差别分析;对软件进行可撤消的修改;便于汇总不同人员所做的修改),辅助协调和管理软件开发团 1 软件代码的一致性 软件的开发、维护和升级,往往是多个人共同协作的过程。不同人对同一个软件的不同部分同时做着修改,这种行为有时会出现彼此交叉的情况

Perforce, How to integrate a change to another branch?

ⅰ亾dé卋堺 提交于 2019-12-02 22:57:48
I have trunk and a release branch. If I fixed a bug in release branch, I definitely should integrate the fix back to trunk. However, I didn't find a command dedicated to integrate such a single change list; did I miss something? To integrate changelist 100, for example, you'd use: p4 merge //releasebranch/...@=100 //trunk/... p4 resolve p4 submit (If you have an older Perforce server you'll have to use 'integ' instead of 'merge'.) Note that '@=100' means the same thing as '@100,100' in this context. 来源: https://stackoverflow.com/questions/12106321/perforce-how-to-integrate-a-change-to-another

What are the advantages to Perforce?

走远了吗. 提交于 2019-12-02 22:08:27
What are the benefits of Perforce? I'd love to have some insight as to how Perforce can work better in a given situation than, say, Subversion. If you have experience with both Perforce and Subversion and you don't believe that there are any advantages, or believe that svn has advantages over Perforce, I'd like to know why, as well. I've worked with Perforce for years, as well as Clearcase, Sourcesafe, RCS, PVCS, CVS and Subversion. More recently I've started using GIT too. From this experience my opinion is that, for most purposes, Perforce is the best version control system for commercial

Get the changelist number of current workspace directory

左心房为你撑大大i 提交于 2019-12-02 20:18:42
Each time we do a build, we have to record the changelist number of source files for tracking. We have different projects (under different directories) and they are synced at different changelist number. May you please show me how can we get the changelist number of a specific directory? Any suggestions are appreciated. Thanks and Best Regards Also, there's p4 changes -m1 //path/to/your/project/...#have which, if run in the client workspace that synced the files for building, will give you the highest changelist number of the files in the workspace. p4 cstat //path/to/your/project...#have

how to list my shelved changes in perforce?

佐手、 提交于 2019-12-02 20:09:06
p4 shelve saved a lot of my effort to edit the same file with different changes. The problem is after i shelved some changes, I start to forget what I've shelved. Is there a way to list all the changes I've shelved? I checked p4 help unshelve/shelve but could not find the option. This should list all the shelved changes per user. p4 changes -u <USERNAME> -s shelved p4 changes -s shelved My colleague find the answer for me, and I answer my own question here. 来源: https://stackoverflow.com/questions/9578881/how-to-list-my-shelved-changes-in-perforce

How to use p4merge as the merge/diff tool for Mercurial?

懵懂的女人 提交于 2019-12-02 17:17:05
Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5? Ry4an Brase This will work for merging: Place this into your ~/.hgrc (or, optionally, your Mercurial.ini on Windows): [merge-tools] p4.priority = 100 p4.premerge = True # change this to False if you're don't trust hg's internal merge p4.executable = /Applications/p4merge.app/Contents/MacOS/p4merge p4.gui = True p4.args = $base $local $other $output Requires Mercurial 1.0 or newer. Clearly you'll need to update the path to that executable to reflect where you'd got p4merge installed. You can't change

Detecting Perforce unopened modified files

混江龙づ霸主 提交于 2019-12-02 15:51:39
I'm trying to figure out a way to detect files that are not opened for editing but have nevertheless been modified locally. p4 fstat returns a value headModTime for any given file, but this is the change time in the depot, which should not be equal to the filesystem's stat last modified time. I'm hoping that there exists a more lightweight operation than backing up the original file, forcing a sync of the file, and then running a diff. Ideas? grieve From: http://answers.perforce.com/articles/KB/3481/?q=disconnected&l=en_US&fs=Search&pn=1 See step 2 specifically: 2 . Next, open for "edit" any

What's the representation of point in time in Perforce

末鹿安然 提交于 2019-12-02 15:24:43
问题 A git commit hash represents the project at a specific time, what's the equivalent concept (a "thing" that represent a snapshot of the entire repo at a particular time) in Perforce? 回答1: The submitted changelist number in Perforce serves the same purpose as a commit hash in git in terms of being a version specifier that applies across the entire repository. Compared to the commit hash, changelist numbers also have the advantage of being comparable (submissions are required to be in order,

Determining the last changelist synced to in Perforce

删除回忆录丶 提交于 2019-12-02 13:52:57
A question that occasionally arises is what is the best way to determine the changelist that you last synced to in Perforce. This is often needed for things like injecting the changelist number into the revision info by the automatic build system. I recommend the opposite for automatic build systems: you should first get the latest changelist from the server using: p4 changes -s submitted -m1 then sync to that change and record it in the revision info. The reason is as follows. Although Perforce recommends the following to determine the changelist to which the workspace is synced: p4 changes

Perforce for Git users? [closed]

依然范特西╮ 提交于 2019-12-02 13:46:29
There is a lot of "Git for Perforce users" documentation out there, but seemingly very little of the opposite. I have only used Git previously and recently started a job where I have to use Perforce a lot, and find myself getting very confused a lot of the time. The concepts I'm used to from Git seem not to map to Perforce at all. Is anyone interested in putting together a few tips for using Perforce for someone who is used to Git? Matt This something I've been working on over the past couple weeks on and off. It's still evolving, but it may be helpful. Please note I'm a Perforce employee. An