• R/O
  • SSH
  • HTTPS

fsvn: Commit


Commit MetaInfo

Revision308 (tree)
Time2014-02-07 22:00:51
Authormhayashi1120

Log Message

fix optional package name

Change Summary

Incremental Difference

--- trunk/fsvn-deps.el (revision 307)
+++ trunk/fsvn-deps.el (revision 308)
@@ -181,7 +181,7 @@
181181 ((null fsvn-svn-version) nil)
182182 ((version< fsvn-svn-version "1.7")
183183 (fsvn-meta--get-properties file propname))
184- ((and (require 'sqlite3 nil t) (sqlite3-installed-p))
184+ ((and (require 'esqlite nil t) (esqlite-sqlite-installed-p))
185185 (fsvn-meta--get-properties1.7 file propname))
186186 (t
187187 (fsvn-get-propget file propname))))
@@ -205,7 +205,7 @@
205205 (defun fsvn-deps--text-base-file1.7 (file)
206206 (let* (checksum root)
207207 (cond
208- ((and (require 'sqlite3 nil t) (sqlite3-installed-p))
208+ ((and (require 'esqlite nil t) (esqlite-sqlite-installed-p))
209209 (let* ((root&atom (fsvn-meta--get-from-nodes "checksum" file))
210210 (raw-checksum (cadr root&atom)))
211211 (setq root (car root&atom))
--- trunk/fsvn-dev.el (revision 307)
+++ trunk/fsvn-dev.el (revision 308)
@@ -397,12 +397,12 @@
397397
398398
399399
400-(defvar fsvn-sqlite3--connection-pool-size 3)
401-(defvar fsvn-sqlite3--connection-pool nil)
400+(defvar fsvn-sqlite--connection-pool-size 3)
401+(defvar fsvn-sqlite--connection-pool nil)
402402
403403 ;;TODO when file is /hoge/.svn
404404 (defun fsvn-meta--get-properties1.7 (file &optional propname)
405- ;; Must check sqlite3.el is installed at invoker
405+ ;; Must check esqlite.el is installed at invoker
406406 (fsvn-let* ((root&atom (fsvn-meta--get-from-nodes "properties" file))
407407 (atom (cadr root&atom))
408408 ((stringp atom))
@@ -413,11 +413,11 @@
413413
414414 (defun fsvn-meta--get-from-nodes (column file)
415415 (fsvn-let* ((metadir (fsvn-file-control-directory file))
416- (stream (fsvn-sqlite3-connect file metadir))
416+ (stream (fsvn-sqlite-connect file metadir))
417417 (rootdir (file-name-directory metadir))
418418 (relpath (fsvn-url-relative-name file rootdir))
419419 (relpath (if (equal relpath ".") "" relpath))
420- (data (fsvn-sqlite3-query
420+ (data (fsvn-sqlite-query
421421 stream
422422 ;;TODO local_relpath is not key.
423423 (concat
@@ -424,43 +424,43 @@
424424 (format "SELECT %s " column)
425425 (format " FROM NODES ")
426426 (format " WHERE local_relpath = '%s'"
427- (sqlite3-escape-string relpath)))))
427+ (esqlite-escape-string relpath)))))
428428 (top (car data))
429429 (atom (nth 0 top)))
430430 (list rootdir atom)))
431431
432-(defun fsvn-sqlite3-query (stream query)
432+(defun fsvn-sqlite-query (stream query)
433433 (let ((inhibit-redisplay t))
434- (sqlite3-stream-read-query stream query)))
434+ (esqlite-stream-read stream query)))
435435
436436 ;;TODO must invoke from wc top directory
437-(defun fsvn-sqlite3-connect (file &optional metadir)
437+(defun fsvn-sqlite-connect (file &optional metadir)
438438 (setq metadir (or metadir (fsvn-file-control-directory file)))
439439 (let ((wcdb (expand-file-name "wc.db" metadir)))
440440 (catch 'found
441441 (unless (file-exists-p wcdb)
442442 (throw 'found nil))
443- (dolist (s fsvn-sqlite3--connection-pool)
443+ (dolist (s fsvn-sqlite--connection-pool)
444444 (cond
445- ((not (sqlite3-stream-alive-p s))
446- (setq fsvn-sqlite3--connection-pool
447- (delq s fsvn-sqlite3--connection-pool)))
448- ((string= (sqlite3-stream-filename s) wcdb)
445+ ((not (esqlite-stream-alive-p s))
446+ (setq fsvn-sqlite--connection-pool
447+ (delq s fsvn-sqlite--connection-pool)))
448+ ((string= (esqlite-stream-filename s) wcdb)
449449 ;; move top of list
450- (setq fsvn-sqlite3--connection-pool
451- (cons s (delq s fsvn-sqlite3--connection-pool)))
450+ (setq fsvn-sqlite--connection-pool
451+ (cons s (delq s fsvn-sqlite--connection-pool)))
452452 (throw 'found s))))
453453 ;; Not found. Connect to file expiring old connection.
454- (when (> (length fsvn-sqlite3--connection-pool)
455- (1- fsvn-sqlite3--connection-pool-size))
456- (let ((rpool (reverse fsvn-sqlite3--connection-pool)))
457- (sqlite3-stream-close (car rpool))
458- (setq fsvn-sqlite3--connection-pool
454+ (when (> (length fsvn-sqlite--connection-pool)
455+ (1- fsvn-sqlite--connection-pool-size))
456+ (let ((rpool (reverse fsvn-sqlite--connection-pool)))
457+ (esqlite-stream-close (car rpool))
458+ (setq fsvn-sqlite--connection-pool
459459 (reverse (cdr rpool)))))
460460 (let ((stream (let ((inhibit-read-only t))
461- (sqlite3-stream-open wcdb))))
462- (setq fsvn-sqlite3--connection-pool
463- (cons stream fsvn-sqlite3--connection-pool))
461+ (esqlite-stream-open wcdb))))
462+ (setq fsvn-sqlite--connection-pool
463+ (cons stream fsvn-sqlite--connection-pool))
464464 stream))))
465465
466466 (defun fsvn-meta-parse-properties (text)
Show on old repository browser