7
7
BzrTools is a collection of useful enhancements to Bazaar.
8
8
For installation instructions, see the BzrTools home page:
9
http://wiki.bazaar.canonical.com/BzrTools.
9
http://bazaar-vcs.org/BzrTools.
10
10
Here is a sample of the frequently used commands it provides.
13
shelve, shelf, unshelve
14
-----------------------
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.
20
For example, consider a working tree with one or more changes made ... ::
23
=== modified file 'description.txt'
31
+written by Michael Ellerman
40
+perform a commit, and get
44
The ``shelve`` command interactively asks which changes
45
you want to retain in the working tree::
55
+written by Michael Ellerman
60
Keep this change? (1 of 2) [nydisq?] (n): y
68
+perform a commit, and get
72
Keep this change? (2 of 2) [nydisq?] (n): n
79
Shelve these changes, or restart? [yrsiq?] (y): y
80
Saving shelved patches to /tmp/proj/.bzr-shelf
81
Reverting shelved patches
83
description.txt | 2 +-
84
1 files changes, 1 insertions(+), 1 deletions(-)
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::
93
=== modified file 'description.txt'
101
+written by Michael Ellerman
106
Great - you're ready to commit::
108
$ bzr commit -m "improve first sentence"
110
At some later time, you can bring the shelved changes back into the
111
working tree using ``unshelve``::
114
Reapplying shelved patches
116
description.txt | 4 ++--
117
1 files changes, 2 insertions(+), 2 deletions(-)
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.)
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.