2012年9月20日木曜日

メイン PC が死亡しました…

最後に電源落ちる前後、何やらコゲ臭いにおいがしてたので…
マザーか CPU か電源が死んでると思われ。

この前、サーバー用 PC のマザボ変えたばっかりなのに(泣)
ああ、出費が…orz

2012年9月5日水曜日

Meadow の psvn で ediff できない

psvn で ediff を使おうとすると、エラーになった。
メッセージを見るに、どうやらパス表記が windows 形式 (c:/meadow/~ など) になっているのが原因で、 cygwin の svn コマンドが反応してくれないみたいだ。

ネットで対応を捜してみても、これといった情報がない…orz
仕方ないので、自分でソースコードを見てみる。

とりあえず、下記の修正で動いたんで後世のためにメモっておく。
※パッチファイルはこちら
*** psvn.el.org 2012-09-05 00:38:02.028739400 +0900
--- psvn.el 2012-09-05 00:42:21.717592800 +0900
***************
*** 6036,6042 ****
(defun svn-status-base-dir (&optional start-directory)
"Find the svn root directory for the current working copy.
Return nil, if not in a svn working copy."
! (let* ((start-dir (expand-file-name (or start-directory default-directory)))
(base-dir (gethash start-dir svn-status-base-dir-cache 'not-found)))
;;(message "svn-status-base-dir: %S %S" start-dir base-dir)
(if (not (eq base-dir 'not-found))
--- 6036,6042 ----
(defun svn-status-base-dir (&optional start-directory)
"Find the svn root directory for the current working copy.
Return nil, if not in a svn working copy."
! (let* ((start-dir (replace-regex-in-string "[\n\r]quot; "" (shell-command-to-string (concat "cygpath " (expand-file-name (or start-directory default-directory))))))
(base-dir (gethash start-dir svn-status-base-dir-cache 'not-found)))
;;(message "svn-status-base-dir: %S %S" start-dir base-dir)
(if (not (eq base-dir 'not-found))
***************
*** 6047,6053 ****
(repository-root (svn-status-repo-for-path base-dir))
(dot-svn-dir (concat base-dir (svn-wc-adm-dir-name)))
(in-tree (and repository-root (file-exists-p dot-svn-dir)))
! (dir-below (expand-file-name base-dir)))
;; (message "repository-root: %s start-dir: %s" repository-root start-dir)
(if (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 3))
(setq base-dir (svn-status-base-dir-for-ancient-svn-client start-dir)) ;; svn version < 1.3
--- 6047,6053 ----
(repository-root (svn-status-repo-for-path base-dir))
(dot-svn-dir (concat base-dir (svn-wc-adm-dir-name)))
(in-tree (and repository-root (file-exists-p dot-svn-dir)))
! (dir-below (replace-regex-in-string "[\n\r]quot; "" (shell-command-to-string (concat "cygpath " (expand-file-name base-dir))))))
;; (message "repository-root: %s start-dir: %s" repository-root start-dir)
(if (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 3))
(setq base-dir (svn-status-base-dir-for-ancient-svn-client start-dir)) ;; svn version < 1.3
…まあ、パスの置き換えに cygwin のコマンドを呼び出して使ってたり、
そのコマンドの出力に改行がついてたから単純に置換したり…と
かなり汚いコードになってしまった(-_-;)が、とりあえず動いたからいいや。

EXCEL での正規表現置換

エクセルで、"No" の後の数字を一括で A1 セルで指定した内容に置換したくて REGEXREPLACE(B10,"(No)[0-9]+","$1"&A1) と書いたらエラーになった。なんで?  "...