/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/en/user-guide/shelving_changes.txt

  • Committer: Martin Pool
  • Date: 2005-06-28 03:02:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050628030231-d311e4ebcd467ef4
Merge John's import-speedup branch:

                                                                                         
  777 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:32 -0500
      revision-id: john@arbash-meinel.com-20050627032031-e82a50db3863b18e
      bzr selftest was not using the correct bzr

  776 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:20:22 -0500
      revision-id: john@arbash-meinel.com-20050627032021-c9f21fde989ddaee
      Add was using an old mutter

  775 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 22:02:33 -0500
      revision-id: john@arbash-meinel.com-20050627030233-9165cfe98fc63298
      Cleaned up to be less different

  774 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:54:53 -0500
      revision-id: john@arbash-meinel.com-20050627025452-4260d0e744edef43
      Allow BZR_PLUGIN_PATH='' to negate plugin loading.

  773 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:49:34 -0500
      revision-id: john@arbash-meinel.com-20050627024933-b7158f67b7b9eae5
      Finished the previous cleanup (allowing load_plugins to be called twice)

  772 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:45:08 -0500
      revision-id: john@arbash-meinel.com-20050627024508-723b1df510d196fc
      Work on making the tests pass. versioning.py is calling run_cmd directly, but plugins have been loaded.

  771 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:32:29 -0500
      revision-id: john@arbash-meinel.com-20050627023228-79972744d7c53e15
      Got it down a little bit more by removing import of tree and inventory.

  770 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 21:26:05 -0500
      revision-id: john@arbash-meinel.com-20050627022604-350b9773ef622f95
      Reducing the number of import from bzrlib/__init__.py and bzrlib/branch.py

  769 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:32:25 -0500
      revision-id: john@arbash-meinel.com-20050627013225-32dd044f10d23948
      Updated revision.py and xml.py to include SubElement.

  768 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:56 -0500
      revision-id: john@arbash-meinel.com-20050627010356-ee66919e1c377faf
      Minor typo

  767 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 20:03:13 -0500
      revision-id: john@arbash-meinel.com-20050627010312-40d024007eb85051
      Caching the import

  766 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:51:47 -0500
      revision-id: john@arbash-meinel.com-20050627005147-5281c99e48ed1834
      Created wrapper functions for lazy import of ElementTree

  765 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:46:37 -0500
      revision-id: john@arbash-meinel.com-20050627004636-bf432902004a94c5
      Removed all of the test imports of cElementTree

  764 John Arbash Meinel <john@arbash-meinel.com>       Sun 2005-06-26 19:43:59 -0500
      revision-id: john@arbash-meinel.com-20050627004358-d137fbe9570dd71b
      Trying to make bzr startup faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Shelving Changes
2
 
================
3
 
 
4
 
Sometimes you will want to temporarily remove changes from your working
5
 
tree and restore them later, For instance to commit a small bug-fix you
6
 
found while working on something. Bazaar allows you to put changes on
7
 
a ``shelf`` to achieve this. When you want to restore the changes later
8
 
you can use ``unshelve`` to apply them to your working tree again.
9
 
 
10
 
For example, consider a working tree with one or more changes made ... ::
11
 
 
12
 
  $ bzr diff
13
 
  === modified file 'description.txt'
14
 
  --- description.txt
15
 
  +++ description.txt
16
 
  @@ -2,7 +2,7 @@
17
 
   ===============
18
 
 
19
 
   These plugins
20
 
  -by Michael Ellerman
21
 
  +written by Michael Ellerman
22
 
   provide a very
23
 
   fine-grained 'undo'
24
 
   facility
25
 
  @@ -11,6 +11,6 @@
26
 
   This allows you to
27
 
   undo some of
28
 
   your changes,
29
 
  -commit, and get
30
 
  +perform a commit, and get
31
 
   back to where you
32
 
   were before.
33
 
 
34
 
The ``shelve`` command interactively asks which changes
35
 
you want to retain in the working tree::
36
 
 
37
 
  $ bzr shelve
38
 
  --- description.txt
39
 
  +++ description.txt
40
 
  @@ -2,7 +2,7 @@
41
 
   ===============
42
 
 
43
 
   These plugins
44
 
  -by Michael Ellerman
45
 
  +written by Michael Ellerman
46
 
   provide a very
47
 
   fine-grained 'undo'
48
 
   facility
49
 
 
50
 
  Shelve? [yNfrq?]: y
51
 
  --- description.txt
52
 
  +++ description.txt
53
 
  @@ -11,6 +11,6 @@
54
 
   This allows you to
55
 
   undo some of
56
 
   your changes,
57
 
  -commit, and get
58
 
  +perform a commit, and get
59
 
   back to where you
60
 
   were before.
61
 
 
62
 
  Shelve? [yNfrq?]: n
63
 
  Shelve 2 change(s)? [yNfrq?]', 'y'
64
 
  Selected changes:
65
 
   M  description.txt
66
 
  Changes shelved with id "1".
67
 
 
68
 
If there are lots of changes in the working tree, you
69
 
can provide the ``shelve`` command with a list of files
70
 
and you will only be asked about changes in those files.
71
 
After shelving changes, it's a good idea to use ``diff``
72
 
to confirm the tree has just the changes you expect::
73
 
 
74
 
  $ bzr diff
75
 
  === modified file 'description.txt'
76
 
  --- description.txt
77
 
  +++ description.txt
78
 
  @@ -2,7 +2,7 @@
79
 
   ===============
80
 
 
81
 
   These plugins
82
 
  -by Michael Ellerman
83
 
  +written by Michael Ellerman
84
 
   provide a very
85
 
   fine-grained 'undo'
86
 
   facility
87
 
 
88
 
Great - you're ready to commit::
89
 
 
90
 
  $ bzr commit -m "improve first sentence"
91
 
 
92
 
At some later time, you can bring the shelved changes back into the
93
 
working tree using ``unshelve``::
94
 
 
95
 
  $ bzr unshelve
96
 
  Unshelving changes with id "1".
97
 
   M  description.txt
98
 
  All changes applied successfully.
99
 
 
100
 
If you want to, you can put multiple items on the shelf.
101
 
Normally each time you run ``unshelve`` the most recently
102
 
shelved changes will be reinstated. However, you can also
103
 
unshelve changes in a different order by explicitly
104
 
specifying which changes to unshelve.
105
 
 
106
 
Bazaar merges the changes in to your working tree, so they
107
 
will apply even if you have edited the files since you shelved
108
 
them, though they may conflict, in which case you will have to
109
 
resolve the conflicts in the same way you do after a conflicted
110
 
merge.