tests/test-branchmap
author Henrik Stuart <henrik.stuart@edlund.dk>
Mon, 26 Oct 2009 13:37:39 +0100
changeset 9671 9471d9a900b4
child 9789 79e749b26b2b
permissions -rw-r--r--
transfer branchmap branch names over the wire in utf-8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9471d9a900b4 transfer branchmap branch names over the wire in utf-8
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
    16
hg clone http://localhost:$HGPORT1 b
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`