perforce

p4 Submit aborted Error - How to resolve

大城市里の小女人 提交于 2019-12-21 03:46:20
问题 A p4 check-in failed with the following error: Submit aborted -- fix problems then use 'p4 submit -c XXXX'. Some file(s) could not be transferred from client. I read another solution on the site about how incorrect filetypes might be the problem. How do I get more information regarding the error in p4? 回答1: Typically you will see this error on submit when there is a file in the changelist that does not exist on the client, and therefore cannot be transferred to the server. There are at least

What's the proper way to refactor a single file into multiple files and maintain version history in Perforce?

独自空忆成欢 提交于 2019-12-21 03:35:09
问题 I have a file which has gotten too large, and should be refactored into two smaller files. What's the best way to do this in Perforce such that the relationship to the original file is maintained? I'm adding two new files, and deleting the original in this case, but I would expect there to be some general solution to this problem. I think the simplest case would be to add one new file which contains a subset of the content of the original, and delete that content from the original file, but

How can I grab my local changelist and send it to someone else in Perforce?

∥☆過路亽.° 提交于 2019-12-20 18:12:53
问题 How can I grab my local changelist and send it to someone else in Perforce? More specifically, I would like to send unsubmitted changes from a local pending changelist to another user's pending changelist. 回答1: set P4DIFF=C:\cygwin\bin\diff.exe p4 diff -du -c 12345 > patch-to-head.diff # On Other machine patch -p1 < patch-to-head.diff I may be wrong on the env var there, and you might have to do some fixups on the diff file, but the general idea is that you generate a GNU Unified Diff, that

How can I grab my local changelist and send it to someone else in Perforce?

三世轮回 提交于 2019-12-20 18:12:06
问题 How can I grab my local changelist and send it to someone else in Perforce? More specifically, I would like to send unsubmitted changes from a local pending changelist to another user's pending changelist. 回答1: set P4DIFF=C:\cygwin\bin\diff.exe p4 diff -du -c 12345 > patch-to-head.diff # On Other machine patch -p1 < patch-to-head.diff I may be wrong on the env var there, and you might have to do some fixups on the diff file, but the general idea is that you generate a GNU Unified Diff, that

Perforce: 'remove from workspace' from command line?

我的未来我决定 提交于 2019-12-20 11:51:03
问题 The p4v Perforce GUI client has an 'Actions > Remove from Workspace' menu command which removes all files from the workspace that are under version control and were not opened for edit or delete. This functionality only seems to be available from the GUI client, I can't find any corresponding command in the ever growing list shown by p4 help commands . I thought of using p4 where , p4 files and some list filtering, but that doesn't seem trivial, so before I go about creating a script, does

How to set file permission bits with Perforce

人盡茶涼 提交于 2019-12-20 10:58:22
问题 I have a few files that I noticed have the Other bits turned off (e.g., permissions set to 550 when checked-in to Perforce). I want them to be readable and/or executable by everyone. To put it in 'ls -l' parlance, the file's permissions look like this: Checked-in: -r-xr-x--- Checked-out: -rwxr-x--- I tried setting chmod 555 before doing p4 edit , but Perforce just resets it to 750. Likewise I tried chmod 755 after the file was opened for editing, but when I submit it reverts to 550. I read

What are the advantages to Perforce?

懵懂的女人 提交于 2019-12-20 10:24:30
问题 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. 回答1: 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

how to list my shelved changes in perforce?

让人想犯罪 __ 提交于 2019-12-20 09:47:59
问题 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. 回答1: This should list all the shelved changes per user. p4 changes -u <USERNAME> -s shelved 回答2: p4 changes -s shelved My colleague find the answer for me, and I answer my own question here. 来源: https://stackoverflow

Perforce blame

被刻印的时光 ゝ 提交于 2019-12-20 09:33:20
问题 Is there an equivalent of svn's blame for Perforce on the command line? p4 annotate doesn't display usernames -- only changeset numbers (without ancestor history!). I currently have to track code back through ancestors and compare against the filelog, and there just has to be an easier way -- maybe a F/OSS utility? 回答1: Try taking a look at a couple of tools that I think could get you most of what you need: 1) p4pr Perl script by Bob Sidebotham and Jonathan Kamens. 2) Emacs Perforce interface

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

落花浮王杯 提交于 2019-12-20 08:28:12
问题 Does anyone know how to setup Mercurial to use p4merge as the merge/diff tool on OS X 10.5? 回答1: 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