Remote directory in not trivial scenario
Hi there.
Can anyone give me advice how to solve such issue.
Let's suppose it is a server with a project. I develop remotely, because the project has very difficult infrastructire which is impossible to reproduce locally (also some of recources are availvable only from that server).
So I create a remote project (on this step phpstorm downloads all the sources locally) and working.
Tomorrow I start my day with fetching on the server updates was done by my colleagues (hg pull + hg up). Plus it is a difficult build process, that I also cannot reproduce locally (or move to local PC).
So, how am I supposed to get the new files from the server?
Please sign in to leave a comment.
From http://habrahabr.ru/blogs/php/113799/#comment_3670416
Cannot get how that is related to my question :-S
Hello Ivan,
Unfortunately, currently there's no way to download remotely changed files, please watch/vote for http://youtrack.jetbrains.net/issue/WI-1284 (see also http://youtrack.jetbrains.net/issue/WI-553).
If you disable 'Overwrite up-to-date files' option at File | Settings | Deployment | Options dialog, unchanged files won't be transferred. Also, if you enable 'Warn when uploading over newer file' option, you will get a warning when trying to upload if remote file was changed since the last sync (upload/download).
Regards,
Kirill
Really sad, I've really liked phpstorm from the first keystrokes...
Ok, will wait for such feature then and use aptana ;-)
WOW, Didnt realize that! That speed up downloat time heaps.
One of the main reasons i was wanting http://youtrack.jetbrains.net/issue/WI-553 was so that i could know what files have changed and only download those. Skip the waiting for every file that hasn't changed to download AGAIN, even though its the same file.
That option solves this issue. Awesome, Thanks Kirill! :)
That's very nice. Good to know - it may help me on several projects.
But as fasr as i can see, there is no option to ignore files that don't exist on the local project, right? So if i have lets say 100 files in different local directories from a 2000 files onlne-project, it will still download the 1900 files that are not on my local project.
Thomas
I might be wrong, but as i understand it would work, you could go to your local projects pane, hit ctrl+a to select all, right click and choose deployment->"download from yoursite.com" and it would only download the files that are selected.
That combined with the option above unchecked, so only changed files are downloaded. Then with the "CHANGES" panel open and using GIT you get a list of all the files that have just changed. each file on the changes panel list can be compared with the local latest using ctrl+d (or right click check differences.)
Its a big change in my workflow. Really happy.:)
Hi,
i just tried it. Unfortunately phpStorm downloaded all files and directories from the server. Also, in the statusbar "Collecting Files" showed all subdirectories on the server (and took a long time)...
Did i miss something? My settings are as described above. I selected three directories in my local project. They contain about 20 subdirs with 60 files. On the server there are more than 100 subdirs and a lot more files...
Thomas
try it with just one or two files. do you still see it scan everything on the server?
if i have:
/junk1/file1.php
/junk1/file2.php
/junk1/file3.php
/junk1/file4.php
/junk1/file5.php
/file1.php
/file2.php
/file3.php
/file4.php
/file5.php
and select just /file2.php then:
* right click in the PROJECT folder
* DEPLOYMENT->DOWNLOAD FROM junk.com
it will only go and look at /file1.php on junk.com and if it has changed, it will popup the warning, "some of your local files or folders may be overwritten or deleted". CONTINUE does cause the FILE TRANSFER panel to show
[2/18/11 11:03 AM] Download from junk.com complete in less than a minute: 1 file transferred (22 b/s)
Which I guess should not show that since it is supposed to be up to date.... not sure on that one.
It definately feels faster.
-- edit --
On a system with lots of files, its still slow. especially if i select a directory. Maybe adding all the individual files that are actually being used to a "favorites" view so that the files can all be selected instead of a direcrtory could work.
Hello gentelmen,
Yes, please file feature request at http://youtrack.jetbrains.net/issues/WI#newissue=yes
Yes, currently IDE compares local and remote subtrees to find out the list of files to upload/download. We will check if this can be optimized further. Let's add this case to bugreport http://youtrack.jetbrains.net/issue/WI-3268.
If I got it right, Michael suggested to select individual file(s) to invoke download for. But if you select folder(s), IDE will download all their contents.
I hope 'Synchronize view' will be more straightforward solution once we finally implement it...
Regards,
Kirill
Im not so sure that disable 'Overwrite up-to-date files' option works
This morning, i downloaded a folder i have on my local machine and on the server with that checkbox unchecked and got this:
[2/19/11 11:59 AM] Download from site.com complete in 9 minutes: 587 files transferred, 10 items failed (4.1 Kb/s)
but in my changes page only 29 files have changed.
If only 29 files changed, why download 587........?
Hello Michael,
Possible reason is that 'Preserve files timestamps' option is not enabled or does not work ('Failed to change file timestamp' balloon is shown) and your FTP server does not preserve files timestamps itself. You can check it the following way: upload some file and compare its local timestamp (use file manager) and remote one (in Remote Host view, after refreshing it just in case).
Regards,
Kirill
Thats probalby it. I do get that error a lot and one of my first actions in setting up a server is to uncheck the 'Preserve files timestamps' option
I'll have to see if its possible to get it going.
Thanks