Merge lp:~mbp/bzr/help into lp:bzr

Proposed by Martin Pool
Status: Work in progress
Proposed branch: lp:~mbp/bzr/help
Merge into: lp:bzr
Diff against target: 121 lines (+53/-32)
1 file modified
bzrlib/builtins.py (+53/-32)
To merge this branch: bzr merge lp:~mbp/bzr/help
Reviewer Review Type Date Requested Status
Jonathan Riddell (community) Needs Fixing
Review via email: mp+61793@code.launchpad.net

Description of the change

Better help for update and revert. (Thanks Maritza.)

To post a comment you must log in.
Revision history for this message
Jonathan Riddell (jr) wrote :

typo: "Update the a working tree"

Revision history for this message
Jonathan Riddell (jr) wrote :

"the tree's branch has changed and the tree is out of date: 'bzr commit' may tell you this."

This doesn't read quite right to me, the colon suggests to me that bzr commit is a course of action to take whereas the intention is to indicate that is will already have been run

I'd use

"the tree's branch has changed and the tree is out of date, 'bzr commit' may have warned you of this."

Revision history for this message
Martin Pool (mbp) wrote :

good idea.

Revision history for this message
Jonathan Riddell (jr) wrote :

"Revert changes files from a working tree" -> "Revert changed files from a working tree"

Revision history for this message
Jonathan Riddell (jr) wrote :

"you wish to temporarily revisit an old revision, or" might be nicer if this specified that it needs the -r flag
"you wish to temporarily revisit an old revision using '-r ARG', or"

Inconsistent quotes? Some places use ' some `` and one "

review: Needs Fixing
Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Fri, May 20, 2011 at 16:01:42 -0000, Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/help into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> For more details, see:
> https://code.launchpad.net/~mbp/bzr/help/+merge/61793
>
> Better help for update and revert. (Thanks Maritza.)

I like the new text! It has a couple of mentions of 'basis revision',
which might not be clear. Is there user explanation for that somewhere?
A quick grep doesn't find it, but perhaps I worry overly.

update has:

> + The new basis revision is by default the tip of the tree's branch, or
...

> + Any uncommitted changes in the working tree relative to the current basis
> + revision are carried across, by merging them into the new basis revision.

and revert:
> + Revert changes files from a working tree (or by default the whole tree) to be
> + the same as the files in the basis revision of the tree (or whatever revision
> + is specified with -r.)

Wouter van Heyst

Revision history for this message
Vincent Ladeuil (vila) wrote :

Can a native English speaker integrates all the useful remarks in that already well improved text ?

Revision history for this message
Martin Pool (mbp) wrote :

I will, I've just been away.

Unmerged revisions

5906. By Martin Pool

Better help for cmd_revert.

5905. By Martin Pool

Better help for cmd_update

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/builtins.py'
2--- bzrlib/builtins.py 2011-05-18 12:18:39 +0000
3+++ bzrlib/builtins.py 2011-05-20 16:02:21 +0000
4@@ -1429,23 +1429,28 @@
5
6
7 class cmd_update(Command):
8- __doc__ = """Update a tree to have the latest code committed to its branch.
9-
10- This will perform a merge into the working tree, and may generate
11- conflicts. If you have any local changes, you will still
12- need to commit them after the update for the update to be complete.
13-
14- If you want to discard your local changes, you can just do a
15- 'bzr revert' instead of 'bzr commit' after the update.
16+ __doc__ = """Update the a working tree to be based on a new revision.
17+
18+ The new basis revision is by default the tip of the tree's branch, or
19+ whatever is specified by the --revision option. If the tree's branch is
20+ bound to a master branch, it will update the branch from the master, and
21+ then update the working tree.
22+
23+ Any uncommitted changes in the working tree relative to the current basis
24+ revision are carried across, by merging them into the new basis revision.
25+ This merge may generate conflicts, in which case you may have to resolve
26+ them before doing other work.
27+
28+ Use 'bzr update' when:
29+ * you wish to temporarily revisit an old revision, or
30+ * the tree's branch has changed and the tree is out of date: 'bzr
31+ commit' may tell you this.
32
33 If you want to restore a file that has been removed locally, use
34 'bzr revert' instead of 'bzr update'.
35-
36- If the tree's branch is bound to a master branch, it will also update
37- the branch from the master.
38 """
39
40- _see_also = ['pull', 'working-trees', 'status-flags']
41+ _see_also = ['pull', 'working-trees', 'status-flags', 'conflicts', 'resolve']
42 takes_args = ['dir?']
43 takes_options = ['revision',
44 Option('show-base',
45@@ -4300,17 +4305,33 @@
46
47
48 class cmd_revert(Command):
49- __doc__ = """Revert files to a previous revision.
50-
51- Giving a list of files will revert only those files. Otherwise, all files
52- will be reverted. If the revision is not specified with '--revision', the
53- last committed revision is used.
54-
55- To remove only some changes, without reverting to a prior version, use
56- merge instead. For example, "merge . -r -2..-3" (don't forget the ".")
57- will remove the changes introduced by the second last commit (-2), without
58- affecting the changes introduced by the last commit (-1). To remove
59- certain changes on a hunk-by-hunk basis, see the shelve command.
60+ __doc__ = """Revert working tree files to a previous revision.
61+
62+ Revert changes files from a working tree (or by default the whole tree) to be
63+ the same as the files in the basis revision of the tree (or whatever revision
64+ is specified with -r.)
65+
66+ Uses for 'bzr revert':
67+ * You have made changes in the working tree, and want to discard your
68+ changes and go back to the previously-committed tree.
69+ * You have started a merge and not yet committed it, and you want to
70+ discard the work done towards it.
71+ * You want to undo all the changes made in a file and to take it back
72+ to exactly the text it had in a previous version.
73+ * Use the 'revert --forget-merges' to clear the pending-merge list,
74+ without reverting the tree.
75+
76+ Instead of 'bzr revert':
77+ * Use 'bzr update' if you want to temporarily revisit a previous
78+ revision.
79+ * Use 'bzr merge' with a reversed revision range if you want to undo
80+ only some changes to a file. For example, "merge . -r -2..-3" (don't
81+ forget the ".") will remove the changes introduced by the second last
82+ commit (-2), without affecting the changes introduced by the last
83+ commit (-1).
84+ * Use 'bzr shelve' to remove just some changes on a hunk-by-hunk basis.
85+ * Use 'bzr clean-tree' to delete unversioned or ignored files from the
86+ tree.
87
88 By default, any files that have been manually changed will be backed up
89 first. (Files changed only by merge are not backed up.) Backup files have
90@@ -4326,14 +4347,14 @@
91 created as above. Directories containing unknown files will not be
92 deleted.
93
94- The working tree contains a list of revisions that have been merged but
95- not yet committed. These revisions will be included as additional parents
96- of the next commit. Normally, using revert clears that list as well as
97- reverting the files. If any files are specified, revert leaves the list
98- of uncommitted merges alone and reverts only the files. Use ``bzr revert
99- .`` in the tree root to revert all files but keep the recorded merges,
100- and ``bzr revert --forget-merges`` to clear the pending merge list without
101- reverting any files.
102+ The working tree contains a list of 'pending merged' revisions that have
103+ been merged but not yet committed. These revisions will be included as
104+ additional parents of the next commit. Normally, using revert clears that
105+ list as well as reverting the files. If any files are specified, revert
106+ leaves the list of uncommitted merges alone and reverts only the files.
107+ Use ``bzr revert .`` in the tree root to revert all files but keep the
108+ recorded merges, and ``bzr revert --forget-merges`` to clear the pending
109+ merge list without reverting any files.
110
111 Using "bzr revert --forget-merges", it is possible to apply all of the
112 changes from a branch in a single revision. To do this, perform the merge
113@@ -4346,7 +4367,7 @@
114 target branches.
115 """
116
117- _see_also = ['cat', 'export', 'merge', 'shelve']
118+ _see_also = ['cat', 'export', 'merge', 'shelve', 'clean-tree', 'update']
119 takes_options = [
120 'revision',
121 Option('no-backup', "Do not save backups of reverted files."),