perforce

Updating files with a Perforce trigger before submit

邮差的信 提交于 2019-12-24 12:25:17
问题 I understand that this question has, in essence, already been asked, but that question did not have an unequivocal answer, so please bear with me. Background: In my company, we use Perforce submission numbers as part of our versioning. Regardless of whether this is a correct method or not, that is how things are. Currently, many developers do separate submissions for code and documentation: first the code and then the documentation to update the client-facing docs with what the new version

How to get “Client name:” of a perforce workspace using “p4 info” from python script?

耗尽温柔 提交于 2019-12-24 07:48:45
问题 I have a scenario where i need to have perforce workspace Client name information. Trying out with script as follows: import sys import subprocess cmd = "p4 info | grep" + """ "Client name" """ +"" print ("p4 command is: ",cmd) p4 = subprocess.call(cmd) print( p4) Where i get out put as : p4 command is: p4 info | grep "Client name" Usage: info [-s] Unexpected arguments. 1 I tried doing as follows too but did not worked: import sys import subprocess p4_info = subprocess.call([sys.executable,

How to get “Client name:” of a perforce workspace using “p4 info” from python script?

雨燕双飞 提交于 2019-12-24 07:48:01
问题 I have a scenario where i need to have perforce workspace Client name information. Trying out with script as follows: import sys import subprocess cmd = "p4 info | grep" + """ "Client name" """ +"" print ("p4 command is: ",cmd) p4 = subprocess.call(cmd) print( p4) Where i get out put as : p4 command is: p4 info | grep "Client name" Usage: info [-s] Unexpected arguments. 1 I tried doing as follows too but did not worked: import sys import subprocess p4_info = subprocess.call([sys.executable,

How to integrate every single changelist when merging/resolving in Perforce?

时光怂恿深爱的人放手 提交于 2019-12-23 14:55:18
问题 I'm fairly new to Perforce but I already have experience with DVCS like Git and Mercurial and I'm familiar with the basic principles of Perforce. I played a bit with p4v today and made a branch of some play code by using the Integrate... function. I later modified the source branch and wanted to integrate those changes to the new branch as well. However, all single changelists were consolidated to one big changelist. That doesn't seem best practice to me. If you develop a feature or a bug fix

Perforce workaround to add files with '@'

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 12:11:08
问题 By design, Perforce does not allow filenames with wildcards @#%* be added. It is giving this error: Can't add filenames with wildcards [@#%*] in them. Use -f option to force add. However, I have SASS files that have @ on them to support mixins. For example: carbon-fibre-@2X.png sprite-dashboard-@2X.png What is the best workaround to have these files added to Perforce, with most minimal disruption on checkin, checkout, compile, build, and deploy flow ? 回答1: You can add files with Perforce

“Reconcile Offline Work” in Perforce doesn't work for me

て烟熏妆下的殇ゞ 提交于 2019-12-23 10:28:52
问题 In the 2009.1 version of Perforce Visual Client for 32-bin Windows, the "Reconcile Offline Work" option does weird things. In the middle box where the "Local files not in depot" should be displayed, I never get anything. What I do see is that the first time I reconcile a folder, it looks like perforce is filling the box with the "local files not in depot" because a list flashes quickly before my eyes. Then all of a sudden, the list quickly disappears into thin air and I'm left with an empty

How can we identify parent branch in Perforce?

耗尽温柔 提交于 2019-12-23 09:07:22
问题 Suppose i had a main branch - //project/main/... and than i created new branch from main - //project/1.0/... and then again i created branch from 1.0 - //project/2.0/... Now, if someone wants to know from which branch branch 2.0 created, how can user identify? 回答1: Select a file and use the Perforce Revision Graph to see the relationships between branches for a particular file. Perforce does not have Branch as a first-class object, so you have to look at the branch history of individual files

How to resolve integrated files in Perforce JAVA API

倾然丶 夕夏残阳落幕 提交于 2019-12-23 02:29:09
问题 How to resolve integrated files in Perforce JAVA API. I am trying to merge files from one branch to another. I am using following code to merge. tmpClient.integrateFiles(file, toFile, "17.2", opts ); After executing this command, files need to be resolved. How can I do that? 回答1: Look at IClient.resolveFile() and IClient.resolveFilesAuto(): https://www.perforce.com/perforce/r15.1/manuals/p4java-javadoc/com/perforce/p4java/client/IClient.html The specific method you use will depend on whether

git p4: migrate full history - including integration history

对着背影说爱祢 提交于 2019-12-22 13:57:12
问题 A couple of years ago, a subfolder in one of my Perforce depots (e.g. //FirstDepot/LargeSubfolder/... ) became too large to maintain, so I 'migrated' it into a depot of its own (e.g. //NewDepotFromLargeSubfolder/... ). Perforce does not support integrations from one depot to another, so I basically checked out the files, added them to the new depot and deleted them from the subfolder. Now I am about to migrate the entire Perforce server to a number of git repositories. The git p4 procedure