fioan89 / sourcesync

A powerful plugin for performing one-way file synchronization for Intellij Idea and Pycharm projects
Other
89 stars 36 forks source link

Synchronization doesn't work properly for directories #35

Open AlexeyZhulyov opened 8 years ago

AlexeyZhulyov commented 8 years ago

Hi, I tried to sync some file to server where folder with this file is absent, and file with name of folder appeared on server in target path:

Server - Linux Connection Type - SCP

xayangjing commented 8 years ago

I used SFTP to upload files from windows to redhat 6.5 but failed. I got this message from pycharm eventlog windows, Sync error: Remote dir \root\flask\John might not exist or you don't have permission on this path!

apoloval commented 7 years ago

I have the same issue:

Given:

When:

Expected result:

Actual result:

p00j4 commented 7 years ago

I too face the same trying sftp from pycharm and on "syncing file to remote" fails with "Remote dir ............. not exist or you don't have permission on this path!"

any pointers?

fioan89 commented 7 years ago

@p00j4 Can you try an scp connection and see if it fails the same? Also, is your project/module configuration file stored in a different location than that where your sources are?

p00j4 commented 7 years ago

with scp,

  1. using "remote sychronize > synchronize this" fails with:

    symbols : (+):added, (/):replaced, (=):identical, (-):deleted, (?):class file not found, (^):source excluded
    1 file ignored   (my file path)
  2. using "Sync this file to remote target", shows uploaded successfully, but I can find changes reflected on remote, no idea which path it is uploading , because have checked on all related paths as given under "Root path" while setting up scp

"is your project/module configuration file stored in a different location than that where your sources are?" sorry, I didn't get it clear. I'm having a python flask project containing all related files opened in pycharm, same structure is in remote too.

fioan89 commented 7 years ago

IntelliJ/PyCharm allows you to keep your project configuration files in a different place than your sources, or, and this is more common, keep the them in the same root location where your sources are. The first option is not supported by source sync.

sing "remote sychronize > synchronize this" fails with

I don't understand :) source has only three options: synchronize this file, synchronize changed files and synchronize selected files. Which one you used? Also, I don't recognize the trace you provided, are you sure it was logged by sourcesync?

For number 2: when you created your connection configuration you provided a Root path on the remote machine. Your files should be uploaded starting from that location, plus the subsequent packages.

Let me explain: say on your local project you have a myproject/package/subpackage/module_to_import.py, and your root path is configured to /home/p00j4/myproject. When you sync module_to_import_py, sourcesync will try to upload the file at /home/p00j4/myproject/package/subpackage/module_to_import.py

Because you've used the SCP protocol which does not create folders you will have to make sure /home/p00j4/myproject/package/subpackage/ already exist on the remote machine. SSH connections can create the structure for themselves so you won't have anything to do.

On the other hand you said in step 2 that PyCharm said the file was succesfully synchronized, so I guess the structure was already there, no?