Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7122848
D7865.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D7865.diff
View Options
diff --git a/src/main/phabricator/base.lisp b/src/main/phabricator/base.lisp
--- a/src/main/phabricator/base.lisp
+++ b/src/main/phabricator/base.lisp
@@ -1,5 +1,9 @@
(in-package #:forgerie-phabricator)
+(defvar *database-host* nil
+ "Database host to access.")
+(defvar *database-port* 3306
+ "Database host to access.")
(defvar *database-username* nil
"Username to access the database. If NIL, will use the current user")
(defvar *database-password* nil
diff --git a/src/main/phabricator/import.lisp b/src/main/phabricator/import.lisp
--- a/src/main/phabricator/import.lisp
+++ b/src/main/phabricator/import.lisp
@@ -56,8 +56,12 @@
*query-cache*)))
(cdr (assoc query *query-cache* :test #'string=)))
+; https://github.com/hackinghat/cl-mysql/blob/3fbf6e1421484f64c5bcf2ff3c4b96c6f0414f09/pool.lisp#L283
(defun initialize ()
- (cl-mysql:connect :user *database-username* :password *database-password*)
+ (if *database-host*
+ (cl-mysql:connect :host *database-host* :port *database-port*
+ :user *database-username* :password *database-password* )
+ (cl-mysql:connect :user *database-username* :password *database-password*))
(cl-mysql:query "set names 'utf8'"))
(defun sanitize-address (address)
diff --git a/src/main/phabricator/package.lisp b/src/main/phabricator/package.lisp
--- a/src/main/phabricator/package.lisp
+++ b/src/main/phabricator/package.lisp
@@ -1,6 +1,7 @@
(defpackage #:forgerie-phabricator (:use :cl)
(:export
- #:*database-password* #:*database-username* #:*revisions-to-skip* #:*phabricator-location*
- #:*project-assignment-overrides* #:*repository-overrides*
- #:*pastes-to-skip* #:*user-overrides* #:*storage-location* #:*confidential-space-phids*
- #:*included-repositories* #:*staging-repository* #:*email-address-sanitizer*))
+ #:*database-password* #:*database-username* #:*database-host* #:*database-port*
+ #:*revisions-to-skip* #:*phabricator-location* #:*project-assignment-overrides*
+ #:*repository-overrides* #:*pastes-to-skip* #:*user-overrides* #:*storage-location*
+ #:*confidential-space-phids* #:*included-repositories* #:*staging-repository*
+ #:*email-address-sanitizer*))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 17, 7:35 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221195
Attached To
D7865: Allow remote mysql connection
Event Timeline
Log In to Comment