Author Topic: SlickEdit and Perforce integration  (Read 7047 times)

vincent_shen

  • New Community Member
  • Posts: 1
  • Hero Points: 0
SlickEdit and Perforce integration
« on: August 06, 2009, 08:58:09 PM »
I'm using SlickEdit 2009 and Perforce at work. I've used our custom script to sycn (copy) files from perforce to my local machine and opened (read-only, since they are not checked out) them in slickedit. What I wanted to do is to be able to check files out within SlickEdit.

I went under Tools > Version Control > Setup and clicked SCC providers, selected Perforce SCM, and clicked "Initialize provider" So far everything went fine. When I clicked "Open project" and filled in the right parameters, I was able to browse to the clientspec (dubbed "workspace", but matches the clientspec concept in perforce). But when I click "OK", slickedit pops up a dialog "Perforce - Open Project", which looked like a Perforce file browser where I can see all files in the selected clientspec. It seems I need to select a file within the clientspec. But I'm not sure why I need to do that? What file do I need to select? Could someone explain the "project" concept with regard to Perforce? In my mind, since I've browsed to the right clientspec, (which is a mapping between perforce path and path local drive), I should be able to click on a local file and do "check in"/"check out"?

boo

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: SlickEdit and Perforce integration
« Reply #1 on: August 11, 2009, 11:23:56 AM »
The project file I believe. That's how I got it to work. The basic Perforce integration works. Wished they had a revert option per file. Can't seem to find it.

pkusbel

  • Community Member
  • Posts: 22
  • Hero Points: 4
Re: SlickEdit and Perforce integration
« Reply #2 on: August 15, 2009, 05:29:27 PM »
Quote
Wished they had a revert option per file

What I did is add a custom build command

Project->Properties
Select the tools tab, then press the new button

Add command "P4 Revert"

In the command line box, type: p4 revert %f
select "capture output", and in the menu caption box:  P4 Re&vert
(the & makes the "v" the hot-key)

Now, when editing a file and you want to revert it, just use the key sequence

Alt-B, V

alt-b to bring up the "Build" menu, v to select the p4-revert item we just added above

I hate the P4 plugin, it slows everything down.. So what I do is set my client spec per-project in the "Open" tab, and then add custom build commands for P4 as I did above.  THe commands I use are P4 add, p4 edit, p4 revert.  Submit I just do from the command line....

Now, when I'm editing, I just type alt-B, e to edit, alt-b, v to revert, alt-b, a to add, and so on.

TO set the client, open project->properties, then go to the "Open" tab.   In there

set P4PORT=my_p4_server:1666
set P4CLIENT=my_client
set P4USER=my_username

Now, whenever I open a project, then environment is set automatically and I don't have to deal with any type of integration...

Note also that you can make the commands in the project->properties apply to all new projects by customize the master dialog

Project->new, select the project type, then select "Customize".  Add your commands, then save.  Now, all new projects you create will have the custom P4 commands (and any others you may add).  I use this technique to add all sorts of useful commands...

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: SlickEdit and Perforce integration
« Reply #3 on: August 15, 2009, 06:11:02 PM »
I don't use the SCC plugin either.
What I did was to create a custom command line source control definition in SlickEdit, that invokes the various P4 commands, and I added a separate macro command for P4 revert.
This way SE can still drive source control (for example it can automatically check out the file for me, etc).