##// END OF EJS Templates
typing: add stub functions for `cext/charencoding`...
typing: add stub functions for `cext/charencoding` I'm not sure if it's better to have a separate file, and currently pytype doesn't really know how to handle these, so it's no help in figuring that out. Technically, these methods are part of the `mercurial.cext.parsers` module, so put them into the existing stub until there's a reason to split it out.

File last commit:

r46430:21733e8c default
r52834:e58f02e2 default
Show More
test-rebase-partial.t
125 lines | 2.4 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-partial.t
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 Tests rebasing with part of the rebase set already in the
destination (issue5422)
$ cat >> $HGRCPATH <<EOF
> [extensions]
> rebase=
> drawdag=$TESTDIR/drawdag.py
>
> [experimental]
Boris Feld
config: use 'experimental.evolution.create-markers'...
r34867 > evolution.createmarkers=True
Boris Feld
config: use 'experimental.evolution.allowunstable'...
r34868 > evolution.allowunstable=True
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 >
> [alias]
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 > tglog = log -G --template "{rev}: {node|short} {desc}"
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 > EOF
$ rebasewithdag() {
Matt Harbison
tests: quote PYTHON usage...
r39743 > N=`"$PYTHON" -c "print($N+1)"`
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 > hg init repo$N && cd repo$N
> hg debugdrawdag
> hg rebase "$@" > _rebasetmp
> r=$?
> grep -v 'saved backup bundle' _rebasetmp
> [ $r -eq 0 ] && hg tglog
> cd ..
> return $r
> }
Rebase two commits, of which one is already in the right place
$ rebasewithdag -r C+D -d B <<EOF
> C
> |
> B D
> |/
> A
> EOF
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:b18e25de2cf5 D "D"
already rebased 3:26805aba1e60 C tip "C"
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: fe3b4c6498fa D
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 3: 26805aba1e60 C
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | x 2: b18e25de2cf5 D
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 1: 112478962961 B
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 426bada5c675 A
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272
Can collapse commits even if one is already in the right place
$ rebasewithdag --collapse -r C+D -d B <<EOF
> C
> |
> B D
> |/
> A
> EOF
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:b18e25de2cf5 D "D"
rebasing 3:26805aba1e60 C tip "C"
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: a2493f4ace65 Collapsed revision
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 | * D
| * C
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | x 3: 26805aba1e60 C
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | x 2: b18e25de2cf5 D
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o | 1: 112478962961 B
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 426bada5c675 A
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing...
r37013 Abort doesn't lose the commits that were already in the right place
$ hg init abort
$ cd abort
$ hg debugdrawdag <<EOF
> C
> |
> B D # B/file = B
> |/ # D/file = D
> A
> EOF
$ hg rebase -r C+D -d B
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:ef8c0fe0897b D "D"
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing...
r37013 merging file
warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Martin von Zweigbergk
errors: add config that lets user get more detailed exit codes...
r46430 [240]
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing...
r37013 $ hg rebase --abort
rebase aborted
$ hg tglog
Martin von Zweigbergk
rebase: on abort, don't strip commits that didn't need rebased (issue5822)...
r37015 o 3: 79f6d6ab7b14 C
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing...
r37013 |
Martin von Zweigbergk
rebase: on abort, don't strip commits that didn't need rebased (issue5822)...
r37015 | o 2: ef8c0fe0897b D
| |
o | 1: 594087dbaf71 B
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing...
r37013 |/
o 0: 426bada5c675 A
$ cd ..
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 Rebase with "holes". The commits after the hole should end up on the parent of
the hole (B below), not on top of the destination (A).
$ rebasewithdag -r B+D -d A <<EOF
> D
> |
> C
> |
> B
> |
> A
> EOF
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 already rebased 1:112478962961 B "B"
rebasing 3:f585351a92f8 D tip "D"
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 4: 1e6da8103bc7 D
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | x 3: f585351a92f8 D
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 | |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 | o 2: 26805aba1e60 C
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |/
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 1: 112478962961 B
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272 |
Phil Cohen
tests: add commit hashes to log commands in rebase tests...
r35386 o 0: 426bada5c675 A
Martin von Zweigbergk
rebase: allow rebase even if some revisions need no rebase (BC) (issue5422)...
r32272