cjohansson / emacs-ssh-deploy

A deployment plugin via Tramp for Emacs.
GNU General Public License v3.0
154 stars 6 forks source link

Possible to deploy to 'localhost' ? #74

Closed MicLennartz closed 8 months ago

MicLennartz commented 8 months ago

I like to use the same approach to deploy files to 'localhost' like I do for remote servers. So I've tried to configure a local path in ssh-deploy-root-remote.

/ssh:localhost:/some/path or just ... /some/path

Browsing the remote seems to be working well, but the upload and diff functions seem to fully ignore the remote root in that case. Do you have a suggestion to solve this ?

cjohansson commented 8 months ago

Ok I tried with latest GNU ELPA version I could not reproduce issue, the unit tests also cover this specific scenario so it should work. You need to provide a detailed way to reproduce the issue please.

Steps to reproduce:

  1. Create directory ~/Downloads/test-deploy
  2. Create directory ~/Downloads/test-deploy/a
  3. Create directory ~/Downloads/test-deploy/b
  4. Create file ~/Downloads/test-deploy/a/.dir-locals.el with contents:

    ((nil . (
    
         (ssh-deploy-root-local . "~/Downloads/test-deploy/a/")
         (ssh-deploy-root-remote . "~/Downloads/test-deploy/b/")
         (ssh-deploy-on-explicit-save . 1)
    
         )))
  5. Create file ~/Downloads/test-deploy/a/test.txt enter anything and save.
  6. Verify file is created in ~/Downloads/test-deploy/b/ with identical contents.
  7. Modify contents in ~/Downloads/test-deploy/b/text.txt and save.
  8. Do a difference from directory ~/Downloads/test-deploy/a/ see that the difference is detected.
MicLennartz commented 8 months ago

I can confirm, that your example is working in my installation as well.

And I've tried to reproduce the issue in my own project, but "unfortunately" the same is working there as well now, after restarting emacs once more. I can only assume, that formerly there was some inconsistency in the runtime settings, since I've changed the variables in .dir-locals.el, while the project and files were open.

Sorry for any inconvenience.