bzrtools

since 2011-08-02

bzrtools は bazaar の拡張パッケージ。

http://wiki.bazaar.canonical.com/BzrTools

bzr patch

ファイルまたはURLを指定してパッチを当てる。

Windows 環境ではそもそも patch コマンドを入手するのが面倒なので、便利かも、と思ったのだが、実行したら patch がないといって怒られた。すでに patch コマンドが入っていることを前提にしているらしい。。

>bzr patch -h
Purpose: Apply a named patch to the current tree.
Usage:   bzr patch [FILENAME]

Options:
  -v, --verbose        Display more information.
  -h, --help           Show help message.
  -q, --quiet          Only display errors and warnings.
  -p ARG, --strip=ARG  Strip the smallest prefix containing num leading
                       slashes  from each file name found in the patch file.
  --usage              Show usage message and options.
  --silent             Suppress chatter.

From:     plugin "bzrtools"

意味があるのかわからないが cygwin の setup.exe で patch を入れる。環境変数 PATH の末尾に C:\cygwin\bin を追加する。

C:\work\nvda\jp2011.2>bzr patch ..\nvdajpimerpc_nishimoto.diff
cygwin warning:
  MS-DOS style path detected: C:/work/nvda/jp2011.2
  Preferred POSIX equivalent is: /cygdrive/c/work/nvda/jp2011.2
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

動いたけど厄介なことになった:

C:\work\nvda\jp2011.2>bzr status
bzr: ERROR: [Errno 13] Permission denied: u'C:/work/nvda/jp2011.2//nvdaHelper/in
terfaces/nvdaController/nvdaController.acf'

cygwin のコンソールを開く。コマンドプロンプトで bzr revert して、怒られたファイルを cygwin で chmod 644 した。これを繰り返したら、元の状態に戻せた。

ここに Patch for Windows があるので再挑戦:

失敗。なんだかまったく違う感じ。

C:\work\nvda\jp2011.2>bzr patch ..\nvdajpimerpc_nishimoto.diff
bzr: ERROR: Error invoking patch: Invalid argument
bzrtools.txt · 最終更新: 2011/08/02 20:16 by Takuya Nishimoto
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0