/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/ja/user-guide/using_aliases.txt

  • Committer: Vincent Ladeuil
  • Date: 2009-06-30 15:54:23 UTC
  • mto: (4496.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4497.
  • Revision ID: v.ladeuil+lp@free.fr-20090630155423-afousrl3zrdx0he2
Fixed as per jam's review.

* tests/blackbox/test_push.py:
(load_tests): One more changes type.
(TestPushStrictMixin): Switch to using mixin, it's clearer.
Define some default values as attributes so that they can be
changed more easily.
(TestPushStrictMixin.assertPushFails,
TestPushStrictMixin.assertPushSucceeds): Use default values from
attributes.
(TestPushStrictWithChanges._out_of_sync_trees): Setup a new
context and change the default values.

* errors.py:
(OutOfDateTree, UncommittedChanges): Add a more parameter so more
details can be given.

* builtins.py:
(cmd_push.run): Add an additional check that the tree is still in
sync with its branch before pushing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
エイリアスを利用する
2
 
====================
3
 
 
4
 
エイリアスとは?
5
 
-----------------
6
 
 
7
 
エイリアスは良く入力するコマンド用のショートカットを作る
8
 
もしくはコマンド用のデフォルトを設定するための手軽な方法です。
9
 
 
10
 
エイリアスを定義する
11
 
---------------------
12
 
 
13
 
コマンドのエイリアスは ``bazaar.conf`` ファイルの ``[ALIASES]`` セクションで定義されます。
14
 
エイリアスはエイリアスの名前で始まり、等号(=)、コマンド列が続きます。
15
 
次のコードはALIASESセクションの例です::
16
 
 
17
 
    [ALIASES]
18
 
    recentlog=log -r-3..-1
19
 
    ll=log --line -r-10..-1
20
 
    commit=commit --strict
21
 
    diff=diff --diff-options -p
22
 
 
23
 
上記の例の説明は次のとおりです:
24
 
 
25
 
 * 最初のエイリアスは最新の3つのリビジョンに対するログを表示する新しい ``recentlog`` コマンドを作ります
26
 
 *  ``ll`` エイリアスは行形式で最新の10件のログエントリを表示します。
27
 
 *  ``commit`` エイリアスはツリーの中の新しいファイルが認知されない場合コミットを拒絶するデフォルトのcommitを設定します。
28
 
 *  ``diff`` エイリアスは -pオプションをdiffに追加します
29
 
 
30
 
定義したエイリアスを利用する
31
 
-----------------------------
32
 
 
33
 
上記で定義されたエイリアスは次のように使われます: ::
34
 
 
35
 
   % bzr recentlog
36
 
   % bzr ll
37
 
   % bzr commit
38
 
   % bzr diff
39
 
 
40
 
エイリアスのためのルール
41
 
-------------------------
42
 
 
43
 
 * コマンドライン上で新しいオプションを指定することでエイリアスに渡されるオプションの一部をオーバーライドできます。
44
 
   たとえば、 ``lastlog -r-5..`` を実行すると 10の代わりに行ベースのログエントリが5つだけ得られます。
45
 
   すべての論理値型のオプションは暗黙的に逆のオプションがあるので、 ``commit --no-strict`` でcommitのエイリアスをオーバーライドできます。
46
 
 
47
 
 * エイリアスの名前をオリジナルのコマンドと同じものにすることでエイリアスは既存のコマンドの標準のふるまいをオーバーライドできます。
48
 
   たとえば、デフォルトのコミットは ``commit=commit --strict`` で変更されます。
49
 
 
50
 
 * エイリアスは他のエイリアスを参照できません。言い換えると エイリアスの ``lastlog`` を作りそれを ``ll`` で参照しても動作しません。
51
 
   これは標準のコマンドをオーバーライドするエイリアスを含みます。
52
 
 
53
 
 *   ``--no-aliases`` オプションをbzrのコマンドに渡すと実行時にエイリアスは無視されます。
54
 
   たとえば、 ``bzr --no-aliases commit`` を実行すると ``commit --strict`` ではなく標準のcomitコマンドが実行されます。
55