~ubuntu-branches/ubuntu/lucid/bzr/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): John Francesco Ferlito
  • Date: 2009-12-16 21:43:42 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091216214342-hm3wuhzt5rvb5bei
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Shelving Changes
 
2
================
 
3
 
 
4
ときどき、作業ツリーから一時的に変更点を取り除いて、あとで元に戻したいことが\
 
5
あるかもしれません。
 
6
たとえば何か作業中に小さいバグフィックスを見つけてコミットする場合などです。
 
7
Bazaarは変更を ``shelf`` (書棚)に保存する機能を持っています。
 
8
後で変更を元に戻したくなったときは、 ``unshelve`` を使って作業ツリーに戻す\
 
9
ことができます。
 
10
 
 
11
たとえば、一つか複数の変更がされた作業ツリーを考えて見ます...::
 
12
 
 
13
  $ bzr diff
 
14
  === modified file 'description.txt'
 
15
  --- description.txt
 
16
  +++ description.txt
 
17
  @@ -2,7 +2,7 @@
 
18
   ===============
 
19
 
 
20
   These plugins
 
21
  -by Michael Ellerman
 
22
  +written by Michael Ellerman
 
23
   provide a very
 
24
   fine-grained 'undo'
 
25
   facility
 
26
  @@ -11,6 +11,6 @@
 
27
   This allows you to
 
28
   undo some of
 
29
   your changes,
 
30
  -commit, and get
 
31
  +perform a commit, and get
 
32
   back to where you
 
33
   were before.
 
34
 
 
35
``shelve`` コマンドはインタラクティブにどの変更を作業ツリーに保留して\
 
36
おきたいのかを質問します。::
 
37
 
 
38
  $ bzr shelve
 
39
  --- description.txt
 
40
  +++ description.txt
 
41
  @@ -2,7 +2,7 @@
 
42
   ===============
 
43
 
 
44
   These plugins
 
45
  -by Michael Ellerman
 
46
  +written by Michael Ellerman
 
47
   provide a very
 
48
   fine-grained 'undo'
 
49
   facility
 
50
 
 
51
  Shelve? [yNfrq?]: y
 
52
  --- description.txt
 
53
  +++ description.txt
 
54
  @@ -11,6 +11,6 @@
 
55
   This allows you to
 
56
   undo some of
 
57
   your changes,
 
58
  -commit, and get
 
59
  +perform a commit, and get
 
60
   back to where you
 
61
   were before.
 
62
 
 
63
  Shelve? [yNfrq?]: n
 
64
  Shelve 2 change(s)? [yNfrq?]', 'y'
 
65
  Selected changes:
 
66
   M  description.txt
 
67
  Changes shelved with id "1".
 
68
 
 
69
もしたくさんの変更が作業ツリーにあるのであれば、 ``shelve`` コマンド\
 
70
にファイルのリストを渡して、それらのファイルの変更だけについて質問\
 
71
されるようにすることができます。
 
72
変更を shelve した後に ``diff`` コマンドで作業ツリーに期待する変更だけが\
 
73
残っていることを確認するとよいでしょう。::
 
74
 
 
75
  $ bzr diff
 
76
  === modified file 'description.txt'
 
77
  --- description.txt
 
78
  +++ description.txt
 
79
  @@ -2,7 +2,7 @@
 
80
   ===============
 
81
 
 
82
   These plugins
 
83
  -by Michael Ellerman
 
84
  +written by Michael Ellerman
 
85
   provide a very
 
86
   fine-grained 'undo'
 
87
   facility
 
88
 
 
89
よし! - コミットする準備ができました::
 
90
 
 
91
  $ bzr commit -m "improve first sentence"
 
92
 
 
93
後になって、shelveした変更を作業ツリーに ``unshelve`` コマンドで\
 
94
戻します::
 
95
 
 
96
  $ bzr unshelve
 
97
  Unshelving changes with id "1".
 
98
   M  description.txt
 
99
  All changes applied successfully.
 
100
 
 
101
もし望むのであれば、複数のアイテムをshelfに置くことができます。
 
102
通常 ``unshelve`` が実行されるたびに最も最近 shelve された変更が\
 
103
元に戻されます。
 
104
明示的にどの変更を戻すのかを指定することで別の順序で unshelve する\
 
105
こともできます。
 
106
 
 
107
Bazaarはshelveされた後に変更があっても、shelfの変更を作業ツリーに\
 
108
マージするので、衝突が発生するかもしれません。
 
109
その場合は通常のマージ後と同じように衝突を解決しなければなりません。