SlickEdit Community

Archived Read Only Forums => SlickEdit 2013 v18 beta => Topic started by: jvert on April 30, 2013, 07:09:09 pm

Title: Problems with Perforce client
Post by: jvert on April 30, 2013, 07:09:09 pm
SlickEdit 2013 (v18.0.0.5 64-bit) on Ubuntu 12.04

The Perforce support seems broken if you have multiple clients on your machine. For instance, I have two clients, one under /source/foo and one under /source/bar. If I try to run the checkout command on a file like /source/foo/blah.c, I get an error that says "Path '/source/foo/blah.c' is not under client's root '/source/bar'."

I have P4CONFIG environment variable set to .p4config and a .p4config in both /source/foo and /source/bar that has the right P4CLIENT.

This worked right before my upgrade.

Also a nitpick - at the bottom of the Perforce options dialog, if you select "Perforce executable" it says "Specifies the path to the Subversion executable that you wish to use." at the bottom.
    -John
Title: Re: Problems with Perforce client
Post by: Dan on May 01, 2013, 12:43:10 pm
The nitpick one is fixed, thanks for the report.

What do you get when you run "p4 client -o" from a console?  Does it change depending on the current directory?
Title: Re: Problems with Perforce client
Post by: jvert on May 01, 2013, 05:11:42 pm
If I run "concur-command p4 client -o" from slickedit, I get the correct client for the current buffer. Running 'concur-command p4 edit blah.c" also works. So I don't see why checkout() is getting the wrong client.

I have "Set current directory when switching buffers" set to On, so the current directory is always correct.
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 11:07:48 am
How are you trying to check the file out?  We are just running the edit command, nothing specific to the client is happening there, so I am a little perplexed.
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 11:30:01 am
Can you try setting def_svc_logging to 1 (Macro>Set macro variable) and then send try the checkout, and send me your (config path)\18.0.0\logs\svc.log file?  You should probably set the variable back to 0 when you are done as it generates quite a bit of information.
Title: Re: Problems with Perforce client
Post by: shadm on May 02, 2013, 04:38:49 pm
I've been having similar problems with the Perforce integration.  I dug into it a bit this morning, and here is what I see happening:

When I open a file that is under Perforce control, SE does set the CWD.  However, inside the getPerforceInfo function, which in turn calls the perforceRunCommand, it appears that a new process/shell is created, which is set to the default directory I get when creating a new shell.  In my case, it is the Documents directory inside my home directory.  So my guess is that no matter what the current directory is for SE, the means by which the command is executed doesn't get that same environment, causing the command to be executed outside the context of the desired directory structure.

I initially tried my p4 commands by right clicking the file in the project explorer, so I thought perhaps my problem was that the CWD was set to some other file in the current buffer.  However, even if I add a call to chdir based on the localFilename parameter passed to getHistoryInformation, the Perforce CWD is set to the default shell directory.  After the context of the perforceRunCommand, the CWD is still set to what I manually set it to.

I am running B2 on Ubuntu 12.04 x86_64.  I hope this is helpful.
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 04:43:03 pm
Are you sure the current directory is changing?  What happens if you type "cd" on the SlickEdit command line?

I just tested this on Windows and UNIX, and the directory and it seems to be OK, but I'm going to run another test.
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 04:48:19 pm
Were you checking out by right-clicking on the Projects tool window and picking Check out on the menu?
Title: Re: Problems with Perforce client
Post by: shadm on May 02, 2013, 05:37:01 pm
I'm actually just attempting to just get the history of the file, not check it out.  The assumption being that checking out a file would seem to be an even steeper challenge.  I've tried both selecting from the project file, and while the file is open in the current buffer.  To try to eliminate any confusing conditions, and just demonstrate my initial observation, the following information is specifically related to attempting to get the file history from Perforce from a current buffer.  In addition, I restarted SE and immediately right clicked in the buffer and selected the history command from the context menu.  I've changed the actual paths for security purposes.

getPerforceInfo
CWD: /perforce_view/project
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 info
perforceInfo.currentDirectory: /home/user/Documents
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 -V
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 client -o
getHistoryInformation
initial CWD: /perforce_view/project
after chdir CWD: /perforce_view/project
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 filelog -t -l /perforce_view/project/file.cpp

Note that in all cases, the CWD is the path desired.  However, when inside the getPerforceInfo command, the currentDirectory member is set to /home/user/Documents.  This represents where Perforce thinks it is running, and in my testing on the raw command line is always (obviously?) set the the CWD from where I launched the command.

On a side note, I probably would have had this info sooner, but when attempting to use the file backup history to clean out extraneous debug statements I had added, the diff view was unusable.  The cursor is constantly flickering, whether trying to edit text or click the window buttons.  Not sure if someone has already mentioned this behavior yet or not.
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 05:38:58 pm
Are you on Kubuntu?
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 05:42:17 pm
Can you send me the log output (or did you trim this from it)?
I'm actually just attempting to just get the history of the file, not check it out.  The assumption being that checking out a file would seem to be an even steeper challenge.  I've tried both selecting from the project file, and while the file is open in the current buffer.  To try to eliminate any confusing conditions, and just demonstrate my initial observation, the following information is specifically related to attempting to get the file history from Perforce from a current buffer.  In addition, I restarted SE and immediately right clicked in the buffer and selected the history command from the context menu.  I've changed the actual paths for security purposes.

getPerforceInfo
CWD: /perforce_view/project
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 info
perforceInfo.currentDirectory: /home/user/Documents
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 -V
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 client -o
getHistoryInformation
initial CWD: /perforce_view/project
after chdir CWD: /perforce_view/project
perforceRunCommand
CWD: /perforce_view/project
CMD: /path/p4 filelog -t -l /perforce_view/project/file.cpp

Note that in all cases, the CWD is the path desired.  However, when inside the getPerforceInfo command, the currentDirectory member is set to /home/user/Documents.  This represents where Perforce thinks it is running, and in my testing on the raw command line is always (obviously?) set the the CWD from where I launched the command.

On a side note, I probably would have had this info sooner, but when attempting to use the file backup history to clean out extraneous debug statements I had added, the diff view was unusable.  The cursor is constantly flickering, whether trying to edit text or click the window buttons.  Not sure if someone has already mentioned this behavior yet or not.
Title: Re: Problems with Perforce client
Post by: shadm on May 02, 2013, 05:47:35 pm
I installed Ubuntu and then installed KDE because the new Ubuntu unity is not to my liking.  Not sure if that qualifies as Kubuntu or not.

The output I sent was from several "say" outputs that I entered in the Perforce.e file.  That is the complete output, just the specifics of the paths, were changed to be more generic.  Is there more info/another log I should provide?
Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 05:49:49 pm
I had one other report of the diff blinking on KDE, I will check it out.  I'm not sure what would be different about it.

You can set def_svc_logging to 1, but I think your output is complete enough.
Title: Re: Problems with Perforce client
Post by: shadm on May 02, 2013, 06:04:26 pm
I had that turned on earlier, and it provided me no more information than the error dialog.  Here is what it says, paths have been changed to track with previous post:



[T=1718158904] getHistoryInformation stdout
[T=1718158905] getHistoryInformation stderr
[T=1718158905]    getHistoryInformation stderr:/perforce_view/project/file.cpp - file(s) not on client.

Title: Re: Problems with Perforce client
Post by: Dan on May 02, 2013, 06:05:46 pm
Yes, I realized that I failed to include the current directory in the logging.  Your information is better.

I have a possible fix.  Can you PM me an email address?
Title: Re: Problems with Perforce client
Post by: Dan on May 06, 2013, 03:44:08 pm
On a side note, I probably would have had this info sooner, but when attempting to use the file backup history to clean out extraneous debug statements I had added, the diff view was unusable.  The cursor is constantly flickering, whether trying to edit text or click the window buttons.  Not sure if someone has already mentioned this behavior yet or not.

I thought this was a KDE issue. I had one other user report this when diffing from Subversion (which is also a modal diff).  I installed KDE on my Ubuntu box, but I can't reproduce this so far.  If you think of any other special condition, please let me know.
Title: Re: Problems with Perforce client
Post by: Dan on May 06, 2013, 03:45:46 pm
On a side note, I probably would have had this info sooner, but when attempting to use the file backup history to clean out extraneous debug statements I had added, the diff view was unusable.  The cursor is constantly flickering, whether trying to edit text or click the window buttons.  Not sure if someone has already mentioned this behavior yet or not.

I thought this was a KDE issue. I had one other user report this when diffing from Subversion (which is also a modal diff).  I installed KDE on my Ubuntu box, but I can't reproduce this so far.  If you think of any other special condition, please let me know.
Title: Re: Problems with Perforce client
Post by: Dan on May 06, 2013, 03:45:59 pm
Quote
On a side note, I probably would have had this info sooner, but when attempting to use the file backup history to clean out extraneous debug statements I had added, the diff view was unusable.  The cursor is constantly flickering, whether trying to edit text or click the window buttons.  Not sure if someone has already mentioned this behavior yet or not.

I thought this was a KDE issue. I had one other user report this when diffing from Subversion (which is also a modal diff).  I installed KDE on my Ubuntu box, but I can't reproduce this so far.  If you think of any other special condition, please let me know.
Title: Re: Problems with Perforce client
Post by: shadm on May 06, 2013, 04:15:24 pm
I don't know of any special configuration I might have, except I use synergy to share my keyboard and mouse between this machine and my Windows workstation.  I have the Linux box configured as the server, so the keyboard and mouse are connected directly to my Linux workstation, which is where this is happening.

I would add that, in some additional testing, the flickering is not 100% reproducible, though I would say it's close.  One potential clue might be that if I cycle to another window or desktop (i.e. another Linux desktop, not the windows machine) and then go back to the diff window, usually the flickering has gone away.
Title: Re: Problems with Perforce client
Post by: Dan on May 06, 2013, 04:16:58 pm
I was eventually able to reproduce this, but I'm not sure why it is doing it or what is causing it yet.