リビジョン | 326 (tree) |
---|---|
日時 | 2017-02-27 12:22:22 |
作者 | mhayashi1120 |
0.9.14 release (Only in this repository not publish archive)
@@ -1,3 +1,22 @@ | ||
1 | +2017-02-21 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> | |
2 | + | |
3 | + * Release: 0.9.14 (Only update repository) | |
4 | + | |
5 | + * Fix: Eternal loop. | |
6 | + | |
7 | + * Fix: truncate some long line. | |
8 | + | |
9 | +2016-07-28 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> | |
10 | + | |
11 | + * Fix: follow cygpath change. | |
12 | + | |
13 | +2015-12-29 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> | |
14 | + | |
15 | + * Change: independent from resistry on Windows. | |
16 | + independent from mw32cmp, mw32script. | |
17 | + | |
18 | + * Add: prepare new function `fsvn-string-chomp' | |
19 | + | |
1 | 20 | 2015-11-15 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> |
2 | 21 | |
3 | 22 | * Fix: svn export is changed again. fix `fsvn-save-file' |
@@ -14,6 +14,4 @@ | ||
14 | 14 | |
15 | 15 | sudo make install |
16 | 16 | |
17 | - ** On NTEmacs read the mw32cmp.el header and complete the installation. ** | |
18 | - | |
19 | 17 | 3. If you have no `make' command simply copy *.el files to `load-path' where you want. |
@@ -415,14 +415,19 @@ | ||
415 | 415 | (catch 'found |
416 | 416 | (unless format-version |
417 | 417 | (throw 'found fsvn-svn-command-internal)) |
418 | - (let ((vers (if (stringp format-version) | |
419 | - (list format-version) | |
420 | - format-version))) | |
418 | + (let ((vers (cond | |
419 | + ((stringp format-version) | |
420 | + (list format-version)) | |
421 | + ((listp format-version) | |
422 | + format-version) | |
423 | + (t (error "Not a supported format version %s" | |
424 | + format-version))))) | |
421 | 425 | (while vers |
422 | 426 | (let ((pair (assoc (car vers) fsvn-svn-command-alist))) |
423 | 427 | (when pair |
424 | 428 | (let ((command (nth 1 pair))) |
425 | - (throw 'found command)))))) | |
429 | + (throw 'found command)))) | |
430 | + (setq vers (cdr vers)))) | |
426 | 431 | ;; default |
427 | 432 | fsvn-svn-command-internal)) |
428 | 433 |
@@ -559,7 +564,14 @@ | ||
559 | 564 | (process-file command nil t nil "help" subcommand)) |
560 | 565 | (goto-char (point-min)) |
561 | 566 | (let (ret) |
562 | - (while (re-search-forward "^ \\{2\\}\\(?:\\(--[^ ]+\\)\\|\\(-[^-]\\) +\\[\\(--[^ ]+\\)\\]\\) +\\([^ :]+\\)?" nil t) | |
567 | + (while (re-search-forward | |
568 | + (eval-when-compile | |
569 | + (concat | |
570 | + "^ \\{2\\}" | |
571 | + "\\(?:\\(--[^ ]+\\)\\|\\(-[^-]\\) +\\[\\(--[^ ]+\\)\\]\\)" | |
572 | + " +" | |
573 | + "\\([^ :]+\\)?")) | |
574 | + nil t) | |
563 | 575 | (let ((long (or (match-string 1) (match-string 3))) |
564 | 576 | (short (match-string 2)) |
565 | 577 | (arg (match-string 4)) |
@@ -574,7 +586,11 @@ | ||
574 | 586 | (save-restriction |
575 | 587 | (narrow-to-region start end) |
576 | 588 | (goto-char (point-min)) |
577 | - (while (re-search-forward "^ \\{3,\\}\\(?:\\(--[^: ]+\\)\\|\\(-[^-]\\) +(\\(--[^ ]+\\))\\)" nil t) | |
589 | + (while (re-search-forward | |
590 | + (eval-when-compile | |
591 | + (concat "^ \\{3,\\}" | |
592 | + "\\(?:\\(--[^: ]+\\)\\|\\(-[^-]\\) +(\\(--[^ ]+\\))\\)")) | |
593 | + nil t) | |
578 | 594 | (let ((long (or (match-string 1) (match-string 3))) |
579 | 595 | (short (match-string 2))) |
580 | 596 | (setq args (cons (cons (cons long short) nil) args)))) |
@@ -585,7 +601,8 @@ | ||
585 | 601 | (setq start (1+ (point))) |
586 | 602 | (forward-sexp) |
587 | 603 | (setq end (1- (point))) |
588 | - (setq args (fsvn-subcommand-parse-command-args (buffer-substring start end)))))) | |
604 | + (setq args (fsvn-subcommand-parse-command-args | |
605 | + (buffer-substring start end)))))) | |
589 | 606 | )))) |
590 | 607 | (setq args (nreverse args)) |
591 | 608 | (setq applicant |
@@ -796,7 +813,9 @@ | ||
796 | 813 | (fsvn-expand-file "auth" fsvn-svn-home-directory)) |
797 | 814 | |
798 | 815 | (defun fsvn-svn-gather-server () |
799 | - (let ((regexp (concat "^<\\(" (regexp-opt fsvn-svn-url-scheme-segment-list) "[^/\n>]+\\)>" )) | |
816 | + (let ((regexp (concat "^<\\(" | |
817 | + (regexp-opt fsvn-svn-url-scheme-segment-list) | |
818 | + "[^/\n>]+\\)>")) | |
800 | 819 | servers) |
801 | 820 | (mapc |
802 | 821 | (lambda (dir) |
@@ -861,7 +880,9 @@ | ||
861 | 880 | (control (fsvn-expand-file (fsvn-meta-dir-name) dir))) |
862 | 881 | (and (fsvn-file-exact-directory-p control) |
863 | 882 | control))) |
864 | - ((string-match (format "/%s\\($\\|/\\)" (regexp-quote (fsvn-meta-dir-name))) file) | |
883 | + ((string-match (format "/%s\\($\\|/\\)" | |
884 | + (regexp-quote (fsvn-meta-dir-name))) | |
885 | + file) | |
865 | 886 | nil) |
866 | 887 | ((fsvn-magic-file-name-absolute-p file) nil) |
867 | 888 | ;; TODO ignored status |
@@ -68,9 +68,9 @@ | ||
68 | 68 | ;; (EXPRESSION) |
69 | 69 | `(and ,@v ,res)) |
70 | 70 | ((> (length v) 2) |
71 | - (error "Malformed `and-let*'")) | |
71 | + (error "Malformed `fsvn-let*'")) | |
72 | 72 | ((not (symbolp (car v))) |
73 | - (error "Malformed `and-let*'")) | |
73 | + (error "Malformed `fsvn-let*'")) | |
74 | 74 | (t |
75 | 75 | ;; (VARIABLE EXPRESSION) |
76 | 76 | `(let ((,(car v) ,(cadr v))) |
@@ -158,6 +158,12 @@ | ||
158 | 158 | (put-text-property 0 (length string) property value string) |
159 | 159 | string) |
160 | 160 | |
161 | +(defun fsvn-string-chomp (string) | |
162 | + "Remove last newlines from STRING." | |
163 | + (if (string-match "\n+\\'" string) | |
164 | + (substring string 0 (match-beginning 0)) | |
165 | + string)) | |
166 | + | |
161 | 167 | (defmacro fsvn-string-pad (string maxlen &rest form) |
162 | 168 | `(let ((LEN (length string))) |
163 | 169 | (if (> LEN maxlen) |
@@ -92,19 +92,7 @@ | ||
92 | 92 | (defun fsvn-make-initialize (&optional suppress-warnings) |
93 | 93 | (let ((config (or (car command-line-args-left) "MAKE-CFG"))) |
94 | 94 | (setq load-path (cons "." load-path)) |
95 | - (load config) | |
96 | - (when (and (not suppress-warnings) | |
97 | - (eq system-type 'windows-nt) | |
98 | - (not (featurep 'meadow))) | |
99 | - (unless (and (file-exists-p "mw32script.el")) | |
100 | - ;; for NTEmacs | |
101 | - (princ "\n") | |
102 | - (princ "-------------------------------------------------------------\n") | |
103 | - (princ "For NTEmacs user\n") | |
104 | - (princ "To complete this installation, please read mw32cmp.el header.\n") | |
105 | - (princ "-------------------------------------------------------------\n") | |
106 | - (princ "\n") | |
107 | - (error ""))))) | |
95 | + (load config))) | |
108 | 96 | |
109 | 97 | (defun fsvn-make-compile () |
110 | 98 | (mapc |
@@ -38,9 +38,6 @@ | ||
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | -(unless (featurep 'meadow) | |
42 | - (require 'mw32cmp)) | |
43 | - | |
44 | 41 | (defgroup tortoise nil |
45 | 42 | "TortoiseSVN" |
46 | 43 | :group 'tortoise) |
@@ -160,49 +157,34 @@ | ||
160 | 157 | |
161 | 158 | ;; for cygwin |
162 | 159 | |
160 | +(defun fsvn-cygwin--call-cygpath (&rest arguments) | |
161 | + (with-temp-buffer | |
162 | + (unless (= (apply 'call-process "cygpath" nil (current-buffer) nil arguments) 0) | |
163 | + (error "cygpath is failed unexpectedly")) | |
164 | + (fsvn-string-chomp (buffer-string)))) | |
165 | + | |
163 | 166 | (defvar fsvn-cygwin-drive-prefix-dir nil) |
164 | 167 | (defun fsvn-cygwin-drive-prefix-dir () |
165 | - (with-temp-buffer | |
166 | - (when (= (call-process "cygpath" nil (current-buffer) nil "-u" "c:/") 0) | |
167 | - (substring (buffer-string) 0 -3)))) | |
168 | + (let* ((c-drive-path (fsvn-cygwin--call-cygpath "-u" "c:/")) | |
169 | + (c-drive-name (directory-file-name c-drive-path)) | |
170 | + (cygdrive-path (file-name-directory c-drive-name))) | |
171 | + (directory-file-name cygdrive-path))) | |
168 | 172 | |
169 | 173 | (defvar fsvn-cygwin-installed-folder nil) |
170 | 174 | (defun fsvn-cygwin-installed-folder () |
171 | - (or | |
172 | - (and (fsvn-win-wow64-p) | |
173 | - (condition-case nil | |
174 | - (let ((mw32cmp--force-64bit t)) | |
175 | - ;; FIXME: I don't well know about wow64, | |
176 | - ;; seems under "HKEY_LOCAL_MACHINE\SOFTWARE" key | |
177 | - ;; point to "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node" | |
178 | - ;; if 32bit program. to indicate the 64bit mode set | |
179 | - ;; work around parameter `mw32cmp--force-64bit' to `t' | |
180 | - (car (mw32-registry-get | |
181 | - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup" | |
182 | - "rootdir"))) | |
183 | - (error nil))) | |
184 | - (condition-case nil | |
185 | - ;; probably cygwin 1.7 or later | |
186 | - (car (mw32-registry-get | |
187 | - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup" | |
188 | - "rootdir")) | |
189 | - (error nil)) | |
190 | - (condition-case nil | |
191 | - ;; cygwin 1.6 or earlier | |
192 | - (car (mw32-registry-get | |
193 | - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2/" | |
194 | - "native")) | |
195 | - (error nil)))) | |
175 | + (fsvn-cygwin--call-cygpath "-w" "/")) | |
196 | 176 | |
197 | 177 | (defvar fsvn-cygwin-installed-dir nil) |
198 | 178 | (defun fsvn-cygwin-installed-dir () |
199 | - (let ((fold (fsvn-cygwin-installed-folder))) | |
200 | - (and fold | |
201 | - (file-name-as-directory (dos-to-unix-filename fold))))) | |
179 | + (let ((folder (fsvn-cygwin-installed-folder))) | |
180 | + (and folder | |
181 | + (file-name-as-directory | |
182 | + (fsvn-cygwin--call-cygpath "-m" folder))))) | |
202 | 183 | |
203 | 184 | (defvar fsvn-cygwin-guessed-installed nil) |
204 | 185 | (defun fsvn-cygwin-guessed-installed () |
205 | - (fsvn-cygwin-installed-folder)) | |
186 | + (and (executable-find "cygpath") | |
187 | + (fsvn-cygwin-installed-folder))) | |
206 | 188 | |
207 | 189 | (defun fsvn-cygwin-svn-p (&optional command) |
208 | 190 | (fsvn-let* |
@@ -4,7 +4,7 @@ | ||
4 | 4 | ;; Author: Masahiro Hayashi <mhayashi1120@gmail.com> |
5 | 5 | ;; URL: http://fsvn.sourceforge.jp/ |
6 | 6 | ;; Keywords: application |
7 | -;; Version: 0.9.13 | |
7 | +;; Version: 0.9.14 | |
8 | 8 | |
9 | 9 | ;; fsvn.el is free software; you can redistribute it and/or modify |
10 | 10 | ;; it under the terms of the GNU General Public License as published by |