emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ssh-deploy a3f9ec5 120/173: Now possible to define remo


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy a3f9ec5 120/173: Now possible to define remote SQL port numbers
Date: Sat, 20 Oct 2018 10:36:42 -0400 (EDT)

branch: externals/ssh-deploy
commit a3f9ec5dc8ecf7caa7551be31e62a6edfdc542c3
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Now possible to define remote SQL port numbers
---
 README.md     |  2 +-
 ssh-deploy.el | 39 +++++++++++++++++++++++++--------------
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index 2704034..4e05f30 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ Here is a list of other variables you can set globally or per 
directory:
 * `ssh-deploy-async` Enables asynchronous transfers (you need to have 
`async.el` installed as well) *(boolean)*
 * `ssh-deploy-remote-sql-database` Default database when connecting to remote 
SQL database *(string)*
 * `ssh-deploy-remote-sql-password` Default password when connecting to remote 
SQL database *(string)*
+* `ssh-deploy-remote-sql-port` - Default port when connecting to remote SQL 
database *(integer)*
 * `ssh-deploy-remote-sql-server` Default server when connecting to remote SQL 
database *(string)*
 * `ssh-deploy-remote-sql-user` Default user when connecting to remote SQL 
database *(string)*
 
@@ -55,7 +56,6 @@ You really need to do a bit of research about how to connect 
via different proto
   (ssh-deploy-on-explicit-save . t)
   (ssh-deploy-remote-sql-database . "myuser")
   (ssh-deploy-remote-sql-password . "mypassword")
-  (ssh-deploy-remote-sql-server . "myserver")
   (ssh-deploy-remote-sql-user . "myuser")
 )))
 ```
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 9565782..b0642de 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,8 +3,8 @@
 ;; Author: Christian Johansson <github.com/cjohansson>
 ;; Maintainer: Christian Johansson <github.com/cjohansson>
 ;; Created: 5 Jul 2016
-;; Modified: 1 Mar 2018
-;; Version: 1.81
+;; Modified: 2 Mar 2018
+;; Version: 1.82
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-ssh-deploy
 
@@ -133,18 +133,19 @@
 ;;
 ;; Here is a list of other variables you can set globally or per directory:
 
-;; * ssh-deploy-root-local - The local root that should be under deployment 
*(string)*
-;; * ssh-deploy-root-remote - The remote TRAMP root that is used for 
deployment *(string)*
-;; * ssh-deploy-debug - Enables debugging messages *(boolean)*
-;; * ssh-deploy-revision-folder - The folder used for storing local revisions 
*(string)*
-;; * ssh-deploy-automatically-detect-remote-changes - Enables automatic 
detection of remote changes *(boolean)*
-;; * ssh-deploy-on-explicit-save - Enabled automatic uploads on save 
*(boolean)*
-;; * ssh-deploy-exclude-list - A list defining what paths to exclude from 
deployment *(list)*
-;; * ssh-deploy-async - Enables asynchronous transfers (you need to have 
`async.el` installed as well) *(boolean)*
-;; * ssh-deploy-remote-sql-database - Default database when connecting to 
remote SQL database *(string)*
-;; * ssh-deploy-remote-sql-password - Default password when connecting to 
remote SQL database *(string)*
-;; * ssh-deploy-remote-sql-server - Default server when connecting to remote 
SQL database *(string)*
-;; * ssh-deploy-remote-sql-user - Default user when connecting to remote SQL 
database *(string)*
+;; * `ssh-deploy-root-local' - The local root that should be under deployment 
*(string)*
+;; * `ssh-deploy-root-remote' - The remote TRAMP root that is used for 
deployment *(string)*
+;; * `ssh-deploy-debug' - Enables debugging messages *(boolean)*
+;; * `ssh-deploy-revision-folder' - The folder used for storing local 
revisions *(string)*
+;; * `ssh-deploy-automatically-detect-remote-changes' - Enables automatic 
detection of remote changes *(boolean)*
+;; * `ssh-deploy-on-explicit-save' - Enabled automatic uploads on save 
*(boolean)*
+;; * `ssh-deploy-exclude-list' - A list defining what paths to exclude from 
deployment *(list)*
+;; * `ssh-deploy-async' - Enables asynchronous transfers (you need to have 
`async.el` installed as well) *(boolean)*
+;; * `ssh-deploy-remote-sql-database' - Default database when connecting to 
remote SQL database *(string)*
+;; * `ssh-deploy-remote-sql-password' - Default password when connecting to 
remote SQL database *(string)*
+;; * `ssh-deploy-remote-sql-port' - Default port when connecting to remote SQL 
database *(integer)*
+;; * `ssh-deploy-remote-sql-server' - Default server when connecting to remote 
SQL database *(string)*
+;; * `ssh-deploy-remote-sql-user' - Default user when connecting to remote SQL 
database *(string)*
 ;;
 ;; Please see README.md from the same repository for extended documentation.
 
@@ -231,6 +232,13 @@
 (put 'ssh-deploy-remote-sql-password 'permanent-local t)
 (put 'ssh-deploy-remote-sql-password 'safe-local-variable 'stringp)
 
+(defcustom ssh-deploy-remote-sql-port nil
+  "Integer variable of remote sql port, nil by default."
+  :type 'number
+  :group 'ssh-deploy)
+(put 'ssh-deploy-remote-sql-port 'permanent-local t)
+(put 'ssh-deploy-remote-sql-port 'safe-local-variable 'integerp)
+
 (defcustom ssh-deploy-remote-sql-server nil
   "String variable of remote sql server, nil by default."
   :type 'string
@@ -753,6 +761,7 @@
   (let ((sql-type (or type "mysql"))
         (old-ssh-deploy-remote-sql-database ssh-deploy-remote-sql-database)
         (old-ssh-deploy-remote-sql-password ssh-deploy-remote-sql-password)
+        (old-ssh-deploy-remote-sql-port ssh-deploy-remote-sql-port)
         (old-ssh-deploy-remote-sql-server ssh-deploy-remote-sql-server)
         (old-ssh-deploy-remote-sql-user ssh-deploy-remote-sql-user)
         (default-directory remote-path))
@@ -760,6 +769,8 @@
     (set (make-local-variable 'sql-database) 
old-ssh-deploy-remote-sql-database)
     (defvar sql-password)
     (set (make-local-variable 'sql-password) 
old-ssh-deploy-remote-sql-password)
+    (defvar sql-port)
+    (set (make-local-variable 'sql-port) old-ssh-deploy-remote-sql-port)
     (defvar sql-server)
     (set (make-local-variable 'sql-server) old-ssh-deploy-remote-sql-server)
     (defvar sql-user)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]