##// END OF EJS Templates
diffstat: fix parsing of filenames with spaces...
diffstat: fix parsing of filenames with spaces The patch changes the output of "hg diff --stat" when one file whose filename has spaces has changed, making it get the full filename instead of just the substring between the last space and the end of the filename. It also changes the diffstat generated by "hg email -d" when one of the commit messages starts with "diff". Because of the regex used to parse the filename, the diffstat generated by "hg email -d" will still be not correct if a commit message starts with "diff -r ". Before the patch Mercurial has the following behavior: $ echo "foobar">"file with spaces" $ hg add "file with spaces" $ hg diff --stat spaces | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) $ hg diff --git --stat file with spaces | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) After the patch: $ echo "foobar">"file with spaces" $ hg add "file with spaces" $ hg diff --stat file with spaces | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) $ hg diff --git --stat file with spaces | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Before the patch: $ hg add mercurial/patch.py tests/tests-diffstat.t $ hg commit -m "diffstat: fix parsing of filenames" $ hg email -d --test tip This patch series consists of 1 patches. diffstat: fix parsing of filenames [...] filenames | 0 mercurial/patch.py | 6 ++++-- tests/test-diffstat.t | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) [...] After the patch: $ hg email -d --test tip This patch series consists of 1 patches. diffstat: fix parsing of filenames [...] mercurial/patch.py | 6 ++++-- tests/test-diffstat.t | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) [...]

File last commit:

r13021:6c800e7e stable
r13395:104c9ed9 default
Show More
test-rebase-detach.t
234 lines | 2.6 KiB | text/troff | Tads3Lexer
/ tests / test-rebase-detach.t
Adrian Buehlmann
tests: unify test-rebase*
r12608 $ cat >> $HGRCPATH <<EOF
> [extensions]
> graphlog=
> rebase=
>
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
$ hg init a
$ cd a
$ echo A > A
$ hg ci -Am A
adding A
$ echo B > B
$ hg ci -Am B
adding B
$ echo C > C
$ hg ci -Am C
adding C
$ echo D > D
$ hg ci -Am D
adding D
$ hg up -q -C 0
$ echo E > E
$ hg ci -Am E
adding E
created new head
$ cd ..
Rebasing D onto E detaching from C:
$ hg clone -q -u . a a1
$ cd a1
$ hg tglog
@ 4: 'E'
|
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase --detach -s 3 -d 4
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
@ 4: 'D'
|
o 3: 'E'
|
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg manifest
A
D
E
$ cd ..
Rebasing C onto E detaching from B:
$ hg clone -q -u . a a2
$ cd a2
$ hg tglog
@ 4: 'E'
|
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase --detach -s 2 -d 4
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
@ 4: 'D'
|
o 3: 'C'
|
o 2: 'E'
|
| o 1: 'B'
|/
o 0: 'A'
$ hg manifest
A
C
D
E
$ cd ..
Rebasing B onto E using detach (same as not using it):
$ hg clone -q -u . a a3
$ cd a3
$ hg tglog
@ 4: 'E'
|
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase --detach -s 1 -d 4
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
@ 4: 'D'
|
o 3: 'C'
|
o 2: 'B'
|
o 1: 'E'
|
o 0: 'A'
$ hg manifest
A
B
C
D
E
$ cd ..
Rebasing C onto E detaching from B and collapsing:
$ hg clone -q -u . a a4
$ cd a4
$ hg tglog
@ 4: 'E'
|
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase --detach --collapse -s 2 -d 4
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
Adrian Buehlmann
tests: unify test-rebase*
r12608
$ hg tglog
@ 3: 'Collapsed revision
| * C
| * D'
o 2: 'E'
|
| o 1: 'B'
|/
o 0: 'A'
$ hg manifest
A
C
D
E
$ cd ..
Henrik Stuart
rebase: support --detach when null is common ancestor
r13021 Rebasing across null as ancestor
$ hg clone -q -U a a5
$ cd a5
$ echo x > x
$ hg add x
$ hg ci -m "extra branch"
created new head
$ hg tglog
@ 5: 'extra branch'
o 4: 'E'
|
| o 3: 'D'
| |
| o 2: 'C'
| |
| o 1: 'B'
|/
o 0: 'A'
$ hg rebase --detach -s 1 -d tip
saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@ 5: 'D'
|
o 4: 'C'
|
o 3: 'B'
|
o 2: 'extra branch'
o 1: 'E'
|
o 0: 'A'