Show More
@@ -28,8 +28,40 b' def rebase(ui, repo, **opts):' | |||
|
28 | 28 | """move changeset (and descendants) to a different branch |
|
29 | 29 | |
|
30 | 30 | Rebase uses repeated merging to graft changesets from one part of |
|
31 | history onto another. This can be useful for linearizing local | |
|
32 | changes relative to a master development tree. | |
|
31 | history (the source) onto another (the destination). This can be | |
|
32 | useful for linearizing local changes relative to a master | |
|
33 | development tree. | |
|
34 | ||
|
35 | If you don't specify a destination changeset (``-d/--dest``), | |
|
36 | rebase uses the tipmost head of the current named branch as the | |
|
37 | destination. (The destination changeset is not modified by | |
|
38 | rebasing, but new changesets are added as its descendants.) | |
|
39 | ||
|
40 | You can specify which changesets to rebase in two ways: as a | |
|
41 | \"source\" changeset or as a \"base\" changeset. Both are | |
|
42 | shorthand for a topologically related set of changesets (the | |
|
43 | \"source branch\"). If you specify source (``-s/--source``), | |
|
44 | rebase will rebase that changeset and all of its descendants onto | |
|
45 | dest. If you specify base (``-b/--base``), rebase will select | |
|
46 | ancestors of base back to but not including the common ancestor | |
|
47 | with dest. Thus, ``-b`` is less precise but more convenient than | |
|
48 | ``-s``: you can specify any changeset in the source branch, and | |
|
49 | rebase will select the whole branch. If you specify neither ``-s`` | |
|
50 | nor ``-b``, rebase uses the parent of the working directory as the | |
|
51 | base. | |
|
52 | ||
|
53 | By default, rebase recreates the changesets in the source branch | |
|
54 | as descendants of dest and then destroys the originals. Use | |
|
55 | ``--keep`` to preserve the original source changesets. Some | |
|
56 | changesets in the source branch (e.g. merges from the destination | |
|
57 | branch) may be dropped if they no longer contribute any change. | |
|
58 | ||
|
59 | One result of the rules for selecting the destination changeset | |
|
60 | and source branch is that, unlike ``merge``, rebase will do | |
|
61 | nothing if you are at the latest (tipmost) head of a named branch | |
|
62 | with two heads. You need to explicitly specify source and/or | |
|
63 | destination (or ``update`` to the other head, if it's the head of | |
|
64 | the intended source branch). | |
|
33 | 65 | |
|
34 | 66 | If a rebase is interrupted to manually resolve a merge, it can be |
|
35 | 67 | continued with --continue/-c or aborted with --abort/-a. |
@@ -490,9 +522,10 b' cmdtable = {' | |||
|
490 | 522 | "rebase": |
|
491 | 523 | (rebase, |
|
492 | 524 | [ |
|
493 |
('s', 'source', '', _('rebase from |
|
|
494 |
('b', 'base', '', _('rebase from the base of |
|
|
495 | ('d', 'dest', '', _('rebase onto a given revision')), | |
|
525 | ('s', 'source', '', _('rebase from the specified changeset')), | |
|
526 | ('b', 'base', '', _('rebase from the base of the specified changeset ' | |
|
527 | '(up to greatest common ancestor of base and dest)')), | |
|
528 | ('d', 'dest', '', _('rebase onto the specified changeset')), | |
|
496 | 529 | ('', 'collapse', False, _('collapse the rebased changesets')), |
|
497 | 530 | ('', 'keep', False, _('keep original changesets')), |
|
498 | 531 | ('', 'keepbranches', False, _('keep original branch names')), |
@@ -501,6 +534,6 b' cmdtable = {' | |||
|
501 | 534 | ('c', 'continue', False, _('continue an interrupted rebase')), |
|
502 | 535 | ('a', 'abort', False, _('abort an interrupted rebase'))] + |
|
503 | 536 | templateopts, |
|
504 |
_('hg rebase [-s REV | -b REV] [-d REV] [ |
|
|
505 | '[--keep] [--keepbranches] | [-c] | [-a]')), | |
|
537 | _('hg rebase [-s REV | -b REV] [-d REV] [options]\n' | |
|
538 | 'hg rebase {-a|-c}')) | |
|
506 | 539 | } |
@@ -2,22 +2,52 b'' | |||
|
2 | 2 | |
|
3 | 3 | % Use continue and abort |
|
4 | 4 | hg rebase: cannot use both abort and continue |
|
5 |
hg rebase [-s REV | -b REV] [-d REV] [ |
|
|
5 | hg rebase [-s REV | -b REV] [-d REV] [options] | |
|
6 | hg rebase {-a|-c} | |
|
6 | 7 | |
|
7 | 8 | move changeset (and descendants) to a different branch |
|
8 | 9 | |
|
9 | 10 | Rebase uses repeated merging to graft changesets from one part of history |
|
10 | onto another. This can be useful for linearizing local changes relative to | |
|
11 | a master development tree. | |
|
11 | (the source) onto another (the destination). This can be useful for | |
|
12 | linearizing local changes relative to a master development tree. | |
|
13 | ||
|
14 | If you don't specify a destination changeset ("-d/--dest"), rebase uses | |
|
15 | the tipmost head of the current named branch as the destination. (The | |
|
16 | destination changeset is not modified by rebasing, but new changesets are | |
|
17 | added as its descendants.) | |
|
18 | ||
|
19 | You can specify which changesets to rebase in two ways: as a "source" | |
|
20 | changeset or as a "base" changeset. Both are shorthand for a topologically | |
|
21 | related set of changesets (the "source branch"). If you specify source | |
|
22 | ("-s/--source"), rebase will rebase that changeset and all of its | |
|
23 | descendants onto dest. If you specify base ("-b/--base"), rebase will | |
|
24 | select ancestors of base back to but not including the common ancestor | |
|
25 | with dest. Thus, "-b" is less precise but more convenient than "-s": you | |
|
26 | can specify any changeset in the source branch, and rebase will select the | |
|
27 | whole branch. If you specify neither "-s" nor "-b", rebase uses the parent | |
|
28 | of the working directory as the base. | |
|
29 | ||
|
30 | By default, rebase recreates the changesets in the source branch as | |
|
31 | descendants of dest and then destroys the originals. Use "--keep" to | |
|
32 | preserve the original source changesets. Some changesets in the source | |
|
33 | branch (e.g. merges from the destination branch) may be dropped if they no | |
|
34 | longer contribute any change. | |
|
35 | ||
|
36 | One result of the rules for selecting the destination changeset and source | |
|
37 | branch is that, unlike "merge", rebase will do nothing if you are at the | |
|
38 | latest (tipmost) head of a named branch with two heads. You need to | |
|
39 | explicitly specify source and/or destination (or "update" to the other | |
|
40 | head, if it's the head of the intended source branch). | |
|
12 | 41 | |
|
13 | 42 | If a rebase is interrupted to manually resolve a merge, it can be |
|
14 | 43 | continued with --continue/-c or aborted with --abort/-a. |
|
15 | 44 | |
|
16 | 45 | options: |
|
17 | 46 | |
|
18 |
-s --source rebase from |
|
|
19 |
-b --base rebase from the base of |
|
|
20 | -d --dest rebase onto a given revision | |
|
47 | -s --source rebase from the specified changeset | |
|
48 | -b --base rebase from the base of the specified changeset (up to | |
|
49 | greatest common ancestor of base and dest) | |
|
50 | -d --dest rebase onto the specified changeset | |
|
21 | 51 | --collapse collapse the rebased changesets |
|
22 | 52 | --keep keep original changesets |
|
23 | 53 | --keepbranches keep original branch names |
@@ -31,22 +61,52 b' use "hg -v help rebase" to show global o' | |||
|
31 | 61 | |
|
32 | 62 | % Use continue and collapse |
|
33 | 63 | hg rebase: cannot use collapse with continue or abort |
|
34 |
hg rebase [-s REV | -b REV] [-d REV] [ |
|
|
64 | hg rebase [-s REV | -b REV] [-d REV] [options] | |
|
65 | hg rebase {-a|-c} | |
|
35 | 66 | |
|
36 | 67 | move changeset (and descendants) to a different branch |
|
37 | 68 | |
|
38 | 69 | Rebase uses repeated merging to graft changesets from one part of history |
|
39 | onto another. This can be useful for linearizing local changes relative to | |
|
40 | a master development tree. | |
|
70 | (the source) onto another (the destination). This can be useful for | |
|
71 | linearizing local changes relative to a master development tree. | |
|
72 | ||
|
73 | If you don't specify a destination changeset ("-d/--dest"), rebase uses | |
|
74 | the tipmost head of the current named branch as the destination. (The | |
|
75 | destination changeset is not modified by rebasing, but new changesets are | |
|
76 | added as its descendants.) | |
|
77 | ||
|
78 | You can specify which changesets to rebase in two ways: as a "source" | |
|
79 | changeset or as a "base" changeset. Both are shorthand for a topologically | |
|
80 | related set of changesets (the "source branch"). If you specify source | |
|
81 | ("-s/--source"), rebase will rebase that changeset and all of its | |
|
82 | descendants onto dest. If you specify base ("-b/--base"), rebase will | |
|
83 | select ancestors of base back to but not including the common ancestor | |
|
84 | with dest. Thus, "-b" is less precise but more convenient than "-s": you | |
|
85 | can specify any changeset in the source branch, and rebase will select the | |
|
86 | whole branch. If you specify neither "-s" nor "-b", rebase uses the parent | |
|
87 | of the working directory as the base. | |
|
88 | ||
|
89 | By default, rebase recreates the changesets in the source branch as | |
|
90 | descendants of dest and then destroys the originals. Use "--keep" to | |
|
91 | preserve the original source changesets. Some changesets in the source | |
|
92 | branch (e.g. merges from the destination branch) may be dropped if they no | |
|
93 | longer contribute any change. | |
|
94 | ||
|
95 | One result of the rules for selecting the destination changeset and source | |
|
96 | branch is that, unlike "merge", rebase will do nothing if you are at the | |
|
97 | latest (tipmost) head of a named branch with two heads. You need to | |
|
98 | explicitly specify source and/or destination (or "update" to the other | |
|
99 | head, if it's the head of the intended source branch). | |
|
41 | 100 | |
|
42 | 101 | If a rebase is interrupted to manually resolve a merge, it can be |
|
43 | 102 | continued with --continue/-c or aborted with --abort/-a. |
|
44 | 103 | |
|
45 | 104 | options: |
|
46 | 105 | |
|
47 |
-s --source rebase from |
|
|
48 |
-b --base rebase from the base of |
|
|
49 | -d --dest rebase onto a given revision | |
|
106 | -s --source rebase from the specified changeset | |
|
107 | -b --base rebase from the base of the specified changeset (up to | |
|
108 | greatest common ancestor of base and dest) | |
|
109 | -d --dest rebase onto the specified changeset | |
|
50 | 110 | --collapse collapse the rebased changesets |
|
51 | 111 | --keep keep original changesets |
|
52 | 112 | --keepbranches keep original branch names |
@@ -60,22 +120,52 b' use "hg -v help rebase" to show global o' | |||
|
60 | 120 | |
|
61 | 121 | % Use continue/abort and dest/source |
|
62 | 122 | hg rebase: abort and continue do not allow specifying revisions |
|
63 |
hg rebase [-s REV | -b REV] [-d REV] [ |
|
|
123 | hg rebase [-s REV | -b REV] [-d REV] [options] | |
|
124 | hg rebase {-a|-c} | |
|
64 | 125 | |
|
65 | 126 | move changeset (and descendants) to a different branch |
|
66 | 127 | |
|
67 | 128 | Rebase uses repeated merging to graft changesets from one part of history |
|
68 | onto another. This can be useful for linearizing local changes relative to | |
|
69 | a master development tree. | |
|
129 | (the source) onto another (the destination). This can be useful for | |
|
130 | linearizing local changes relative to a master development tree. | |
|
131 | ||
|
132 | If you don't specify a destination changeset ("-d/--dest"), rebase uses | |
|
133 | the tipmost head of the current named branch as the destination. (The | |
|
134 | destination changeset is not modified by rebasing, but new changesets are | |
|
135 | added as its descendants.) | |
|
136 | ||
|
137 | You can specify which changesets to rebase in two ways: as a "source" | |
|
138 | changeset or as a "base" changeset. Both are shorthand for a topologically | |
|
139 | related set of changesets (the "source branch"). If you specify source | |
|
140 | ("-s/--source"), rebase will rebase that changeset and all of its | |
|
141 | descendants onto dest. If you specify base ("-b/--base"), rebase will | |
|
142 | select ancestors of base back to but not including the common ancestor | |
|
143 | with dest. Thus, "-b" is less precise but more convenient than "-s": you | |
|
144 | can specify any changeset in the source branch, and rebase will select the | |
|
145 | whole branch. If you specify neither "-s" nor "-b", rebase uses the parent | |
|
146 | of the working directory as the base. | |
|
147 | ||
|
148 | By default, rebase recreates the changesets in the source branch as | |
|
149 | descendants of dest and then destroys the originals. Use "--keep" to | |
|
150 | preserve the original source changesets. Some changesets in the source | |
|
151 | branch (e.g. merges from the destination branch) may be dropped if they no | |
|
152 | longer contribute any change. | |
|
153 | ||
|
154 | One result of the rules for selecting the destination changeset and source | |
|
155 | branch is that, unlike "merge", rebase will do nothing if you are at the | |
|
156 | latest (tipmost) head of a named branch with two heads. You need to | |
|
157 | explicitly specify source and/or destination (or "update" to the other | |
|
158 | head, if it's the head of the intended source branch). | |
|
70 | 159 | |
|
71 | 160 | If a rebase is interrupted to manually resolve a merge, it can be |
|
72 | 161 | continued with --continue/-c or aborted with --abort/-a. |
|
73 | 162 | |
|
74 | 163 | options: |
|
75 | 164 | |
|
76 |
-s --source rebase from |
|
|
77 |
-b --base rebase from the base of |
|
|
78 | -d --dest rebase onto a given revision | |
|
165 | -s --source rebase from the specified changeset | |
|
166 | -b --base rebase from the base of the specified changeset (up to | |
|
167 | greatest common ancestor of base and dest) | |
|
168 | -d --dest rebase onto the specified changeset | |
|
79 | 169 | --collapse collapse the rebased changesets |
|
80 | 170 | --keep keep original changesets |
|
81 | 171 | --keepbranches keep original branch names |
@@ -89,22 +179,52 b' use "hg -v help rebase" to show global o' | |||
|
89 | 179 | |
|
90 | 180 | % Use source and base |
|
91 | 181 | hg rebase: cannot specify both a revision and a base |
|
92 |
hg rebase [-s REV | -b REV] [-d REV] [ |
|
|
182 | hg rebase [-s REV | -b REV] [-d REV] [options] | |
|
183 | hg rebase {-a|-c} | |
|
93 | 184 | |
|
94 | 185 | move changeset (and descendants) to a different branch |
|
95 | 186 | |
|
96 | 187 | Rebase uses repeated merging to graft changesets from one part of history |
|
97 | onto another. This can be useful for linearizing local changes relative to | |
|
98 | a master development tree. | |
|
188 | (the source) onto another (the destination). This can be useful for | |
|
189 | linearizing local changes relative to a master development tree. | |
|
190 | ||
|
191 | If you don't specify a destination changeset ("-d/--dest"), rebase uses | |
|
192 | the tipmost head of the current named branch as the destination. (The | |
|
193 | destination changeset is not modified by rebasing, but new changesets are | |
|
194 | added as its descendants.) | |
|
195 | ||
|
196 | You can specify which changesets to rebase in two ways: as a "source" | |
|
197 | changeset or as a "base" changeset. Both are shorthand for a topologically | |
|
198 | related set of changesets (the "source branch"). If you specify source | |
|
199 | ("-s/--source"), rebase will rebase that changeset and all of its | |
|
200 | descendants onto dest. If you specify base ("-b/--base"), rebase will | |
|
201 | select ancestors of base back to but not including the common ancestor | |
|
202 | with dest. Thus, "-b" is less precise but more convenient than "-s": you | |
|
203 | can specify any changeset in the source branch, and rebase will select the | |
|
204 | whole branch. If you specify neither "-s" nor "-b", rebase uses the parent | |
|
205 | of the working directory as the base. | |
|
206 | ||
|
207 | By default, rebase recreates the changesets in the source branch as | |
|
208 | descendants of dest and then destroys the originals. Use "--keep" to | |
|
209 | preserve the original source changesets. Some changesets in the source | |
|
210 | branch (e.g. merges from the destination branch) may be dropped if they no | |
|
211 | longer contribute any change. | |
|
212 | ||
|
213 | One result of the rules for selecting the destination changeset and source | |
|
214 | branch is that, unlike "merge", rebase will do nothing if you are at the | |
|
215 | latest (tipmost) head of a named branch with two heads. You need to | |
|
216 | explicitly specify source and/or destination (or "update" to the other | |
|
217 | head, if it's the head of the intended source branch). | |
|
99 | 218 | |
|
100 | 219 | If a rebase is interrupted to manually resolve a merge, it can be |
|
101 | 220 | continued with --continue/-c or aborted with --abort/-a. |
|
102 | 221 | |
|
103 | 222 | options: |
|
104 | 223 | |
|
105 |
-s --source rebase from |
|
|
106 |
-b --base rebase from the base of |
|
|
107 | -d --dest rebase onto a given revision | |
|
224 | -s --source rebase from the specified changeset | |
|
225 | -b --base rebase from the base of the specified changeset (up to | |
|
226 | greatest common ancestor of base and dest) | |
|
227 | -d --dest rebase onto the specified changeset | |
|
108 | 228 | --collapse collapse the rebased changesets |
|
109 | 229 | --keep keep original changesets |
|
110 | 230 | --keepbranches keep original branch names |
General Comments 0
You need to be logged in to leave comments.
Login now