##// END OF EJS Templates
rebase: choose default destination the same way as 'hg merge' (BC)...
rebase: choose default destination the same way as 'hg merge' (BC) This changeset finally make 'hg rebase' choose its default destination using the same logic as 'hg merge'. The previous default was "tipmost changeset on the current branch", the new default is "the other head if there is only one". This change has multiple consequences: - Multiple tests which were not rebasing anything (rebasing from tipmost head) are now rebasing on the other "lower" branch. This is the expected new behavior. - A test is now explicitly aborting when there is too many heads on the branch. This is the expected behavior. - We gained a better detection of the "nothing to rebase" case while performing 'hg pull --rebase' so the message have been updated. Making clearer than an update was performed and why. This is beneficial side-effect. - Rebasing from an active bookmark will behave the same as 'hg merge' from a bookmark.

File last commit:

r27626:157675d0 default
r28189:fac3a24b default
Show More
test-rebase-mq-skip.t
191 lines | 3.7 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-mq-skip.t
Matt Mackall
check-code: warning and fixes for whitespace in unified tests
r12785 This emulates the effects of an hg pull --rebase in which the remote repo
Adrian Buehlmann
tests: unify test-rebase*
r12608 already has one local mq patch
$ cat >> $HGRCPATH <<EOF
Pierre-Yves David
test: explicitly use generaldelta in 'test-rebase-mq-skip.t'...
r26916 > [format]
> usegeneraldelta=yes
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [extensions]
> rebase=
> mq=
>
Pierre-Yves David
phases: prevent rebase to rebase immutable changeset.
r15742 > [phases]
> publish=False
>
Adrian Buehlmann
tests: unify test-rebase*
r12608 > [alias]
> tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n"
> EOF
$ hg init a
$ cd a
$ hg qinit -c
$ echo c1 > c1
$ hg add c1
$ hg ci -m C1
$ echo r1 > r1
$ hg add r1
$ hg ci -m R1
$ hg up -q 0
Mads Kiilerich
tests: stabilise mq rebase tests...
r23515 $ hg qnew p0.patch -d '1 0'
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ echo p0 > p0
$ hg add p0
$ hg qref -m P0
Mads Kiilerich
tests: stabilise mq rebase tests...
r23515 $ hg qnew p1.patch -d '2 0'
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ echo p1 > p1
$ hg add p1
$ hg qref -m P1
Mads Kiilerich
check-code: fix check for trailing whitespace on sh command lines...
r17345 $ hg export qtip > p1.patch
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg up -q -C 1
$ hg import p1.patch
applying p1.patch
$ rm p1.patch
$ hg up -q -C qtip
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 $ hg rebase -v
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 2:13a46ce44f60 "P0" (p0.patch qbase)
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 resolving manifests
removing p0
getting r1
resolving manifests
getting p0
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing files:
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 p0
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing manifest
committing changelog
Mads Kiilerich
rebase: show more useful status information while rebasing...
r23517 rebasing 3:148775c71080 "P1" (p1.patch qtip)
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 resolving manifests
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 3:148775c71080 created no changes to commit
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 rebase merging completed
updating mq patch p0.patch to 5:9ecc820b1737
Matt Harbison
tests: add missing globs for Windows...
r23627 $TESTTMP/a/.hg/patches/p0.patch (glob)
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 2 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
test: explicitly use generaldelta in 'test-rebase-mq-skip.t'...
r26916 384 (changelog)
324 (manifests)
129 p0
129 p1
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-backup.hg (glob)
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 2 changesets found
Mads Kiilerich
bundle: when verbose, show what takes up the space in the generated bundle...
r23748 uncompressed size of bundle content:
Pierre-Yves David
test: explicitly use generaldelta in 'test-rebase-mq-skip.t'...
r26916 439 (changelog)
324 (manifests)
129 p0
129 p1
Mads Kiilerich
rebase: show a note for updated mq patches...
r23520 adding branch
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
rebase completed
1 revisions have been skipped
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
@ 3: 'P0' tags: p0.patch qbase qtip tip
|
o 2: 'P1' tags: qparent
|
o 1: 'R1' tags:
|
o 0: 'C1' tags:
$ cd ..
$ hg init b
$ cd b
$ hg qinit -c
$ for i in r0 r1 r2 r3 r4 r5 r6;
> do
> echo $i > $i
> hg ci -Am $i
> done
adding r0
adding r1
adding r2
adding r3
adding r4
adding r5
adding r6
$ hg qimport -r 1:tip
$ hg up -q 0
$ for i in r1 r3 r7 r8;
> do
> echo $i > $i
> hg ci -Am branch2-$i
> done
adding r1
created new head
adding r3
adding r7
adding r8
$ echo somethingelse > r4
$ hg ci -Am branch2-r4
adding r4
$ echo r6 > r6
$ hg ci -Am branch2-r6
adding r6
$ hg up -q qtip
$ HGMERGE=internal:fail hg rebase
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 rebasing 1:b4bffa6e4776 "r1" (qbase r1)
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 1:b4bffa6e4776 created no changes to commit
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 rebasing 2:c0fd129beb01 "r2" (r2)
rebasing 3:6ff5b8feed8e "r3" (r3)
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 3:6ff5b8feed8e created no changes to commit
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 rebasing 4:094320fec554 "r4" (r4)
Augie Fackler
rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc)
r18933 unresolved conflicts (see hg resolve, then hg rebase --continue)
Augie Fackler
dispatch: exit with status 1 for an InterventionRequired exception (bc)
r18935 [1]
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ HGMERGE=internal:local hg resolve --all
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
timeless
rebase: hook afterresolvedstates
r27626 continue: hg rebase --continue
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg rebase --continue
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 already rebased 1:b4bffa6e4776 "r1" (qbase r1) as 057f55ff8f44
already rebased 2:c0fd129beb01 "r2" (r2) as 1660ab13ce9a
already rebased 3:6ff5b8feed8e "r3" (r3) as 1660ab13ce9a
rebasing 4:094320fec554 "r4" (r4)
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 4:094320fec554 created no changes to commit
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 rebasing 5:681a378595ba "r5" (r5)
rebasing 6:512a1f24768b "r6" (qtip r6)
Mads Kiilerich
rebase: show warning when rebase creates no changes to commit...
r23518 note: rebase of 6:512a1f24768b created no changes to commit
Durham Goode
bundles: do not overwrite existing backup bundles (BC)...
r23835 saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 @ 8: 'r5' tags: qtip r5 tip
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
Mads Kiilerich
mq: generate patch names from first line of description...
r26736 o 7: 'r2' tags: qbase r2
Adrian Buehlmann
tests: unify test-rebase*
r12608 |
o 6: 'branch2-r6' tags: qparent
|
o 5: 'branch2-r4' tags:
|
o 4: 'branch2-r8' tags:
|
o 3: 'branch2-r7' tags:
|
o 2: 'branch2-r3' tags:
|
o 1: 'branch2-r1' tags:
|
o 0: 'r0' tags:
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..