annotate tests/test-branchmap @ 9827:4fe9ca519637

mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127) Previous code was computing hunks then checking if these hunks could be ignored when taking whitespace/blank-lines options in accounts. This approach is simple but fails with hunks containing both whitespace and non-whitespace changes, the whole hunk is emitted while it can be mostly made of whitespace. The new version normalize the whitespaces before hunk generation, and test for blank-lines afterwards.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 11 Nov 2009 18:31:42 +0100
parents 79e749b26b2b
children 7bb004fc14ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9671
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
1 #!/bin/sh
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
2
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
3 hgserve()
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
4 {
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
5 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@ \
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
6 | sed -e 's/:[0-9][0-9]*//g' -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
7 cat hg.pid >> "$DAEMON_PIDS"
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
8 }
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
9
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
10 hg init a
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
11 hg --encoding utf-8 -R a branch æ
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
12 echo foo > a/foo
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
13 hg -R a ci -Am foo
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
14
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
15 hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
9789
79e749b26b2b Use utf-8 encoding in test-branchmap's clone call
Thomas Arendsen Hein <thomas@intevation.de>
parents: 9671
diff changeset
16 hg --encoding utf-8 clone http://localhost:$HGPORT1 b
9671
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
17 hg --encoding utf-8 -R b log
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
18 echo bar >> b/foo
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
19 hg -R b ci -m bar
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
20 hg --encoding utf-8 -R b push | sed "s/$HGPORT1/PORT/"
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
21 hg -R a --encoding utf-8 log
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
22
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
23 kill `cat hg.pid`