##// 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:

r12943:7439ea41 stable
r13395:104c9ed9 default
Show More
test-convert-svn-encoding.t
135 lines | 5.0 KiB | text/troff | Tads3Lexer
/ tests / test-convert-svn-encoding.t
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat > $HGRCPATH <<EOF
> [extensions]
> convert =
> graphlog =
> EOF
$ svnadmin create svn-repo
$ svnadmin load -q svn-repo < "$TESTDIR/svn/encoding.svndump"
Convert while testing all possible outputs
$ hg --debug convert svn-repo A-hg
initializing destination A-hg repository
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 run hg sink pre-conversion action
scanning source...
found trunk at 'trunk'
found tags at 'tags'
found branches at 'branches'
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 found branch branch\xc3\xa9 at 5 (esc)
found branch branch\xc3\xa9e at 6 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 scanning: 1 revisions
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/trunk (glob)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 fetching revision log for "/trunk" from 4 to 0
parsing revision 4 (2 changes)
parsing revision 3 (4 changes)
parsing revision 2 (3 changes)
parsing revision 1 (3 changes)
no copyfrom path, don't know what to do.
'/branches' is not under '/trunk', ignoring
'/tags' is not under '/trunk', ignoring
scanning: 2 revisions
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 fetching revision log for "/branches/branch\xc3\xa9" from 5 to 0 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 parsing revision 5 (1 changes)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 found parent of branch /branches/branch\xc3\xa9 at 4: /trunk (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 scanning: 3 revisions
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 fetching revision log for "/branches/branch\xc3\xa9e" from 6 to 0 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 parsing revision 6 (1 changes)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 found parent of branch /branches/branch\xc3\xa9e at 5: /branches/branch\xc3\xa9 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 scanning: 4 revisions
scanning: 5 revisions
scanning: 6 revisions
sorting...
converting...
5 init projA
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
converting: 0/6 revisions (0.00%)
4 hello
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
converting: 1/6 revisions (16.67%)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/trunk (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xa0 0/3 (0.00%) (esc)
scanning paths: /trunk/\xc3\xa0/e\xcc\x81 1/3 (33.33%) (esc)
scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc)
\xc3\xa0/e\xcc\x81 (esc)
getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc)
\xc3\xa9 (esc)
getting files: \xc3\xa9 2/2 (100.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 3 copy files
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
converting: 2/6 revisions (33.33%)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xa0 0/4 (0.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 gone from -1
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/trunk (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xa8 1/4 (25.00%) (esc)
copied to \xc3\xa8 from \xc3\xa9@2 (esc)
scanning paths: /trunk/\xc3\xa9 2/4 (50.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 gone from -1
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/trunk (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xb9 3/4 (75.00%) (esc)
mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc)
\xc3\xa0/e\xcc\x81 (esc)
getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc)
\xc3\xa8 (esc)
getting files: \xc3\xa8 2/4 (50.00%) (esc)
\xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc)
\xc3\xa9 (esc)
getting files: \xc3\xa9 3/4 (75.00%) (esc)
\xc3\xb9/e\xcc\x81 (esc)
getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc)
\xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 2 remove files
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
converting: 3/6 revisions (50.00%)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xa8 0/2 (0.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 gone from -1
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/trunk (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /trunk/\xc3\xb9 1/2 (50.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 gone from -1
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/trunk (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 \xc3\xa8 (esc)
getting files: \xc3\xa8 1/2 (50.00%) (esc)
\xc3\xb9/e\xcc\x81 (esc)
getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 1 branch to branch?
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
converting: 4/6 revisions (66.67%)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /branches/branch\xc3\xa9 0/1 (0.00%) (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 0 branch to branch?e
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
converting: 5/6 revisions (83.33%)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 scanning paths: /branches/branch\xc3\xa9e 0/1 (0.00%) (esc)
Dan Villiom Podlaski Christiansen
test-convert-svn-encoding.t: ignore that subversion %-encodes $TESTTMP...
r12679 reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370 updating tags
.hgtags
run hg sink post-conversion action
$ cd A-hg
$ hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Check tags are in UTF-8
Mads Kiilerich
tests: use (esc) instead of other kinds of string escaping
r12943 $ cat .hgtags
221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e (esc)
7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9 (esc)
Dan Villiom Podlaski Christiansen
tests: unify test-convert-svn-*
r12370
$ cd ..