Perforce plugin(s)

Hi Dash, and other P4-cers,
Thinking in loud (this will be not very well organized):

I find the IDEA way of integrating VCS not quite fitting my needs
(I am big IDEA fan though - as you may have noticed).

First, I don't like to have files moved and/or renamed without
perforce being notified. In that case I have to do everything from IDEA
(and from the same project) and cannot easily submit without
IDEA.

I have my personal plugin that intercepts file renaming and that
does all the neccessary changes in P4 (integrate, delete, etc.)
right at the time when I move a file. But my simple implementation
doesn't allow me to rename one file twice (in one changelist).

Question(s):
1. Does anyone else prefer to reflect all file changes in P4 immediately?
(without submitting, just in the changelist)
2. Does anyone know whether it is possible to intercept UNDO
for move/rename operation in order to reflect it in P4?

Also, I often have project files from several clientspecs so I use
P4CONFIG env variable (see p4 docs) to indirectly specify clientspecs.

3. Is anything like that possible with the P4Package? The only thing
that has to happen is that the exec() has to run in the file's
directory.

Other:

4. May there be a way to visually notify the user that the file may be
outdated?
(newer version in P4) Any way to change the file-s icon?

5. May it be worth having alternative Perforce VCS plugin that would do
rename/move
immediately - not deferring it to the submit time?

r.


5 comments
Comment actions Permalink

First, I don't like to have files moved and/or renamed without
perforce being notified. In that case I have to do everything from IDEA
(and from the same project) and cannot easily submit without
IDEA.


will it work to add a new action similar to checkin project which does
everything like renaming etc but not submit the changelist ?

I have my personal plugin that intercepts file renaming and that
does all the neccessary changes in P4 (integrate, delete, etc.)
right at the time when I move a file. But my simple implementation
doesn't allow me to rename one file twice (in one changelist).


I think you cann't do two integrates on the same file at the same time
even with different changelists, because until you submit the first one
perforce does not recognize the new file.

Also, I often have project files from several clientspecs so I use
P4CONFIG env variable (see p4 docs) to indirectly specify clientspecs.
3. Is anything like that possible with the P4Package? The only thing
that has to happen is that the exec() has to run in the file's
directory.


This should be easy to add to P4Package and I don't think david will
mind.

>

4. May there be a way to visually notify the user that the file may be
outdated?
(newer version in P4) Any way to change the file-s icon?


There are two parts to this problem.

first, getting the status from p4 --- I think it will be a bit slow
to call fstat on all the files in a directory.
second, changing the icons in the project view. I don't think open
api exposes project view yet, you will have to create a new toolwindow and
show the tree view there.

5. May it be worth having alternative Perforce VCS plugin that would do
rename/move
immediately - not deferring it to the submit time?


The more options we have the better :) I would prefer if could make
this an option in the current plugin rather than creating a new one. but
that could be just my personal bias :)

-Dash.


0
Comment actions Permalink

Thanks Dash for all your comments

First, I don't like to have files moved and/or renamed without
perforce being notified. In that case I have to do everything from IDEA

will it work to add a new action similar to checkin project which does
everything like renaming etc but not submit the changelist ?


I would prefer immediate renaming in P4 - just it would be MUCH more
natural - I'm renaming and don't have to remember to do anything additional.
Especially if I'm in the middle of larger refactorings...

I think you cann't do two integrates on the same file at the same time
even with different changelists, because until you submit the first one
perforce does not recognize the new file.


Well, I found a way:
"p4 resolved " shows what was the original file. Then revert both,
and then do the usual "p4 integrate" from the original file. (You may have
to
keep a copy of the edited file). I just didn;t have time to implement it.

The more options we have the better :) I would prefer if could make
this an option in the current plugin rather than creating a new one. but
that could be just my personal bias :)


No, I'd like to keep just one perforce plugin as well (and get rid of my
local
unfinished plugins - like the external diff and move/rename).


r.


0
Comment actions Permalink

Debabrata Dash wrote:

>>First, I don't like to have files moved and/or renamed without
>>perforce being notified. In that case I have to do everything from IDEA
>>(and from the same project) and cannot easily submit without
>>IDEA.


will it work to add a new action similar to checkin project which does
everything like renaming etc but not submit the changelist ?


It should do this. Refactorings are not necessarily going to produce
code that should be submitted. The developer should have the
opportunity to review the refactoring/move without having to inflict it
on any other developer who unwittingly happens to sync that branch.

>>4. May there be a way to visually notify the user that the file may be
>>outdated?
>> (newer version in P4) Any way to change the file-s icon?


There are two parts to this problem.

first, getting the status from p4 --- I think it will be a bit slow
to call fstat on all the files in a directory.

>

This is a deadly problem. The Clearcase plugin to JBuilder from Rational
did this at start up. Our current project has over 40,000 files, so you
can imagine how long this took. This would be cool if this is done
when a tab is activated.

- Gary

0
Comment actions Permalink

>>4. May there be a way to visually notify the user
that the file may be
>>outdated?
>> (newer version in P4) Any way to change the
file-s icon?


There are two parts to this problem.

first, getting the status from p4 --- I

think it will be a bit slow

to call fstat on all the files in a directory.

>

This is a deadly problem. The Clearcase plugin to
JBuilder from Rational
did this at start up. Our current project has over
40,000 files, so you
can imagine how long this took. This would be cool
if this is done
when a tab is activated.


They have FileStatus* classes in the OpenAPI, which presumably deal with local/remote file status. But I found no hook in the Open API, where I could attach my code, checking whether the given file is in-sync, out-of-sync, has-conflict. I asked for that in OpenAPI forum, but had no answer. This feature would be extremely useful to have.

There is no need to check status of all files in the project. Only files, that are opened or visible in the project view, need to be checked for their p4 status.

There should also be a configurable delay for status refresh.

0

Please sign in to leave a comment.