10 messages in com.perforce.perforce-user[p4] Cygwin and Windows paths
FromSent OnAttachments
Matthew Goos25 Mar 2002 17:11 
Jay Han25 Mar 2002 17:34 
Blake Ramsdell25 Mar 2002 17:37 
Stephen Vance25 Mar 2002 17:56 
Chuck Karish25 Mar 2002 23:52 
Schipper, Martijn (Contractor)26 Mar 2002 00:08 
Tyler, Tom26 Mar 2002 06:27 
Jeff A. Bowles26 Mar 2002 07:05 
Schaible, Jorg27 Mar 2002 01:41 
Jay Han27 Mar 2002 10:14 
Subject:[p4] Cygwin and Windows paths
From:Blake Ramsdell (bla@brutesquadlabs.com)
Date:03/25/2002 05:37:42 PM
List:com.perforce.perforce-user

Cygwin and Windows pathsFor running Perforce itself under Cygwin, I use the
following alias in bash:

alias p4='p4 -d `cygpath -w $PWD`'

I know that this isn't your problem, but it sounds like the path that is
provided to the editor needs to be turned back into a "Unix form" using cygpath
-u, before going to vi. Something akin to:

/path/to/vi `cygpath -u $FILENAME`

Since it appears that P4EDITOR simply appends the path of the file to be edited
to the value of P4EDITOR as the command line, you can't get the closing backtick
in there. My suggestion would be to create a shell script along the lines of:

#!/bin/sh vi `cygpath -u $1`

And then set P4EDITOR to run bash with the script, which will in turn run vi
with the "fixed" pathname.

HTH.

Blake ----- Original Message ----- From: Matthew Goos To: 'perforce-user at perforce.com' Sent: Monday, March 25, 2002 5:11 PM Subject: [p4] Cygwin and Windows paths

I have a guy on our team who is running win2k OS, using Cygwin to run
perforce.

He would like to use VI as an editor, but perforce seems to pass a windows
style path to VI and VI cannot find the file.

E.g. User runs: p4 client myClient Perforce creates a temp file in %temp% and passes the location to VI as C:\somePath\temp\temporaryFile.txt

VI returns a message that essentially says it cannot find the file.

We worked around this by setting P4EDITOR=notepad, but I am wondering if there
is a way to use VI instead.

Any ideas/solutions?

Thanks, mg

Matthew Goos 'double t, double o' Software Quality Assurance Loudeye Technologies p. 206-832-4218 f. 206-832-4010 matthew.goos at loudeye.com www.Loudeye.com