Perforce plugin on Mac OS X
I am trying to get the Perforce plugin to work on Mac OS X.
When I use any function that depends on the P4 client, I get a message that it is not available.
I have installed Perforce with links so that it runs from the command prompt (e.g. "randy:$ p4"). I would have thought that sufficient for IDEA and plugins to find it.
Has anyone configured the Perforce plugin on Mac OS X? Any tips?
Please sign in to leave a comment.
Perforce plugin or PerforceDirect?
The second one works on Mac OS - provided 'p4' is recognized executable.
(If not, it allows some tricks to make it work even it the executable
is 'P4' or needs full path. Several users have it done - no reported
problems.)
r.
Randolph S Kahle wrote:
In article <6969545.1076937743125.JavaMail.itn@is.intellij.net>,
Randolph S Kahle <no_mail@jetbrains.com> wrote:
If you're talking about the PerforceDirectPlugin, you can change the
path to the "p4" executable by editing one of the settings files
("other.xml" I think).
I did that for a while, but then I just ended up putting a symlink to
/usr/local/bin/p4 in /usr/bin because I had to edit the XML file every
time I upgraded IDEA.
About the PerforcePlugin,
It does Runtime.exec("p4")
So if p4 is in the path it should work. But I have never run it from Mac and
don't have access to it to test it.
-Dash.
"Randolph S Kahle" <no_mail@jetbrains.com> wrote in message
news:6969545.1076937743125.JavaMail.itn@is.intellij.net...
>
that it is not available.
>
prompt (e.g. "randy:$ p4"). I would have thought that sufficient for IDEA
and plugins to find it.
>
>
I am now trying any and all Perforce plugins.
With PerforceDirect (only) downloaded, installed, and configured, I tried using the "check status" pull down menu and I got the following error:
Error message: Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(57,111),button=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###
java.lang.NullPointerException
at com.rne.perforce.ActionStat.statVFile(ActionStat.java:34)
at com.rne.perforce.ActionStat.actionPerformed(ActionStat.java:21)
at com.intellij.openapi.actionSystem.b.n$b_.actionPerformed(n$b_.java:0)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819)
at com.intellij.openapi.actionSystem.b.n.fireActionPerformed(n.java:22)
at com.intellij.ui.c.a.h.doClick(h.java:134)
at com.intellij.ui.c.a.h.access$300(h.java:31)
at com.intellij.ui.c.a.h$a_.mouseReleased(h$a_.java:5)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at com.intellij.ide.q.b(q.java:80)
at com.intellij.ide.q.a(q.java:91)
at com.intellij.ide.q.dispatchEvent(q.java:63)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
If I use the Edit command, I get:
Error message: Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(573,651),button=3,modifiers=Command+Button3,clickCount=0] on frame0
java.lang.RuntimeException: Execution Error: ErrCode=-1
StdOut:----
StdErr:----
Exception----
java.io.IOException: p4: not found
End----
at com.rne.perforce.PerfCommands.checkError(PerfCommands.java:707)
at com.rne.perforce.PerfCommands.p4fstat(PerfCommands.java:310)
at com.rne.perforce.ActionEdit.performAction(ActionEdit.java:58)
at com.rne.perforce.ActionBaseFile.actionPerformed(ActionBaseFile.java:104)
at com.intellij.openapi.actionSystem.b.n$b_.actionPerformed(n$b_.java:0)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819)
at com.intellij.openapi.actionSystem.b.n.fireActionPerformed(n.java:22)
at com.intellij.ui.c.a.h.doClick(h.java:134)
at com.intellij.ui.c.a.h.access$300(h.java:31)
at com.intellij.ui.c.a.h$c_.menuDragMouseReleased(h$c_.java:9)
at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:584)
at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:481)
at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:428)
at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:277)
at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.mouseReleased(BasicPopupMenuUI.java:440)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at com.intellij.ide.q.b(q.java:80)
at com.intellij.ide.q.a(q.java:91)
at com.intellij.ide.q.dispatchEvent(q.java:63)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I have tried changing the other.xml file to directly point to my installation of the p4 client at /Applications/Perforce/p4-2003.2
I get similar errors with the Perforce plugin (release 0.8.9):
java.io.IOException: p4: not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.]]>(UNIXProcess.java:54)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at com.perforce.api.P4Process.pure_exec(P4Process.java:286)
at com.perforce.api.P4Process.exec(P4Process.java:244)
at com.perforce.api.FileEntry.openForEdit(FileEntry.java:742)
at com.perforce.api.FileEntry.openForEdit(FileEntry.java:670)
at com.devbrat.vcs.perforce.Perforce.checkOutFile(Perforce.java:58)
at com.devbrat.vcs.perforce.PerforceVcs.checkoutFile(PerforceVcs.java:212)
at com.devbrat.vcs.perforce.actions.CheckoutAction.perform(CheckoutAction.java:65)
at com.devbrat.vcs.perforce.actions.BasicAction.execute(BasicAction.java:119)
at com.devbrat.vcs.perforce.actions.BasicAction.access$000(BasicAction.java:21)
at com.devbrat.vcs.perforce.actions.BasicAction$1.run(BasicAction.java:52)
at com.intellij.openapi.vcs.impl.c.runTransactionRunnable(c.java:56)
at com.devbrat.vcs.perforce.actions.BasicAction.actionPerformed(BasicAction.java:47)
at com.intellij.openapi.actionSystem.b.n$b_.actionPerformed(n$b_.java:0)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1819)
at com.intellij.openapi.actionSystem.b.n.fireActionPerformed(n.java:22)
at com.intellij.ui.c.a.h.doClick(h.java:134)
at com.intellij.ui.c.a.h.access$300(h.java:31)
at com.intellij.ui.c.a.h$a_.mouseReleased(h$a_.java:5)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at com.intellij.ide.q.b(q.java:80)
at com.intellij.ide.q.a(q.java:91)
at com.intellij.ide.q.dispatchEvent(q.java:63)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
So, it appears that I am (consistently) unable to run p4 from within the JRE.
Is there some other way to inform the JRE where to find command-line executables?
Thank you!
Randy
The P4Direct exceptions are all consequence of not found
p4 executable. And editing the other.xml SOLVES this problem.
So I must assume either
- the change to other.xml didn't reflect in IDEA. Did you shut down
IDEA before you edited the file?
- or the value put is not full p4 executable path (e.g. /usr/my/perf2002/P4)
- hopefully there are no spaces in the path, and make sure the case
is right (upper/lower).
If this doesn't help, do you mind sending me the PerforceDirect part of
other.xml? To verify what is there and ask probably more questions.
r.
Thank you for the clarity.
What I did not understand is that the other.xml fields are cleared when I install/de-install the plugin.
I now have PerforceDirectPlugin working correctly.
It appears that the other plugin presumes that the "exec(p4)" will find and run the perforce client. I have a link from /usr/local/bin/p4 -> to the program, however this is not found by the plugin even though a command shell will find it.
Is there a way with the "Perforce plugin" to explicitly point to the p4 program as is done in the PerforceDirect plugin?
-- Randy
In article <15963334.1077077234455.JavaMail.itn@is.intellij.net>,
Randolph S Kahle <no_mail@jetbrains.com> wrote:
I don't know the answer, but putting a symlink to the p4 executable in
"/usr/bin" worked for me. (Editing "other.xml" got tedious because I had
to do it every time I downloaded a new version of IDEA.)
In case you're not familiar with the Unix command line, go to Terminal
and type:
ln -s /Applications/perforce/p4 /usr/bin/p4
In article <27408840.1077128041074.JavaMail.itn@is.intellij.net>,
Randolph S Kahle <no_mail@jetbrains.com> wrote:
I tried using /usr/local/bin at first, but I had the same problem; the
JVM doesn't have that in its path. I'm sure there's a way to set it, but
it was easy enough to put it in /usr/bin.
Sorry. there is no way to set the full path from the PerforcePlugin. I will
add that in the next release but meanwhile you can probably try what Erik
suggested in the other thread.
-Dash.
"Randolph S Kahle" <no_mail@jetbrains.com> wrote in message
news:27408840.1077128041074.JavaMail.itn@is.intellij.net...
>
install/de-install the plugin.
>
>
and run the perforce client. I have a link from /usr/local/bin/p4 -> to the
program, however this is not found by the plugin even though a command shell
will find it.
>
program as is done in the PerforceDirect plugin?
>
>