hns - 日記自動生成システム - Version 2.19.9

先月 2006年04月 来月
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2006年04月28日(金) 旧暦 [n年日記] [更新:"2006/04/28 09:49:14"]

#1 [Emacs] pcl-cvs ってちょっとだけ危険 ?

cvs を操作行で使っていると、あまり用心しなくて良い。 しかし pcl-cvs は逆に用心して使う必要がある。
  • (操作行では) 例えば何か必要な変更をしていて、その後に(不用意に) cvs update をすると、 変更したものは名前を変えて保存していてくれる
    ttypa:makoto@st4200 9:18:48/060428(~/cvs-work/jeedosaquin)> vi auto-index.cgi
    ttypa:makoto@st4200 9:18:56/060428(~/cvs-work/jeedosaquin)> cvs update auto-index.cgi
    (Locally modified auto-index.cgi moved to .#auto-index.cgi.1.62)
    U auto-index.cgi
    ttypa:makoto@st4200 9:19:04/060428(~/cvs-work/jeedosaquin)> 
    
  • しかし pcl-cvs で U をすると、そうならずに、問答無用に その変更分を消して古いもので上書きしてくれる
僕は rm を rm -i なんて alias するのは、いちいち聞いて来てうるさい ので決してしない。という方だから、「いつも注意して使う」ので、別に構わない のだけれど、両方が混っているのは、ちょっと良くないと思う (でも実は、切替人生も悪くないと思っているが)。

あるいは pcl-cvs の設定で、上書き禁止の指定が出来るのかな ?

U に 割当てられているのは cvs-mode-undo。 /usr/local/share/emacs/22.0.50/lisp/pcvs.el より
(defun-cvs-mode (cvs-mode-undo . SIMPLE) (flags)
  "Undo local changes to all marked files.
The file is removed and `cvs update FILE' is run."
  ;;"With prefix argument, prompt for cvs FLAGS."
  (interactive (list nil));; (cvs-flags-query 'cvs-undo-flags "undo flags")
  (if current-prefix-arg (call-interactively 'cvs-mode-revert-to-rev)
    (let* ((fis (cvs-do-removal 'undo "update" 'all))
	   (removedp (lambda (fi)
		       (or (eq (cvs-fileinfo->type fi) 'REMOVED)
			   (and (eq (cvs-fileinfo->type fi) 'CONFLICT)
				(eq (cvs-fileinfo->subtype fi) 'REMOVED)))))
	   (fis-split (cvs-partition removedp fis))
	   (fis-removed (car fis-split))
	   (fis-other (cdr fis-split)))
      (if (null fis-other)
	  (when fis-removed (cvs-mode-run "add" nil fis-removed))
	(cvs-mode-run "update" flags fis-other
		      :postproc
		      (when fis-removed
			`((with-current-buffer ,(current-buffer)
			    (cvs-mode-run "add" nil ',fis-removed)))))))))
cvs-undo-flags: これかな ..
;; (setq cvs-undo-flags "-C")
と書いて見たがどうも違うらしい。

~/.cvsrc:

上に「操作行なら何も考えなくていい」と書いたが、これはもしかして ~/.cvsrc に
update -dP -C
と設定してあるからか .. 忘れていた .. (最近の Mac OS X に標準に入っている cvs は -C が使えるかなぁ)

切替人生:

  • vi と Emacs
  • KINESIS と通常鍵盤
  • X11 と PC-Window System (切貼違い)
  • 日本語鍵盤(106)と英語鍵盤(101)
  • csh と sh
  • Perl の正規表現と Elisp の正規表現で ( ) の使い方が逆
  • 右側通行と左側通行
  • 自動変速(AT)と手動変速(MT)
  • 日本語と英語 (会話)
でも、水道の蛇口で上下に動かす型の上と下の意味が逆になっているのだけは ちょっと勘弁(切替を知る情報がない ?)。



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)