What to do about Perforce?

For one reason or another, my company uses Perforce as its VCS.

IDEA has support for CVS and StarTeam, but not Perforce. (For those who
don't know, the "Perforce integration" built into IDEA is not a VCS plugin,
so IDEA can't automatically call it to check out files, rename classes, move
classes between packages, etc.)

There is a Perforce plugin, but it doesn't do much yet. (I'm not
complaining; I know I could fix it myself, but I don't have the time to do
it.)

There is a request in the tracker for better support:

http://www.intellij.net/tracker/idea/viewSCR?publicId=8234

Its priority is marked as "high", but it's not planned for any version.


So I'm wondering if anything can be done to get Perforce support sooner.
Here are some of my ideas:

1. Beg IntelliJ relentlessly until they give in and release a Perforce
plugin for free :)

2. Count the number of people who would be willing to pay for such a plugin
and the amount of money they'd be willing to pay. (We have 7 developers and
I bet my boss would pay $100 per user.) Try to convice IntelliJ to release
the plugin as a separate product.

3. The same as #2, but try to convince Perforce (the company) to write the
plugin for money.

4. The same as #2, but try to convince some third party to write the plugin
for money. Are people allowed to charge money for plugins? If so, is anyone
interested?

5. Gather together a group of people who are willing to work on the plugin
in their spare time or during work hours. (Finding volunteers who will
actually have enough free time to work on it might be tough, especially
since the plugin will be bridging two non-free, non-open source products.
And getting bosses to let developers write such a plugin during work hours
and give it away might be tough too.)


Anyone care to comment?


Erik


14 comments

Coincidentally,
I started working on a full Perforce plugin that fits my needs not long ago.
It already has most of the 'phase 1' funtionality and I expect to release it
in a few days. BTW, some financial support could help justify my time spent
with this instead of my family (but it's completely up to your boss :)

(If you are interested, you may also want to look at some Perforce-related
threads e.g.
http://www.intellij.net/forums/thread.jsp?forum=18&thread=19456 )

Here is the list of the PerforcePlugin 'phase 1' features:
- project - level property page
- disable plugin option
- connecting either using explicit port/client/user or P4CONFIG
(to support files from several servers or clientspecs in one project)
- Actions:
- Add file (or several selected files)
- Add directory (meaqning - add all files underneath if they are NOT yet
in p4)
- Edit (=checkout) file(s) or directory
- Sync (if a file is checked-out and not changed, it reverts, syncs and
checks it out)
- sync all selected files or directories
- Revert - only on files (may I'll add on directories, and that will
just apply on all files there)
- trying to revert not only checked-out files but also add-ed files
(will delete after prompt)
and moved/renamed files (if not submitted of course)
- Revisions - only one selected file - shows diff window and all previous
revisions (including
branching). Option to specify external diff program - in that case
any changes to the
'editor' version made in external diff will be reflected in editor.
- Automatic actions (executed as a result of running an IDEA action):
- auto-checkout - if attempt to modify a read-only file (from Debabrata's
plugin)
- 'p4 integrate' on F6 (Move) and Shift F6 (Rename) - see below please
THAT IS MOST
CRITICAL feature
- auto delete files from Perforce
- auto-add newly created files if possibly mapped to p4 (i.e. under
directory that is in
clientspec)
- all destructive actions (esp.losing files that are not in P4) should be
prompted (sometimes
optionally, sometimes that could turned off)

Deliberately missing features:
- only one ('default') changelist supported (I can't imagine visually simple
way to do that)
- THIS PLUGIN IS NOT IDEA VCS PLUGIN. I found the concept too difficult if
IDEA is not
exclusive Perforce environment.
- I can test only on W2K - no Linux, but I try to make it platform
independent

MOVE/RENAME functionality:
- if the two files are under the same clientspec then everything is OK:
- p4 integrate (with some additional 'edit', 'revert', ... calls) works
fine
(I have used it on a quite huge project and didn't have a problem,
except double renaming, see below)
- revert works (need just to find out the original file, through p4
resolved)
- need to watch 'add' to the original file
- 'double rename' needs a special attention, since P4 doesn't provide
a way to do that - you have to et back to the original file and rename
(move) from that one.
- the interesting game starts when
- the source is not in P4
- the source is under different clientspec than the target
- the target in not in P4
- in these cases we can only rely on 'add' and 'delete' commands.
- but then perforce revert (the advanced one above) will not be able to
undo the move operation, just remove the file (that may end up in
data loss - at least the latest edited version).

Features to consider next (what would YOU like to see here?):
- copy support (to keep the branching in P4)
- automatic checking of opened files in a background thread and
marking the ones that are changed and need re-syncing
- output window with the p4 comands and results (so far there is just
an unused option in the prop page :)
- show p4 hierarchy (to be able to see unsync-ed files and invoke some
actions on them (e.g. sync))
- investigate IDEA 'Undo' action
- if password is specified, should be encrypted in the project file
(or asked when first time used)
- ...any improvements coming from users experience and demand...

Richard



"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4lv2a$1jg$1@is.intellij.net...

For one reason or another, my company uses Perforce as its VCS.

>

IDEA has support for CVS and StarTeam, but not Perforce. (For those who
don't know, the "Perforce integration" built into IDEA is not a VCS

plugin,

so IDEA can't automatically call it to check out files, rename classes,

move

classes between packages, etc.)

>

There is a Perforce plugin, but it doesn't do much yet. (I'm not
complaining; I know I could fix it myself, but I don't have the time to do
it.)

>

There is a request in the tracker for better support:

>

http://www.intellij.net/tracker/idea/viewSCR?publicId=8234

>

Its priority is marked as "high", but it's not planned for any version.

>
>

So I'm wondering if anything can be done to get Perforce support sooner.
Here are some of my ideas:

>

1. Beg IntelliJ relentlessly until they give in and release a Perforce
plugin for free :)

>

2. Count the number of people who would be willing to pay for such a

plugin

and the amount of money they'd be willing to pay. (We have 7 developers

and

I bet my boss would pay $100 per user.) Try to convice IntelliJ to release
the plugin as a separate product.

>

3. The same as #2, but try to convince Perforce (the company) to write the
plugin for money.

>

4. The same as #2, but try to convince some third party to write the

plugin

for money. Are people allowed to charge money for plugins? If so, is

anyone

interested?

>

5. Gather together a group of people who are willing to work on the plugin
in their spare time or during work hours. (Finding volunteers who will
actually have enough free time to work on it might be tough, especially
since the plugin will be bridging two non-free, non-open source products.
And getting bosses to let developers write such a plugin during work hours
and give it away might be tough too.)

>
>

Anyone care to comment?

>
>

Erik

>
>


0

+1 We also use Perforce and would love such a true intergration from IDEA. The current external tools help with the simple stuff but don't give us the full refactoring support IDEA is capable of.

0

Thank you! This will be most welcome.

"Richard Nemec" <rndzank@attbi.com> wrote in message
news:b4m4se$cuu$1@is.intellij.net...

Coincidentally,
I started working on a full Perforce plugin that fits my needs not long

ago.

It already has most of the 'phase 1' funtionality and I expect to release

it

in a few days. BTW, some financial support could help justify my time

spent

with this instead of my family (but it's completely up to your boss :)

>

(If you are interested, you may also want to look at some Perforce-related
threads e.g.
http://www.intellij.net/forums/thread.jsp?forum=18&thread=19456 )

>

Here is the list of the PerforcePlugin 'phase 1' features:
- project - level property page
- disable plugin option
- connecting either using explicit port/client/user or P4CONFIG
(to support files from several servers or clientspecs in one project)
- Actions:
- Add file (or several selected files)
- Add directory (meaqning - add all files underneath if they are NOT

yet

in p4)
- Edit (=checkout) file(s) or directory
- Sync (if a file is checked-out and not changed, it reverts, syncs and
checks it out)
- sync all selected files or directories
- Revert - only on files (may I'll add on directories, and that will
just apply on all files there)
- trying to revert not only checked-out files but also add-ed files
(will delete after prompt)
and moved/renamed files (if not submitted of course)
- Revisions - only one selected file - shows diff window and all

previous

revisions (including
branching). Option to specify external diff program - in that case
any changes to the
'editor' version made in external diff will be reflected in

editor.

- Automatic actions (executed as a result of running an IDEA action):
- auto-checkout - if attempt to modify a read-only file (from

Debabrata's

plugin)
- 'p4 integrate' on F6 (Move) and Shift F6 (Rename) - see below please
THAT IS MOST
CRITICAL feature
- auto delete files from Perforce
- auto-add newly created files if possibly mapped to p4 (i.e. under
directory that is in
clientspec)
- all destructive actions (esp.losing files that are not in P4) should be
prompted (sometimes
optionally, sometimes that could turned off)

>

Deliberately missing features:
- only one ('default') changelist supported (I can't imagine visually

simple

way to do that)
- THIS PLUGIN IS NOT IDEA VCS PLUGIN. I found the concept too difficult if
IDEA is not
exclusive Perforce environment.
- I can test only on W2K - no Linux, but I try to make it platform
independent

>

MOVE/RENAME functionality:
- if the two files are under the same clientspec then everything is OK:
- p4 integrate (with some additional 'edit', 'revert', ... calls) works
fine
(I have used it on a quite huge project and didn't have a problem,
except double renaming, see below)
- revert works (need just to find out the original file, through p4
resolved)
- need to watch 'add' to the original file
- 'double rename' needs a special attention, since P4 doesn't provide
a way to do that - you have to et back to the original file and

rename

(move) from that one.
- the interesting game starts when
- the source is not in P4
- the source is under different clientspec than the target
- the target in not in P4
- in these cases we can only rely on 'add' and 'delete' commands.
- but then perforce revert (the advanced one above) will not be able to
undo the move operation, just remove the file (that may end up in
data loss - at least the latest edited version).

>

Features to consider next (what would YOU like to see here?):
- copy support (to keep the branching in P4)
- automatic checking of opened files in a background thread and
marking the ones that are changed and need re-syncing
- output window with the p4 comands and results (so far there is just
an unused option in the prop page :)
- show p4 hierarchy (to be able to see unsync-ed files and invoke some
actions on them (e.g. sync))
- investigate IDEA 'Undo' action
- if password is specified, should be encrypted in the project file
(or asked when first time used)
- ...any improvements coming from users experience and demand...

>

Richard

>
>
>

"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4lv2a$1jg$1@is.intellij.net...

For one reason or another, my company uses Perforce as its VCS.

>

IDEA has support for CVS and StarTeam, but not Perforce. (For those who
don't know, the "Perforce integration" built into IDEA is not a VCS

plugin,

so IDEA can't automatically call it to check out files, rename classes,

move

classes between packages, etc.)

>

There is a Perforce plugin, but it doesn't do much yet. (I'm not
complaining; I know I could fix it myself, but I don't have the time to

do

it.)

>

There is a request in the tracker for better support:

>

http://www.intellij.net/tracker/idea/viewSCR?publicId=8234

>

Its priority is marked as "high", but it's not planned for any version.

>
>

So I'm wondering if anything can be done to get Perforce support sooner.
Here are some of my ideas:

>

1. Beg IntelliJ relentlessly until they give in and release a Perforce
plugin for free :)

>

2. Count the number of people who would be willing to pay for such a

plugin

and the amount of money they'd be willing to pay. (We have 7 developers

and

I bet my boss would pay $100 per user.) Try to convice IntelliJ to

release

the plugin as a separate product.

>

3. The same as #2, but try to convince Perforce (the company) to write

the

plugin for money.

>

4. The same as #2, but try to convince some third party to write the

plugin

for money. Are people allowed to charge money for plugins? If so, is

anyone

interested?

>

5. Gather together a group of people who are willing to work on the

plugin

in their spare time or during work hours. (Finding volunteers who will
actually have enough free time to work on it might be tough, especially
since the plugin will be bridging two non-free, non-open source

products.

And getting bosses to let developers write such a plugin during work

hours

and give it away might be tough too.)

>
>

Anyone care to comment?

>
>

Erik

>
>

>
>


0

"Paul Bradshaw" <pbradshaw@vignette.com> wrote in message
news:b4nqnl$838$1@is.intellij.net...

Thank you! This will be most welcome.


Come on, Paul - is that all?
Any comments or requests? For example I found out that it might be much
better if Revert
for add-ed file would NOT remove the file (just inform about the fact). Also
if file has been
moved from one clientspec to another (without any trace back in P4) - this
is also technically
delete and add (instead of integrate and delete) and reverting should NOT
delete the file.
Revert-ing reportedly move-d file will move it back.

OK, I will finish based on my best intentions and will beg for comments
after this gets
out.

r.


0

I am most interested in features which cannot be done through p4 or p4win.

My wish list, in order of priority:


Critical Priority

1. Automatically integrate and delete files when IDEA performs a move or
rename operation.

2. Automatically check out a file when IDEA wants to change its contents due
to a refactoring operation or a find/replace operation.


High Priority

3. Automatically check out a file when I start typing, or at least have IDEA
ask me if I want to check it out.

4. Automatically add a file when a new class/file is created in IDEA.

5. Automatically delete a file when deleted from IDEA.

6. Warning on double-rename (renaming a file that has been renamed locally
but not submitted yet).


Medium Priority

7. Revision history in a diff window.

8. Follow branching in revision history.

9. Automatic handling of double-rename.


Low Priority

10. A UI within IDEA for setting port/client/user.

11. Sync, add, revert, submit.

12. Multiple changelists, multiple clientspecs.



I think that each of these priority groups would make a good release version
(e.g., version 1 would contain just the critical priority, version 2 would
add just the high priority, etc.) And obviously other people will have other
priorities, but those are mine.



Erik Hanson


0

This is third time that OutlookExp. died trying to reply to your message.
That has never happened to me before.

So, I'll be rather quick:
All features #1-#11 are planned for the Phase 1 release.
Except:
- #6 will be replaced by #9,
- #11 no SUBMIT - I prefer to leave it to p4win for now.
- #11 add, edit, revert, sync will provide "smart" functionality (add file
being deleted/moved,
revert moved file, sync checked-out but unedited file,...)
- #12 only mutiple clientspecs via P4CONFIG
-#2 needs some testing whether it gets called in all needed situations.

r.

"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4o12l$mko$1@is.intellij.net...

I am most interested in features which cannot be done through p4 or p4win.

>

My wish list, in order of priority:

>
>

Critical Priority

>

1. Automatically integrate and delete files when IDEA performs a move or
rename operation.

>

2. Automatically check out a file when IDEA wants to change its contents

due

to a refactoring operation or a find/replace operation.

>
>

High Priority

>

3. Automatically check out a file when I start typing, or at least have

IDEA

ask me if I want to check it out.

>

4. Automatically add a file when a new class/file is created in IDEA.

>

5. Automatically delete a file when deleted from IDEA.

>

6. Warning on double-rename (renaming a file that has been renamed locally
but not submitted yet).

>
>

Medium Priority

>

7. Revision history in a diff window.

>

8. Follow branching in revision history.

>

9. Automatic handling of double-rename.

>
>

Low Priority

>

10. A UI within IDEA for setting port/client/user.

>

11. Sync, add, revert, submit.

>

12. Multiple changelists, multiple clientspecs.

>
>
>

I think that each of these priority groups would make a good release

version

(e.g., version 1 would contain just the critical priority, version 2 would
add just the high priority, etc.) And obviously other people will have

other

priorities, but those are mine.

>
>
>

Erik Hanson

>
>


0

Erik,

"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4o12l$mko$1@is.intellij.net...

Critical Priority
2. Automatically check out a file when IDEA wants to change its contents

due

to a refactoring operation or a find/replace operation.


it seems that is not posible in IDEA. Anytime IDEA finds readonly file it
doesn't
attempt to make it read-writeable. (That holds for file search/replace and
refactoring, too).
The closest we can get is to go to the refactoring preview window,
select the root line ("Occurences of") and hit Ctrl-ALT-E (my default
mapping
for P4Edit action). That will check-out all files in the preview. Or you can
do it by
package, or individual files.

Is that close enough?

r.


0

"Richard Nemec" <rndzank@attbi.com> wrote in message
news:b4p7ja$4ml$1@is.intellij.net...

Erik,

>

"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4o12l$mko$1@is.intellij.net...

Critical Priority
2. Automatically check out a file when IDEA wants to change its contents
due to a refactoring operation or a find/replace operation.

>

it seems that is not posible in IDEA. Anytime IDEA finds readonly file it
doesn't attempt to make it read-writeable. (That holds for file

search/replace

and refactoring, too).
The closest we can get is to go to the refactoring preview window,
select the root line ("Occurences of") and hit Ctrl-ALT-E (my default
mapping for P4Edit action). That will check-out all files in the preview.
Or you can do it by package, or individual files.

>

Is that close enough?


That's close enough.

It would of course be nice to have the automatic checkout in the future. It
sounds like it would require a code change in IDEA, but maybe the IntelliJ
folks would be up for it.


Erik


0

Already filed http://www.intellij.net/tracker/idea/viewSCR?publicId=3671
You can all vote for it. Right now, it only has my votes ;-(
"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4peb9$hjc$1@is.intellij.net...

"Richard Nemec" <rndzank@attbi.com> wrote in message
news:b4p7ja$4ml$1@is.intellij.net...

Erik,

>

"Erik Hanson" <ehanson@comsys.com> wrote in message
news:b4o12l$mko$1@is.intellij.net...

Critical Priority
2. Automatically check out a file when IDEA wants to change its

contents

due to a refactoring operation or a find/replace operation.

>

it seems that is not posible in IDEA. Anytime IDEA finds readonly file

it

doesn't attempt to make it read-writeable. (That holds for file

search/replace

and refactoring, too).
The closest we can get is to go to the refactoring preview window,
select the root line ("Occurences of") and hit Ctrl-ALT-E (my default
mapping for P4Edit action). That will check-out all files in the

preview.

Or you can do it by package, or individual files.

>

Is that close enough?

>

That's close enough.

>

It would of course be nice to have the automatic checkout in the future.

It

sounds like it would require a code change in IDEA, but maybe the IntelliJ
folks would be up for it.

>
>

Erik

>
>


0

thanks jacques, that's what we need, going to vote

r.

"Jacques Morel" <jacmorel@yahoo.com> wrote in message
news:b4pv57$n1t$1@is.intellij.net...

Already filed http://www.intellij.net/tracker/idea/viewSCR?publicId=3671
You can all vote for it. Right now, it only has my votes ;-(



0

"Jacques Morel" <jacmorel@yahoo.com> wrote in message
news:b4pv57$n1t$1@is.intellij.net...

Already filed http://www.intellij.net/tracker/idea/viewSCR?publicId=3671
You can all vote for it. Right now, it only has my votes ;-(


+15 votes from me :)




0

I would best be able to give comments once I get my hands on it and see how
it works.

Having a text log of the commands it issues to perforce would be great for
testing and debugging and stuff... as long as that's available, I'll gladly
help you out here.

The first iteration had a nasty habit of checking in .class files behind my
back, and that had such bad side-effects I haven't touched a p4 plug-in
since...

"Richard Nemec" <rndzank@attbi.com> wrote in message
news:b4nunc$hcp$1@is.intellij.net...

"Paul Bradshaw" <pbradshaw@vignette.com> wrote in message
news:b4nqnl$838$1@is.intellij.net...

Thank you! This will be most welcome.

>

Come on, Paul - is that all?
Any comments or requests? For example I found out that it might be much
better if Revert
for add-ed file would NOT remove the file (just inform about the fact).

Also

if file has been
moved from one clientspec to another (without any trace back in P4) - this
is also technically
delete and add (instead of integrate and delete) and reverting should NOT
delete the file.
Revert-ing reportedly move-d file will move it back.

>

OK, I will finish based on my best intentions and will beg for comments
after this gets
out.

>

r.

>
>


0

Thanks, this one is important...

"Paul Bradshaw" <pbradshaw@vignette.com> wrote in message
news:b4r7ct$ks7$1@is.intellij.net...

The first iteration had a nasty habit of checking in .class files behind

my

back, and that had such bad side-effects I haven't touched a p4 plug-in
since...



0

Please sign in to leave a comment.