perforce

Perforce diff for excel files

两盒软妹~` 提交于 2019-12-10 15:45:42
问题 I have a bunch of excel file sitting on perforce. I would want to do diff for these excel files similar to how I do for other files (like java,cs etc) in perforce. I tried to look for a plug in and found P4OFC is the one which works well only for doing diff of word file and not for excel file. Can someone tell me how do I do diff for excel file sitting in perforce. 回答1: I think that the latest version of Beyond Compare can do spreadsheets, you might want to grab the free trial and give it a

Perl Unit Test for Connection to Perforce — Connect to Server Failed; check $P4PORT

a 夏天 提交于 2019-12-10 15:21:21
问题 I am writing a P4Perl script to make connection to a Perforce server and to automate execution of Perforce commands. Along with the development of the subroutines to access Perforce, I am also developing unit tests to verify the them. I am new to both Perl and unit testing. This is my subroutine to establish a connection to Perforce. Filename is p4_connect.pl use warnings; use strict; use P4; my $clientname = "johndoe" my $p4port = "icmanage:1667" main(); sub main { my $status; $status =

git p4 clone has no files

你。 提交于 2019-12-10 14:13:13
问题 I'm migrating from Perforce to git, and in the process I'm trying to get the file structure right. The current perforce structure is something like this: //depot /android /main /other_branches /core_library /main /other_branches and I'm shooting for something like this in git: /android /core_library I set up my client spec View as follows (I'll worry about the branches later): //depot/android/main/... //p4-git/android/... //depot/android/core_library/main/... //p4-git/core_library/... Wen I

xcode4 doesn't support Perforce?

社会主义新天地 提交于 2019-12-10 04:06:52
问题 xcode4 doesn't support Perforce? I add a repository in xcode4. Only subversion and Git to choose. how to add a perforce repository? thank you. 回答1: I threw together a couple of Automator services that let you bind hotkeys for p4 edit/p4 add on the currently open file in Xcode 4. It's not ideal, but it beats switching to terminal or p4v. https://github.com/jcohen/xcode4-perforce-services 回答2: It's also useful to note that there is a setting in Preferences/Behaviors to add behaviors to

p4 command line equivalent to “git log -p”?

旧时模样 提交于 2019-12-10 04:04:57
问题 I often use git log -p <file> or git log -p <directory> to get a comprehensive summary of the changes in a file or set of files. It outputs a history of the commits affecting the files, together with a unified diff of each commit. Using Perforce I can do p4 changes <file> or p4 changes <directory>/... to get a list of commits. But there does not seem to be an option to show the corresponding diffs. Is there a Perforce equivalent I could use? If shell scripting is necessary, a fully working

Vim auto commands: writing a read-only file?

久未见 提交于 2019-12-10 03:54:48
问题 I'm using Perforce with Vim on Windows. I currently have an auto command set up to open a read-only file for edit when changing it: au FileChangedRO * !p4 edit <afile> Is there any way to set up a similar auto command to execute p4 edit when attempting to write a read-only file rather than edit it? 回答1: You can use an auto command attached to the BufWritePre event, that checks whether the file is read only or not and executes p4 edit on demand. Something like: autocmd BufWritePre * :if

Perforce fast sync a directory to a clean state

大憨熊 提交于 2019-12-10 03:09:15
问题 I want a fast solution that does not require force sync that will put a specified directory to its original repository state. same files may be removed from disk same files may be added from disk some files may be modified on disk some files may be marked for removal, addition or modification in perforce All I want is to be sure that after if run the command I will have none of these. p4 -f sync is not an option, I need a faster solution that does minimize networks usage. Just in case someone

How can I change the description of a existing changelist in command line?

北城余情 提交于 2019-12-10 01:50:20
问题 The command "p4 change" prompts a editor and needs a form. But I want to do this in command line. How can I achieve this? 回答1: There's always the -i command: Read a changelist description from standard input. Input must be in the same format used by the p4 change form. As Bryan points out in his comment the best approach is probably to run change -o , redirect the output to a file, process the file with other shell commands, and then send that file back to the server with change -i . Source

Is there an equivalent to git stash in perforce?

旧巷老猫 提交于 2019-12-10 01:34:50
问题 I've dug through the interwebs all I can, and I can't for the lack of me find any way of easily stashing or branching locally with perforce. I know of the git wrapper for perforce, but it really doesn't seem too well developed or reliable from everything I've read about it. 回答1: Regarding branching, I doubt you can "branch" locally in Perforce, nor could you natively stash. Git is based on a graph of commits (a DAG - Directed Acyclic Graph actually), which will display only the content of a

Git: How to prevent committing files that were modified just for debugging purposes?

五迷三道 提交于 2019-12-09 17:56:03
问题 A lot of times, I like to modify some lines of code in order to make debugging easier, but I don't actually want to commit them. For instance, I'll disable some annoying features (like ads) by commenting out some lines of code, or I'll set the log levels and filters to only the ones I care about, or I'll force a conditional to be true just so the block of code I want to run actually runs all the time. In Perforce, I would have created a "changelist" for these files and labeled it as "DON'T