Archive for Diary

svnコマンドでロールバック

コマンドラインでロールバックの方法を発見。

ロールバックそのものはできないけど、merge -> commit で似たことができる。
TortoiseSVNの「Revert changes from this revision」をと同義です。

$ svn merge -c -303 http://svn.example.com/repos/calc/trunk
U integer.c

$ svn status
M integer.c

$ svn diff
…
# verify that the change is removed
…

$ svn commit -m "Undoing change committed in r303."
Sending integer.c
Transmitting file data .
Committed revision 350.

mergeスイッチにはたくさんオプションがあって、様々なロールバックを行える。

Valid options:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                             A revision argument can be one of:
                                NUMBER       revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'       latest in repository
                                'BASE'       base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'       revision just before COMMITTED
  -c [--change] ARG        : the change made by revision ARG (like -r ARG-1:ARG)
                             If ARG is negative this is like -r ARG:ARG-1
  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  -q [--quiet]             : print nothing, or only summary information
  --force                  : force operation to run
  --dry-run                : try operation but make no changes
  --diff3-cmd ARG          : use ARG as merge command
  --record-only            : mark revisions as merged (use with -r)
  -x [--extensions] ARG    : Default: '-u'. When Subversion is invoking an
                             external diff program, ARG is simply passed along
                             to the program. But when Subversion is using its
                             default internal diff implementation, or when
                             Subversion is displaying blame annotations, ARG
                             could be any of the following:
                                -u (--unified):
                                   Output 3 lines of unified context.
                                -b (--ignore-space-change):
                                   Ignore changes in the amount of white space.
                                -w (--ignore-all-space):
                                   Ignore all white space.
                                --ignore-eol-style:
                                   Ignore changes in EOL style
                                -p (--show-c-function):
                                   Show C function name in diff output.
  --ignore-ancestry        : ignore ancestry when calculating merges
  --accept ARG             : specify automatic conflict resolution action
                            ('postpone', 'base', 'mine-full', 'theirs-full',
                             'edit', 'launch')
  --reintegrate            : lump-merge all of source URL's unmerged changes

http://www.rustyrazorblade.com/2007/04/06/how-to-roll-back-commits-to-an-earlier-version-of-a-repository-in-svn/


あるコミットを無かったことにする方法が書いてある。
スマートではないけど、正攻法。ダウンタイムあるのが良くない
http://timhatch.com/ark/2006/04/18/howto-svn-commit-rollback

Wikipediaに寄付してみた

Wikipediaのおかげで今までどれだけの無駄な労働を節約できたことか。
感謝の意を表して。

Wikipedia Affiliate Button

Wordpress 2.7-Beta2にしてみた

wordpress2.7

Wordpress 2.7が11月10日にリリースされる予定だったけど、2週間ほど延期らしい。

海外サイトで2.7の評判を見ているとかっこいいデザインなので早速使ってみた。

使ってみた感想。
良い点

  • フロントエンドの描画が早くなった。今までコメントが10個ぐらいつくと表示に10秒近くかかっていた
  • バックエンドのデザインがかっこよくなった。
  • Gravatarが搭載された

悪い点

  • テーマがまだまだ対応していない。
  • Simple Tagsプラグインが動かなくなる。代わりに別のプラグインを入れろと催促されるが、Simple Tagsでつけたタグが引き継がれない。→Simple Tagsのソースコード内にバージョンチェックしているところがあるので、改変すれば使える

正式リリースが楽しみです。
もっと詳しく >>

都道府県コードの仕様

都道府県のIDがJIS X 0401によって決められていた。
システムで都道府県のIDを扱うときにはこれを利用した方がいいね。

北海道
青森県
岩手県
宮城県
秋田県
山形県
福島県
茨城県
栃木県
群馬県
埼玉県
千葉県
東京都
神奈川県
新潟県
富山県
石川県
福井県
山梨県
長野県
岐阜県
静岡県
愛知県
三重県
滋賀県
京都府
大阪府
兵庫県
奈良県
和歌山県
鳥取県
島根県
岡山県
広島県
山口県
徳島県
香川県
愛媛県
高知県
福岡県
佐賀県
長崎県
熊本県
大分県
宮崎県
鹿児島県
沖縄県

上記に追加して、99はその他と定義されているっぽい。

animoto

※かっこいい音楽が鳴ります

The Tokyo Towersゲストルーム

The Tokyo Towers

26Fゲストルームからの眺め。
もっと高層階から写真撮りたい!

Macのサルベージソフト

Mac OS XのHFSなどに対応したファイル復元ソフトのリンク集。

日本語対応。

  1. Data Rescue 2: http://www.igeekinc.com/products/datarescue2.html
  2. File Salvage: http://www.fli.co.jp/product/fs6p/top.html
  3. Final Data: http://www.finaldata.jp/index.html
  4. 完全復元: http://www.junglejapan.com/products/sec/pfc/recovery.php

英語版

  1. Stellar Phoenix Macintosh(起動したとたんクラッシュ):http://www.macintosh-data-recovery.com/index.htm
  2. R-Studio for Mac Data Recovery:http://www.data-recovery-macintosh.com/
  3. その他。ここにまとまってる:http://mac-hfs-recovery.qarchive.org/

おしえるまなべる を見守る会

「おしえるまなべる」の先生数

おしえるまなべるの先生数

「おしえるまなべる」の生徒数

おしえるまなべるの生徒数

「おしえるまなべる」のトラフィック

Flickrに統計ページができてる!

今更ですが、こりゃ便利!去年の12月頃にリリースされた機能らしい。
activateして無くてもproアカウントなら使えるっぽい。

以下のURLで見られるようです!
http://www.flickr.com/photos/自分のアカウント名/stats/

http://www.flickr.com/photos/matsubokkuri/stats/

ここに詳細が書いてありました。
http://netafull.net/tech/023125.html

zenphotoのキャッシュを自動で作る

ZenPhotoのキャッシュ作成が遅い!
管理画面でキャッシュを作るためのページがあるけど、すごい遅いし、写真が大量にあるとブラウザが止まる。

ちょっと効率悪いけど、自動でキャッシュを作る方法。
↓以下のコマンドを打って、走らせておくだけ。

% wget --recursive http://www.tymy.net/~matsu/photo/ && rm -rf www.tymy.net

↓screen起動して放置中。

全ページをHTTPでアクセスして、Zenphotoにキャッシュを作らせる。
ローカルにファイルを保存したくないんだけど、そのオプションがわからなかったからとりあえず上記で。

 

リンク