/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/switch_store.txt

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
often you don't want that.  You just want to do some work in the other branch,
8
8
and eventually return to this branch and work some more.
9
9
 
10
 
You could run ``bzr shelve --all`` before switching, to store the changes
 
10
You could run ``brz shelve --all`` before switching, to store the changes
11
11
safely.  So you have to know that there are uncommitted changes present, and
12
 
you have to remember to run ``bzr shelve --all``.  Then when you switch back to
 
12
you have to remember to run ``brz shelve --all``.  Then when you switch back to
13
13
the branch, you need to remember to unshelve the changes, and you need to know
14
14
what their shelf-id was.
15
15
 
21
21
 
22
22
To take an example, first we'd set up a co-located branch::
23
23
 
24
 
  $ bzr init foo
 
24
  $ brz init foo
25
25
  Created a standalone tree (format: 2a)
26
26
  $ cd foo
27
 
  $ bzr switch -b foo
 
27
  $ brz switch -b foo
28
28
 
29
29
Now create committed and uncommitted changes::
30
30
 
31
31
  $ touch committed
32
 
  $ bzr add
 
32
  $ brz add
33
33
  adding committed
34
 
  $ bzr commit -m "Add committed"
 
34
  $ brz commit -m "Add committed"
35
35
  Committing to: /home/abentley/sandbox/foo/
36
36
  added committed
37
37
  Committed revision 1.
38
38
  $ touch uncommitted
39
 
  $ bzr add
 
39
  $ brz add
40
40
  adding uncommitted
41
41
  $ ls
42
42
  committed  uncommitted
45
45
in "foo", but the committed changes are retained.
46
46
::
47
47
 
48
 
  $ bzr switch -b --store bar
 
48
  $ brz switch -b --store bar
49
49
  Uncommitted changes stored in branch "foo".
50
50
  Tree is up to date at revision 1.
51
51
  Switched to branch: /home/abentley/sandbox/foo/
55
55
Now, create uncommitted changes in "bar"::
56
56
 
57
57
  $ touch uncommitted-bar
58
 
  $ bzr add
 
58
  $ brz add
59
59
  adding uncommitted-bar
60
60
 
61
61
Finally, switch back to "foo"::
62
62
 
63
 
  $ bzr switch --store foo
 
63
  $ brz switch --store foo
64
64
  Uncommitted changes stored in branch "bar".
65
65
  Tree is up to date at revision 1.
66
66
  Switched to branch: /home/abentley/sandbox/foo/
72
72
But if you use plain switch, then it won't restore the uncommitted changes
73
73
already present::
74
74
 
75
 
  $ bzr switch bar
 
75
  $ brz switch bar
76
76
  Tree is up to date at revision 1.
77
77
  Switched to branch: /home/abentley/sandbox/foo/
78
 
  $ bzr switch --store foo
79
 
  bzr: ERROR: Cannot store uncommitted changes because this branch already
 
78
  $ brz switch --store foo
 
79
  brz: ERROR: Cannot store uncommitted changes because this branch already
80
80
  stores uncommitted changes.
81
81
 
82
82
If you're working in a branch that already has stored changes, you can restore
83
 
them with ``bzr switch . --store``::
 
83
them with ``brz switch . --store``::
84
84
 
85
 
  $ bzr shelve --all -m "Uncommitted changes from foo"
 
85
  $ brz shelve --all -m "Uncommitted changes from foo"
86
86
  Selected changes:
87
87
  -D  uncommitted
88
88
  Changes shelved with id "1".
89
 
  $ bzr switch . --store
 
89
  $ brz switch . --store
90
90
  Tree is up to date at revision 1.
91
91
  Switched to branch: /home/abentley/sandbox/foo/
92
92
  $ ls