Emacs-Perforce integration
Facts - Editor: emacs
Sunday, 30 March 2008 11:06

At the moment I use emacs 22.1.1 with the vc-mode. The following steps are necessary to get Emacs vc-mode working under Perforce.

  • Download the lisp files p4-lowlevel.el and vc-p4.el written by Jonathan Kamens from Perforce
  • Add a file P4CONFIG.txt to the root of your local perforce workspace directory. Do not check in this file into Perforce. The file P4CONFIG.txt contains your connection parameters to the Perforce server:
    P4PORT=<perforce server name>:<port number>
    P4USER=<your perforce username>
    P4PASSWD=<your password>
    P4CLIENT=<your perforce workspace>
    
  • Add the following lines to your .emacs file:
    (load (expand-file-name "e:/emacs/perforceIntegration/p4-lowlevel.el"))
    (load (expand-file-name "e:/emacs/perforceIntegration/vc-p4.el"))
    (require 'vc-p4)
    
  • Add the files p4-lowlevel.el, p4.el and vc-p4.el to your emacs installation in for example directory "e:/emacs".
  • Add environment variable P4CONFIG as "P4CONFIG.txt", so without the path name.

Now you can add, check out and check in from emacs with the command vc-next-action (C-x v v).