Show More
@@ -193,6 +193,11 b' def rebase(ui, repo, **opts):' | |||||
193 | rebaseset = repo.revs('(children(ancestor(%r, %d)) & ::%r)::', |
|
193 | rebaseset = repo.revs('(children(ancestor(%r, %d)) & ::%r)::', | |
194 | base, dest, base) |
|
194 | base, dest, base) | |
195 |
|
195 | |||
|
196 | if rebaseset: | |||
|
197 | root = min(rebaseset) | |||
|
198 | else: | |||
|
199 | root = None | |||
|
200 | ||||
196 | if not rebaseset: |
|
201 | if not rebaseset: | |
197 | repo.ui.debug('base is ancestor of destination') |
|
202 | repo.ui.debug('base is ancestor of destination') | |
198 | result = None |
|
203 | result = None | |
@@ -202,6 +207,10 b' def rebase(ui, repo, **opts):' | |||||
202 | _("can't remove original changesets with" |
|
207 | _("can't remove original changesets with" | |
203 | " unrebased descendants"), |
|
208 | " unrebased descendants"), | |
204 | hint=_('use --keep to keep original changesets')) |
|
209 | hint=_('use --keep to keep original changesets')) | |
|
210 | elif not keepf and not repo[root].mutable(): | |||
|
211 | raise util.Abort(_("Can't rebase immutable changeset %s") | |||
|
212 | % repo[root], | |||
|
213 | hint=_('see hg help phases for details')) | |||
205 | else: |
|
214 | else: | |
206 | result = buildstate(repo, dest, rebaseset, detachf) |
|
215 | result = buildstate(repo, dest, rebaseset, detachf) | |
207 |
|
216 |
@@ -409,8 +409,8 b' class fncachestore(basicstore):' | |||||
409 | self.fncache.rewrite(existing) |
|
409 | self.fncache.rewrite(existing) | |
410 |
|
410 | |||
411 | def copylist(self): |
|
411 | def copylist(self): | |
412 | d = ('data dh fncache' |
|
412 | d = ('data dh fncache phaseroots' | |
413 |
' 00manifest.d 00manifest.i 00changelog.d 00changelog.i |
|
413 | ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i') | |
414 | return (['requires', '00changelog.i'] + |
|
414 | return (['requires', '00changelog.i'] + | |
415 | ['store/' + f for f in d.split()]) |
|
415 | ['store/' + f for f in d.split()]) | |
416 |
|
416 |
@@ -6,6 +6,8 b'' | |||||
6 | > purge= |
|
6 | > purge= | |
7 | > rebase= |
|
7 | > rebase= | |
8 | > transplant= |
|
8 | > transplant= | |
|
9 | > [phases] | |||
|
10 | > publish=False | |||
9 | > [largefiles] |
|
11 | > [largefiles] | |
10 | > minsize=2 |
|
12 | > minsize=2 | |
11 | > patterns=glob:**.dat |
|
13 | > patterns=glob:**.dat |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > theads = heads --template "{rev}: '{desc}' {branches}\n" |
|
11 | > theads = heads --template "{rev}: '{desc}' {branches}\n" |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -7,6 +7,9 b' already has one local mq patch' | |||||
7 | > rebase= |
|
7 | > rebase= | |
8 | > mq= |
|
8 | > mq= | |
9 | > |
|
9 | > | |
|
10 | > [phases] | |||
|
11 | > publish=False | |||
|
12 | > | |||
10 | > [alias] |
|
13 | > [alias] | |
11 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
14 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
12 | > EOF |
|
15 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF |
@@ -3,6 +3,9 b'' | |||||
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
|
6 | > [phases] | |||
|
7 | > publish=False | |||
|
8 | > | |||
6 | > [alias] |
|
9 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
11 | > EOF | |
@@ -269,6 +272,16 b' C onto A - rebase onto an ancestor:' | |||||
269 | |/ |
|
272 | |/ | |
270 | o 0: 'A' |
|
273 | o 0: 'A' | |
271 |
|
274 | |||
|
275 | ||||
|
276 | Check rebasing public changeset | |||
|
277 | ||||
|
278 | $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6 | |||
|
279 | $ hg rebase -d 5 -b 6 | |||
|
280 | abort: Can't rebase immutable changeset e1c4361dd923 | |||
|
281 | (see hg help phases for details) | |||
|
282 | [255] | |||
|
283 | ||||
|
284 | $ hg rebase -d 5 -b 6 --keep | |||
272 | $ cd .. |
|
285 | $ cd .. | |
273 |
|
286 | |||
274 | Test for revset |
|
287 | Test for revset |
General Comments 0
You need to be logged in to leave comments.
Login now