How to get started with SVN integration?

Hi,

I spent a lot of time trying to get PHPStorm 8.0 working with my SVN server, and got nowhere. I tried to figure out how to do it reading the helpfiles, which I did not find helpful at all. It's like a puzzle with a thousand pieces. Somehow the descriptions hardly match what I see on my screen, maybe I'm looking in the wrong places ... And I get error messages such as "unknown error", or no error message at all, simply being sent back to the previous input screen after entering a password, no hint of what's wrong, etc.
Is there a documentation somewhere of how this is supposed to work? With screenshots and examples?
Any help appreciated.
Thanks!

Regards,
Ralf.

0

Nothing - except for the information provided in Help.

Somehow the descriptions hardly match what I see on my screen


And what do you see in your screen? Please attach screenshots

And I get error messages such as "unknown error", or no error message at all, simply being sent back to the previous input screen after entering a password, no hint of what's wrong


Screenshots of the errors plus you idea.log would be helpful. What SVN version do you work with? What protocol is being used?

0

Hi Elena,

Thanks for your reply. I would not know where to start with my screenshots. I go to a help page, try to do what´s described there and often don´t find it, or sometimes something similar with a different name. But then I don´t know if that´s actually the same. I´d have to redo the whole thing to get those shots. But then I´ll have to redo it anyway, on a second PC.

About the SVN version and protocol: I have no idea. How do I find out about that? So far I used TortoiseSVN and used right mouseclick menu commands only. Very simple.

Error messages: I´ll try to set up now and then shoot screens as they pop up.

Regards,
Ralf.

0

ok, I tried again an kept lab notes with screenshots. I´d be glad if you had a look at it. Maybe it helps you understand the difficulties I´m facing and you can tell me what I´m doing wrong and maybe can give me hint, maybe point me at the right help page.
In this process I only accessed help once. Not helpful.

Regards,
Ralf.



Attachment(s):
Subversion odyssey.pdf
0
Subversion was not there a minute ago. Then I went through a couple of menus and eventually it showed up. Why is it there sometimes and sometimes not?


You must have associated your project with subversion (VCS/Enable version control integration or VCS/ImportIntoVersionControl/Share Project main menu item)

Trying to commit a first file. There is nothing on SVN yet, so why would there be no change?

Because nothing has been added to the repository? :) Check the Changes toolwindow: Local tab shows all the files that can be added to svn or committed. For unversioned files Add is available, for modified files Commit is available.

Moving on to VCS > Import into Version control > Import into CVS (shouldn´t it be VCS? Why CVS?)


well... CVS is itself a revision control system (see http://en.wikipedia.org/wiki/Concurrent_Versions_System). Sure it has nothing to do with subversion, and attempts to configure CVS roots won't help you to set up SVN integration...
There are several way to enable SVN integration for your project:

1)To import the existing unversioned project into some svn repository you can use VCS/ImportIntoVersionControl/ImportIntoSubversion... action (action doesn't create a working copy, so you need to check out the project to the new location later) or VCS/ImportIntoVersionControl/Share Project (Subversion)... action (recommended; this action createas the local copy in the current folder, no extra checkout is necessary). The repository folder will be created by these operations. Then you can commit the files that should be added there.
2) To get the project from the repository and create working copy you need to check it out: use VCS/CheckOutFromVersionControl/Subversion... or VCS/BrowseVCSRepository/BrowseSubversionRepository... On check out performing, you can select the desired workin copy format. (1.6,1.7,1.8).
When the process is completed you are prompted to create WebStorm project from the checked out sources. The svn integration is enabled for the created project automatically.
3) To enable svn integration for some existing project (based on the svn working copy!) you can use VCS/EnableVersionControlIntegration action or
create VCS mappings in Settings/VersionControl.


I can't comment on your 'unknown errors' - I need the idea.log. But I'm not sure it makes sence as your setup is a complete mess...

0

Hi Elena,

Thanks for your answers, I really appreciate it.

You must have associated your project with subversion (VCS/Enable version control integration or VCS/ImportIntoVersionControl/Share Project main menu item)


That´s exactly what I´ve been trying to do ...


Sounds good, not on my menu.

[Image 1]

VCS/ImportIntoVersionControl/Share 
Project main menu item


Sounds good, too. That is what I actually tried and you found the results in my lab notes.

Trying to commit a first file. There is nothing on SVN yet, so why would there be no change?


>>Because nothing has been added to the repository? :)

If there is no file in the repo and there is a file in the project, that is not no change, it is the biggest possible change! It shouldn´t say "no change", it should say "no file". And that´s just the point of committing, isn´t it. Sending a file.

Check the Changes toolwindow


Good plan. I´m on my way to try and find that window ... In the lower left area, it says "Changes:" - is that it? Yes, there´s a Local tab. It shows "Default (no files)" on the top, and "Error updating changes: Unknown error" on the bottom.
Back to wild clicking. First "Refresh", does nothing. Second "Commit changes" does something. The error is gone and below "Default ..." there now is "Unversioned files ([lots of them])" and "Click to browse" which is what I do ... see the files and directories, click plus sign ("Add to VCS") - bummer.

[Image 2]



How do I make it a working copy? My best friend, F1: "There is no help for this dialog"

CVS, ok, sorry, let´s forget about that.


Then, you got three points that might contain a solution, I´ll try to distill one for me ...

1) VCS/ImportIntoVersionControl/ImportIntoSubversion


I thought I had done that already. Trying again. Clicking "Import", see my folder tree, select the root, click OK, select Depth: files, click OK, "Cannot import to svn: Unknown error"

Well, perhaps time to go on the mighty quest for the log file you mentioned. Need a treasure map. Go to Web Help, just for a laugh ... Yeah, that was fun. It sent me here:
http://www.jetbrains.com/phpstorm/webhelp/diagnosing-problems-with-subversion-integration.html

And there are even screenshots! Great joy. And you do have a sense of humour: "A screenshot is also helpful:"
Just before that, it says "... click Version Control in the Settings dialog box that opens, and then click" - and it ends there. Click what? And, no surprise, the screenshot looks totally different than what I see on my screen. Apparently what´s screenshot there has now been distributed into three tabs. Bold move. I do find most of the same points, though, and set them to the same values, meaning one change, regarding config directory. But that made no difference.

Then the doc goes on about "Module structure" to be accessed via  File | Project Structure on the main menu. Sorry again, no such thing in my main menu. Also, the logo in the screenshots is not the phpStorm logo but some Japanese sign. But the main title is clearly "PhpStorm 8.0.0 Web Help". Confused. Anyway, I came there searching for "idea.log". The only result that came up searching the Web Help. I eventually search on the page and find: "... attach the idea.log." Running in circles. Frustrating.

Next try: search the project directory. Nothing.
Yeah, I got it!!! There´s a menu item in the Help menu: Show Log in Explorer!
The path, if anyone cares: .WebIde80\system\log
Some inverse engineering finally revealed this link:
http://www.jetbrains.com/phpstorm/webhelp/reporting-issues-and-sharing-your-feedback.html#d105355e324


There´s a lot in that log file. Many error messages, mainly "File not found". Can I send the file to you privately?

But I'm not sure it makes sence as your setup is a complete mess...


Then please tell me, what else makes sense. I know there´s a mess somewhere. This is, why I have come here, asking for a way to set it all up properly, because your docs are a mess and I don´t know how else to figure it out ...

Thanks again for your efforts.

Regards, Ralf.



Attachment(s):
02 not working copy.png
01 enable version control.png
0

---

(Empty messages: Posting my message failed several times with an error message. I retried first without then with changes until it finally worked - now this morning I see all attempts have arrived - without images ...)
(This was the message, just for the record: "The page you are looking for is temporarily unavailable. Please try again later.")

0

Well... Seems you do have a working copy created, and it's version is 1.8. Your log shows that the path to command line client is not set in Settings/Version control/Subversion:

com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "svn": CreateProcess error=2, Das System kann die angegebene Datei nicht finden

That's your 'unknown error'. Please make sure to change 'svn' to a full path to your command line client (TortoiseSVN?). Then try once more to import your project using  VCS/ImportIntoVersionControl/Share Project (Subversion)

0

seems TortoiseSVN doesn't have needed binaries, so it won't work... You can try a different client - http://www.collab.net/downloads/subversion, for example

0

Are you telling your developers to change that message to something useful, please?

Thanks very much for finding the source of the problem for me. Would never have guessed that. Perhaps you could point me at the part of the documentation that I should have read?

Actually I did not have any command line client installed. Never needed one. But now I reinstalled Tortoise with command line enabled. It was not even necessary to enter the complete path in phpStorm settings, just a check mark was enough.
VCS/ImportIntoVersionControl now behaved quite a bit different. I do find it confusing, that the UI magically adapts to certain changes of settings. This time I did not even have an option to select a directory or a file - I was asked for credentials and phpStorm immediately started sharing the whole project - not what I intended, takes forever. So I cancelled the procedure and found that I can right click on parts of the project tree in the main window and then use Subversion > Share Directory ... and then Subversion > Commit Directory ... to upload it.

Something to look out for, if another noob reads this: anything deleted in the "Changes" toolwindow will be deleted EVERYWHERE without a warning. I.e. gone from project, local disk and Remote host. I expected this to be for the repo only. Learning the hard way.
(actually, not everywhere: it stays on the repo ... the only place where I wanted to remove that directory from ... And, actually, there is a popup, asking for permission to delete, but it does not mention what exactly it plans to delete ...)

So one more question, Elena: How do I remove/uncommit something from the repo? You are always welcome to point me at a relevant part of your docs/Web Help.
Oh no, next desaster: I tried the Subversion menu with a right click on an item in the Changes toolwindow, and now a dialog pops up for each individual file within that directory - no way to stop it. Spending the next half hour clicking the Cancel button. Or maybe 5 minutes of holding the ESC key.

Anyway. Otherwise I think that I now have a lot to play with and figure out how to use SVN with phpStorm without destroying both ...

Regards,
Ralf.

0

seems TortoiseSVN doesn't have needed binaries


yes, it does, see my previous reply, please.

After about half an hour of committing, the attempt ended with a connection interrupt by the host computer: [Image 03]
Failed to commit. Will send log. Any idea?



Attachment(s):
03 failed to commit.png
0
How do I remove/uncommit something from the repo?



file deleted from the working copy (i.e. deleted in the "Changes" toolwindow) is deleted locally but             also scheduled for deletion from repo upon the next commit.

You can also use the repository browser to remove files from the repository

0

No ideas. Please enable additional logging as follows:

  • add the following properties to PhpStorm.exe.vmoptions file:

         -Djavasvn.log=true
         -Djavasvn.log.native=true
         -Dsvnkit.log.native.calls=true
      See https://intellij-support.jetbrains.com/entries/23395793-Configuring-JVM-options-and-platform-properties

0

That report was for a large file that caused the problem. I have no such files. Will test again now with your debug settings and send you the log.

0

I tried again, but no error this time. I did exactly the same as before, and the directory was uploaded within seconds. The only thing that happened inbetween the tests, where I think it could matter, is that I restarted the PC.

0

Repository browser was a good keyword, thanks.
Only one problem I had with it: it only lets me delete one file or directory branch at a time. No multi-select. So to delete several files I'd still have to use Tortoise. Or is there an option I overlooked?

Then, I found this. Worth promoting a bit:
https://www.youtube.com/watch?v=OvgoBMVPyFc

0

Update: I've given up. Maybe others will have more luck with SVN+PhpStorm. For me, every attempt ended with an "Unknown Error" somewhere. Finally I switched to Git. The settings for Git are scattered all over the place in PhpStorm, and I hope it will get cleaned up in future versions. But at least I had no "Unknown Error", and the basic functions that I've been using so far seem to work fine.

0

请先登录再写评论。