~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/user-guide/bzrtools_plugin.txt

(jameinel) Allow 'bzr serve' to interpret SIGHUP as a graceful shutdown.
 (bug #795025) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
BzrTools is a collection of useful enhancements to Bazaar.
8
8
For installation instructions, see the BzrTools home page:
9
 
http://bazaar-vcs.org/BzrTools.
 
9
http://wiki.bazaar.canonical.com/BzrTools.
10
10
Here is a sample of the frequently used commands it provides.
11
11
 
12
12
 
13
 
shelve, shelf, unshelve
14
 
-----------------------
15
 
 
16
 
These commands provide a fine-grained (patch-hunk level) undo facility.
17
 
This allows you to put aside some of your changes, commit,
18
 
and get back to where you were before.
19
 
 
20
 
For example, consider a working tree with one or more changes made ... ::
21
 
 
22
 
  $ bzr diff
23
 
  === modified file 'description.txt'
24
 
  --- description.txt
25
 
  +++ description.txt
26
 
  @@ -2,7 +2,7 @@
27
 
   ===============
28
 
   
29
 
   These plugins
30
 
  -by Michael Ellerman
31
 
  +written by Michael Ellerman
32
 
   provide a very
33
 
   fine-grained 'undo'
34
 
   facility
35
 
  @@ -11,6 +11,6 @@
36
 
   This allows you to 
37
 
   undo some of
38
 
   your changes,
39
 
  -commit, and get
40
 
  +perform a commit, and get
41
 
   back to where you
42
 
   were before.
43
 
 
44
 
The ``shelve`` command interactively asks which changes
45
 
you want to retain in the working tree::
46
 
 
47
 
  $ bzr shelve
48
 
  --- description.txt
49
 
  +++ description.txt
50
 
  @@ -2,7 +2,7 @@
51
 
   ===============
52
 
   
53
 
   These plugins
54
 
  -by Michael Ellerman
55
 
  +written by Michael Ellerman
56
 
   provide a very
57
 
   fine-grained 'undo'
58
 
   facility
59
 
 
60
 
  Keep this change? (1 of 2) [nydisq?] (n): y
61
 
  --- description.txt
62
 
  +++ description.txt
63
 
  @@ -11,6 +11,6 @@
64
 
   This allows you to 
65
 
   undo some of
66
 
   your changes,
67
 
  -commit, and get
68
 
  +perform a commit, and get
69
 
   back to where you
70
 
   were before.
71
 
 
72
 
  Keep this change? (2 of 2) [nydisq?] (n): n
73
 
 
74
 
  Status:
75
 
    description.txt
76
 
      1 hunks to be shelved
77
 
      1 hunks to be kept
78
 
 
79
 
  Shelve these changes, or restart? [yrsiq?] (y): y
80
 
  Saving shelved patches to /tmp/proj/.bzr-shelf
81
 
  Reverting shelved patches
82
 
  Diff status is now:
83
 
   description.txt | 2 +-
84
 
   1 files changes, 1 insertions(+), 1 deletions(-)
85
 
 
86
 
If there are lots of changes in the working tree, you
87
 
can provide the ``shelve`` command with a list of files
88
 
and you will only be asked about changes in those files.
89
 
After shelving changes, it's a good idea to use ``diff``
90
 
to confirm the tree has just the changes you expect::
91
 
 
92
 
  $ bzr diff
93
 
  === modified file 'description.txt'
94
 
  --- description.txt
95
 
  +++ description.txt
96
 
  @@ -2,7 +2,7 @@
97
 
   ===============
98
 
   
99
 
   These plugins
100
 
  -by Michael Ellerman
101
 
  +written by Michael Ellerman
102
 
   provide a very
103
 
   fine-grained 'undo'
104
 
   facility
105
 
 
106
 
Great - you're ready to commit::
107
 
 
108
 
  $ bzr commit -m "improve first sentence"
109
 
 
110
 
At some later time, you can bring the shelved changes back into the
111
 
working tree using ``unshelve``::
112
 
 
113
 
  $ bzr unshelve
114
 
  Reapplying shelved patches 
115
 
  Diff status is now:
116
 
   description.txt | 4 ++--
117
 
   1 files changes, 2 insertions(+), 2 deletions(-)
118
 
 
119
 
If you want to, you can put multiple items on the shelf.
120
 
Normally each time you run ``unshelve`` the most recently
121
 
shelved changes will be reinstated. However, you can also
122
 
unshelve changes in a different order by explicitly
123
 
specifying which changes to unshelve. (This works best
124
 
when the changes don't depend on each other.)
125
 
  
126
 
While you have patches on the shelf you can view and manipulate them
127
 
with the ``shelf`` command. Run ``bzr shelf -h`` for more information
128
 
about how to do this.
129
 
 
130
 
 
131
13
shell
132
14
-----
133
15