[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
[MD:4914] Meadow repository URL was changed (was: IME単語登録後のフォントサイズ)
- X-ml-count: 4914
- Subject: [MD:4914] Meadow repository URL was changed (was: IME単語登録後のフォントサイズ)
- From: Shun-ichi GOTO <gotoh@xxxxxxxxxxx>
- Date: Wed, 17 Mar 2004 21:37:14 +0900 (JST)
- X-mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI)
## meadow-users-jp から
思い出した。
以前LOGを消そうよ、と言った時にアレ? と思ったのだった。
>>>>> On Tue, 16 Mar 2004 08:04:43 +0900,
>>>>> 三好 == MIYOSHI Masanori wrote,
三好> 実は Meadow のソース管理用の Subversion が壊れてしまって、アクセ
三好> スできない状況が続いています。したがって、patch も Netinstall も
三好> 更新できません。
これですが、svn repository url が変更になってることが原因のようです。
新: svn+ssh://svn.meadowy.org/svnroot/public/Meadow/branches/2_00
旧: svn+ssh://svn.meadowy.org/public/Meadow/branches/2_00
checkout しなおすか、全部のWorking Copy の.svn/Entries のurl を変更すれ
ばアクセスできるはずです。
svn switch は使えません。
私は以下のcode を使って後者を行ない、
svn up はできるようになりました。
commit は未テストですが、おそらく大丈夫ではないかと。
(defun svn-change-url (dir)
(interactive "fEnter project root directory to change url: ")
;; input directory
(let* ((svndir (expand-file-name ".svn" dir))
(entry-file (expand-file-name "entries" svndir))
base)
;; ensure .svn directory is exists.
(if (or (not (file-exists-p svndir))
(not (file-directory-p svndir))
(not (file-exists-p entry-file)))
(error "It is not WC directory for subversion"))
;; take base url
(with-temp-buffer
(insert-file entry-file)
(re-search-forward "^[ \t]*url=\"\\(.*\\)\"")
(setq base (match-string 1)))
;; process for each sub directories
(let ((url (read-string "Enter new url: ")))
(svn-change-url-subr dir url base))
;; done and show log if some thing occured.
))
(defun svn-change-url-subr (dir url base)
(svn-change-url-modify (expand-file-name ".SVN/entries" dir) url base)
(let ((files (directory-files dir)))
(dolist (file files)
(when (not (member file '("." ".." ".svn")))
(let ((full (expand-file-name file dir)))
(when (and (file-directory-p full)
(file-exists-p (expand-file-name ".svn" full)))
(svn-change-url-subr full url base)))))))
(defun svn-change-url-modify (file new old)
(message "Processing %s" file)
;; remove trailing '/'
(setq old (directory-file-name old)
new (directory-file-name new))
(let ((coding-system-for-write 'raw-text)
(coding-system-for-read 'raw-text))
(with-temp-buffer
;; modify url on temporary buffer
(insert-file-contents-literally file)
(goto-char 1)
(let ((mode (file-modes file)))
(when (re-search-forward (concat "url=\""
(regexp-quote old)
"\\>") nil t)
(replace-match (concat "url=\"" new) t t)
(when (buffer-modified-p)
;; save it with considering permission
(set-file-modes file ?\666)
(write-file file))
(set-file-modes file mode))))))) ; or always use ?\444
--- Regards,
Shun-ichi Goto <gotoh@xxxxxxxxxxx>
R&D Group, TAIYO Corp., Tokyo, JAPAN