##// END OF EJS Templates
Thomas Arendsen Hein -
r1932:82995896 merge default
parent child Browse files
Show More
@@ -0,0 +1,32 b''
1 #! /usr/bin/env python
2 #
3 # Based on python's Tools/scripts/md5sum.py
4 #
5 # This software may be used and distributed according to the terms
6 # of the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2, which is
7 # GPL-compatible.
8
9 import sys
10 import os
11 import md5
12
13 for filename in sys.argv[1:]:
14 try:
15 fp = open(filename, 'rb')
16 except IOError, msg:
17 sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg))
18 sys.exit(1)
19
20 m = md5.new()
21 try:
22 while 1:
23 data = fp.read(8192)
24 if not data:
25 break
26 m.update(data)
27 except IOError, msg:
28 sys.stderr.write('%s: I/O error: %s\n' % (filename, msg))
29 sys.exit(1)
30 sys.stdout.write('%s %s\n' % (m.hexdigest(), filename))
31
32 sys.exit(0)
@@ -1,148 +1,152 b''
1 #!/bin/sh -e
1 #!/bin/sh -e
2
2
3 LANG="C"; export LANG
3 LANG="C"; export LANG
4 LC_CTYPE="C"; export LC_CTYPE
4 LC_CTYPE="C"; export LC_CTYPE
5 LC_NUMERIC="C"; export LC_NUMERIC
5 LC_NUMERIC="C"; export LC_NUMERIC
6 LC_TIME="C"; export LC_TIME
6 LC_TIME="C"; export LC_TIME
7 LC_COLLATE="C"; export LC_COLLATE
7 LC_COLLATE="C"; export LC_COLLATE
8 LC_MONETARY="C"; export LC_MONETARY
8 LC_MONETARY="C"; export LC_MONETARY
9 LC_MESSAGES="C"; export LC_MESSAGES
9 LC_MESSAGES="C"; export LC_MESSAGES
10 LC_PAPER="C"; export LC_PAPER
10 LC_PAPER="C"; export LC_PAPER
11 LC_NAME="C"; export LC_NAME
11 LC_NAME="C"; export LC_NAME
12 LC_ADDRESS="C"; export LC_ADDRESS
12 LC_ADDRESS="C"; export LC_ADDRESS
13 LC_TELEPHONE="C"; export LC_TELEPHONE
13 LC_TELEPHONE="C"; export LC_TELEPHONE
14 LC_MEASUREMENT="C"; export LC_MEASUREMENT
14 LC_MEASUREMENT="C"; export LC_MEASUREMENT
15 LC_IDENTIFICATION="C"; export LC_IDENTIFICATION
15 LC_IDENTIFICATION="C"; export LC_IDENTIFICATION
16 LC_ALL=""; export LC_ALL
16 LC_ALL=""; export LC_ALL
17 TZ=GMT; export TZ
17 TZ=GMT; export TZ
18 HGEDITOR=true; export HGEDITOR
18 HGEDITOR=true; export HGEDITOR
19 HGMERGE=true; export HGMERGE
19 HGMERGE=true; export HGMERGE
20 HGUSER="test"; export HGUSER
20 HGUSER="test"; export HGUSER
21
21
22 ECHO_N="echo -n"
23 [ -x /usr/ucb/echo ] && ECHO_N="/usr/ucb/echo -n"
24
22 umask 022
25 umask 022
23
26
24 tests=0
27 tests=0
25 failed=0
28 failed=0
26
29
27 HGTMP=""
30 HGTMP=""
28 cleanup_exit() {
31 cleanup_exit() {
29 rm -rf "$HGTMP"
32 rm -rf "$HGTMP"
30 }
33 }
31
34
32 # Remove temporary files even if we get interrupted
35 # Remove temporary files even if we get interrupted
33 trap "cleanup_exit" 0 # normal exit
36 trap "cleanup_exit" 0 # normal exit
34 trap "exit 255" 1 2 3 6 15 # HUP INT QUIT ABRT TERM
37 trap "exit 255" 1 2 3 6 15 # HUP INT QUIT ABRT TERM
35
38
36 HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$RANDOM.$RANDOM.$$"
39 HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$RANDOM.$RANDOM.$$"
37 (umask 077 && mkdir "$HGTMP") || {
40 (umask 077 && mkdir "$HGTMP") || {
38 echo "Could not create temporary directory! Exiting." 1>&2
41 echo "Could not create temporary directory! Exiting." 1>&2
39 exit 1
42 exit 1
40 }
43 }
41
44
42 TESTDIR="$PWD"
45 TESTDIR="$PWD"
46 export TESTDIR
43 INST="$HGTMP/install"
47 INST="$HGTMP/install"
44 PYTHONDIR="$INST/lib/python"
48 PYTHONDIR="$INST/lib/python"
45 cd ..
49 cd ..
46 if ${PYTHON-python} setup.py install --home="$INST" \
50 if ${PYTHON-python} setup.py install --home="$INST" \
47 --install-lib="$PYTHONDIR" > tests/install.err 2>&1
51 --install-lib="$PYTHONDIR" > tests/install.err 2>&1
48 then
52 then
49 rm tests/install.err
53 rm tests/install.err
50 else
54 else
51 cat tests/install.err
55 cat tests/install.err
52 exit 1
56 exit 1
53 fi
57 fi
54 cd "$TESTDIR"
58 cd "$TESTDIR"
55
59
56 BINDIR="$INST/bin"
60 BINDIR="$INST/bin"
57 PATH="$BINDIR:$PATH"; export PATH
61 PATH="$BINDIR:$PATH"; export PATH
58 if [ -n "$PYTHON" ]; then
62 if [ -n "$PYTHON" ]; then
59 {
63 {
60 echo "#!/bin/sh"
64 echo "#!/bin/sh"
61 echo "exec \"$PYTHON"'" "$@"'
65 echo "exec \"$PYTHON"'" "$@"'
62 } > "$BINDIR/python"
66 } > "$BINDIR/python"
63 chmod 755 "$BINDIR/python"
67 chmod 755 "$BINDIR/python"
64 fi
68 fi
65
69
66 PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
70 PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
67
71
68 run_one() {
72 run_one() {
69 rm -f "$1.err"
73 rm -f "$1.err"
70
74
71 mkdir "$HGTMP/$1"
75 mkdir "$HGTMP/$1"
72 cd "$HGTMP/$1"
76 cd "$HGTMP/$1"
73 fail=0
77 fail=0
74 HOME="$HGTMP/$1"; export HOME
78 HOME="$HGTMP/$1"; export HOME
75 OUT="$HGTMP/$1.out"
79 OUT="$HGTMP/$1.out"
76 OUTOK="$TESTDIR/$1.out"
80 OUTOK="$TESTDIR/$1.out"
77 ERR="$TESTDIR/$1.err"
81 ERR="$TESTDIR/$1.err"
78
82
79 if "$TESTDIR/$1" > "$OUT" 2>&1; then
83 if "$TESTDIR/$1" > "$OUT" 2>&1; then
80 : no error
84 : no error
81 else
85 else
82 echo "$1 failed with error code $?"
86 echo "$1 failed with error code $?"
83 fail=1
87 fail=1
84 fi
88 fi
85
89
86 if [ -s "$OUT" -a ! -s "$OUTOK" ] ; then
90 if [ -s "$OUT" -a ! -s "$OUTOK" ] ; then
87 cp "$OUT" "$ERR"
91 cp "$OUT" "$ERR"
88 echo
92 echo
89 echo "$1 generated unexpected output:"
93 echo "$1 generated unexpected output:"
90 cat "$ERR"
94 cat "$ERR"
91 fail=1
95 fail=1
92 elif [ -r "$OUTOK" ]; then
96 elif [ -r "$OUTOK" ]; then
93 if diff -u "$OUTOK" "$OUT" > /dev/null; then
97 if diff -u "$OUTOK" "$OUT" > /dev/null; then
94 : no differences
98 : no differences
95 else
99 else
96 cp "$OUT" "$ERR"
100 cp "$OUT" "$ERR"
97 echo
101 echo
98 echo "$1 output changed:"
102 echo "$1 output changed:"
99 diff -u "$OUTOK" "$ERR" || true
103 diff -u "$OUTOK" "$ERR" || true
100 fail=1
104 fail=1
101 fi
105 fi
102 fi
106 fi
103
107
104 cd "$TESTDIR"
108 cd "$TESTDIR"
105 rm -f "$HGTMP/$1.out"
109 rm -f "$HGTMP/$1.out"
106 rm -rf "$HGTMP/$1"
110 rm -rf "$HGTMP/$1"
107 return $fail
111 return $fail
108 }
112 }
109
113
110 # list of prerequisite programs
114 # list of prerequisite programs
111 # stuff from coreutils (cat, rm, etc) are not tested
115 # stuff from coreutils (cat, rm, etc) are not tested
112 prereqs="python merge diff grep unzip md5sum gunzip sed"
116 prereqs="python merge diff grep unzip gunzip sed"
113 missing=''
117 missing=''
114 for pre in $prereqs ; do
118 for pre in $prereqs ; do
115 if type $pre > /dev/null 2>&1 ; then
119 if type $pre > /dev/null 2>&1 ; then
116 : prereq exists
120 : prereq exists
117 else
121 else
118 missing="$pre $missing"
122 missing="$pre $missing"
119 fi
123 fi
120 done
124 done
121
125
122 if [ "$missing" != '' ] ; then
126 if [ "$missing" != '' ] ; then
123 echo "ERROR: the test suite needs some programs to execute correctly."
127 echo "ERROR: the test suite needs some programs to execute correctly."
124 echo "The following programs are missing: "
128 echo "The following programs are missing: "
125 for pre in $missing; do
129 for pre in $missing; do
126 echo " $pre"
130 echo " $pre"
127 done
131 done
128 exit 1
132 exit 1
129 fi
133 fi
130
134
131 TESTS="$*"
135 TESTS="$*"
132 if [ -z "$TESTS" ] ; then
136 if [ -z "$TESTS" ] ; then
133 TESTS=`ls test-* | grep -v "[.~]"`
137 TESTS=`ls test-* | grep -v "[.~]"`
134 fi
138 fi
135
139
136 for f in $TESTS ; do
140 for f in $TESTS ; do
137 echo -n "."
141 $ECHO_N "."
138 run_one $f || failed=`expr $failed + 1`
142 run_one $f || failed=`expr $failed + 1`
139 tests=`expr $tests + 1`
143 tests=`expr $tests + 1`
140 done
144 done
141
145
142 echo
146 echo
143 echo "Ran $tests tests, $failed failed."
147 echo "Ran $tests tests, $failed failed."
144
148
145 if [ $failed -gt 0 ] ; then
149 if [ $failed -gt 0 ] ; then
146 exit 1
150 exit 1
147 fi
151 fi
148 exit 0
152 exit 0
@@ -1,37 +1,38 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 mkdir test
3 mkdir test
4 cd test
4 cd test
5 hg init
5 hg init
6 echo foo>foo
6 echo foo>foo
7 hg addremove
7 hg addremove
8 hg commit -m 1
8 hg commit -m 1
9 echo bar>bar
9 echo bar>bar
10 hg addremove
10 hg addremove
11 hg commit -m 2
11 hg commit -m 2
12 mkdir baz
12 mkdir baz
13 echo bletch>baz/bletch
13 echo bletch>baz/bletch
14 hg addremove
14 hg addremove
15 hg commit -m 3
15 hg commit -m 3
16 echo "[web]" >> .hg/hgrc
16 echo "[web]" >> .hg/hgrc
17 echo "name = test-archive" >> .hg/hgrc
17 echo "name = test-archive" >> .hg/hgrc
18 echo "allowzip = true" >> .hg/hgrc
18 echo "allowzip = true" >> .hg/hgrc
19 echo "allowgz = true" >> .hg/hgrc
19 echo "allowgz = true" >> .hg/hgrc
20 echo "allowbz2 = true" >> .hg/hgrc
20 echo "allowbz2 = true" >> .hg/hgrc
21 hg serve -p 20059 -d --pid-file=hg.pid
21 hg serve -p 20059 -d --pid-file=hg.pid
22
22
23 TIP=`hg id -v | cut -f1 -d' '`
23 TIP=`hg id -v | cut -f1 -d' '`
24 QTIP=`hg id -q`
24 QTIP=`hg id -q`
25 cat > getarchive.py <<EOF
25 cat > getarchive.py <<EOF
26 import sys, urllib2
26 import sys, urllib2
27 node, archive = sys.argv[1:]
27 node, archive = sys.argv[1:]
28 f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s'
28 f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s'
29 % (node, archive))
29 % (node, archive))
30 sys.stdout.write(f.read())
30 sys.stdout.write(f.read())
31 EOF
31 EOF
32 http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/"
32 http_proxy= python getarchive.py "$TIP" gz | gunzip -dc - | tar tf - | sed "s/$QTIP/TIP/"
33 http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/"
33 http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 -dc - | tar tf - | sed "s/$QTIP/TIP/"
34 http_proxy= python getarchive.py "$TIP" zip > archive.zip
34 http_proxy= python getarchive.py "$TIP" zip > archive.zip
35 unzip -t archive.zip | sed "s/$QTIP/TIP/"
35 unzip -t archive.zip | sed "s/$QTIP/TIP/"
36
36
37 kill `cat hg.pid`
37 kill `cat hg.pid`
38 sleep 1 # wait for server to scream and die
@@ -1,25 +1,25 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg clone http://localhost:20059/ copy
3 hg clone http://localhost:20059/ copy
4 echo $?
4 echo $?
5 ls copy
5 ls copy
6
6
7 cat > dumb.py <<EOF
7 cat > dumb.py <<EOF
8 import BaseHTTPServer, SimpleHTTPServer, signal
8 import BaseHTTPServer, SimpleHTTPServer, signal
9
9
10 def run(server_class=BaseHTTPServer.HTTPServer,
10 def run(server_class=BaseHTTPServer.HTTPServer,
11 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
11 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
12 server_address = ('localhost', 20059)
12 server_address = ('localhost', 20059)
13 httpd = server_class(server_address, handler_class)
13 httpd = server_class(server_address, handler_class)
14 httpd.serve_forever()
14 httpd.serve_forever()
15
15
16 signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
16 signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
17 run()
17 run()
18 EOF
18 EOF
19
19
20 python dumb.py 2>/dev/null &
20 python dumb.py 2>/dev/null &
21
21
22 hg clone http://localhost:20059/foo copy2
22 http_proxy= hg clone http://localhost:20059/foo copy2
23 echo $?
23 echo $?
24
24
25 kill $!
25 kill $!
@@ -1,27 +1,27 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 mkdir a
3 mkdir a
4 cd a
4 cd a
5 hg init
5 hg init
6 echo a > a
6 echo a > a
7 hg add a
7 hg add a
8 hg commit -m test -d '0 0'
8 hg commit -m test -d '0 0'
9
9
10 # Default operation
10 # Default operation
11 hg clone . ../b
11 hg clone . ../b
12 cd ../b
12 cd ../b
13 cat a
13 cat a
14 hg verify
14 hg verify
15
15
16 # No update
16 # No update
17 hg clone -U . ../c
17 hg clone -U . ../c
18 cd ../c
18 cd ../c
19 cat a
19 cat a 2>/dev/null || echo "a not present"
20 hg verify
20 hg verify
21
21
22 # Default destination
22 # Default destination
23 mkdir ../d
23 mkdir ../d
24 cd ../d
24 cd ../d
25 hg clone ../a
25 hg clone ../a
26 cd a
26 cd a
27 hg cat a
27 hg cat a
@@ -1,13 +1,13 b''
1 a
1 a
2 checking changesets
2 checking changesets
3 checking manifests
3 checking manifests
4 crosschecking files in changesets and manifests
4 crosschecking files in changesets and manifests
5 checking files
5 checking files
6 1 files, 1 changesets, 1 total revisions
6 1 files, 1 changesets, 1 total revisions
7 cat: a: No such file or directory
7 a not present
8 checking changesets
8 checking changesets
9 checking manifests
9 checking manifests
10 crosschecking files in changesets and manifests
10 crosschecking files in changesets and manifests
11 checking files
11 checking files
12 1 files, 1 changesets, 1 total revisions
12 1 files, 1 changesets, 1 total revisions
13 a
13 a
@@ -1,16 +1,16 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init
3 hg init
4 echo "nothing" > a
4 echo "nothing" > a
5 hg add a
5 hg add a
6 hg commit -m ancestor -d "0 0"
6 hg commit -m ancestor -d "0 0"
7 echo "something" > a
7 echo "something" > a
8 hg commit -m branch1 -d "0 0"
8 hg commit -m branch1 -d "0 0"
9 hg co 0
9 hg co 0
10 echo "something else" > a
10 echo "something else" > a
11 hg commit -m branch2 -d "0 0"
11 hg commit -m branch2 -d "0 0"
12 HGMERGE=merge; export HGMERGE
12 HGMERGE=merge; export HGMERGE
13 hg up -m 1
13 hg up -m 1
14 hg id
14 hg id
15 grep -Ev ">>>|<<<" a
15 egrep -v ">>>|<<<" a
16 hg status
16 hg status
@@ -1,30 +1,30 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init
3 hg init
4 echo a > a
4 echo a > a
5 hg add a
5 hg add a
6 hg commit -m "1" -d "0 0"
6 hg commit -m "1" -d "0 0"
7 hg status
7 hg status
8 hg copy a b
8 hg copy a b
9 hg status
9 hg status
10 hg --debug commit -m "2" -d "0 0"
10 hg --debug commit -m "2" -d "0 0"
11 echo "we should see two history entries"
11 echo "we should see two history entries"
12 hg history -v
12 hg history -v
13 echo "we should see one log entry for a"
13 echo "we should see one log entry for a"
14 hg log a
14 hg log a
15 echo "this should show a revision linked to changeset 0"
15 echo "this should show a revision linked to changeset 0"
16 hg debugindex .hg/data/a.i
16 hg debugindex .hg/data/a.i
17 echo "we should see one log entry for b"
17 echo "we should see one log entry for b"
18 hg log b
18 hg log b
19 echo "this should show a revision linked to changeset 1"
19 echo "this should show a revision linked to changeset 1"
20 hg debugindex .hg/data/b.i
20 hg debugindex .hg/data/b.i
21
21
22 echo "this should show the rename information in the metadata"
22 echo "this should show the rename information in the metadata"
23 hg debugdata .hg/data/b.d 0 | head -n 3 | tail -n 2
23 hg debugdata .hg/data/b.d 0 | head -3 | tail -2
24
24
25 md5sum .hg/data/b.d
25 $TESTDIR/md5sum.py .hg/data/b.d
26 hg cat b > bsum
26 hg cat b > bsum
27 md5sum bsum
27 $TESTDIR/md5sum.py bsum
28 hg cat a > asum
28 hg cat a > asum
29 md5sum asum
29 $TESTDIR/md5sum.py asum
30 hg verify
30 hg verify
@@ -1,16 +1,16 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init
3 hg init
4 echo 123 > a
4 echo 123 > a
5 hg add a
5 hg add a
6 hg commit -m "first" -d "0 0" a
6 hg commit -m "first" -d "0 0" a
7 mkdir sub
7 mkdir sub
8 echo 321 > sub/b
8 echo 321 > sub/b
9 hg add sub/b
9 hg add sub/b
10 hg commit -m "second" -d "0 0" sub/b
10 hg commit -m "second" -d "0 0" sub/b
11 cat sub/b
11 cat sub/b
12 hg co 0
12 hg co 0
13 cat sub/b
13 cat sub/b 2>/dev/null || echo "sub/b not present"
14 ls sub
14 ls sub 2>/dev/null || echo "sub not present"
15
15
16 true
16 true
@@ -1,3 +1,3 b''
1 321
1 321
2 cat: sub/b: No such file or directory
2 sub/b not present
3 ls: sub: No such file or directory
3 sub not present
@@ -1,34 +1,34 b''
1 #!/bin/sh -e
1 #!/bin/sh -e
2
2
3 umask 027
3 umask 027
4 mkdir test1
4 mkdir test1
5 cd test1
5 cd test1
6
6
7 hg init
7 hg init
8 touch a b
8 touch a b
9 hg add a b
9 hg add a b
10 hg ci -m "added a b" -d "0 0"
10 hg ci -m "added a b" -d "0 0"
11
11
12 cd ..
12 cd ..
13 mkdir test2
13 mkdir test2
14 cd test2
14 cd test2
15
15
16 hg init
16 hg init
17 hg pull ../test1
17 hg pull ../test1
18 hg co
18 hg co
19 chmod +x a
19 chmod +x a
20 hg ci -m "chmod +x a" -d "0 0"
20 hg ci -m "chmod +x a" -d "0 0"
21
21
22 cd ../test1
22 cd ../test1
23 echo 123 >>a
23 echo 123 >>a
24 hg ci -m "a updated" -d "0 0"
24 hg ci -m "a updated" -d "0 0"
25
25
26 hg pull ../test2
26 hg pull ../test2
27 hg heads
27 hg heads
28 hg history
28 hg history
29
29
30 hg -v co -m
30 hg -v co -m
31
31
32 ls -l ../test[12]/a > foo
32 ls -l ../test[12]/a > foo
33 cut -b 0-10 < foo
33 cut -b 1-10 < foo
34
34
@@ -1,21 +1,21 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 mkdir test
3 mkdir test
4 cd test
4 cd test
5 echo foo>foo
5 echo foo>foo
6 hg init
6 hg init
7 hg addremove
7 hg addremove
8 hg commit -m 1
8 hg commit -m 1
9 hg verify
9 hg verify
10 hg serve -p 20059 -d --pid-file=hg.pid
10 hg serve -p 20059 -d --pid-file=hg.pid
11 cd ..
11 cd ..
12
12
13 hg clone http://localhost:20059/ copy
13 http_proxy= hg clone http://localhost:20059/ copy
14 cd copy
14 cd copy
15 hg verify
15 hg verify
16 hg co
16 hg co
17 cat foo
17 cat foo
18 hg manifest
18 hg manifest
19 hg pull
19 hg pull
20
20
21 kill `cat ../test/hg.pid`
21 kill `cat ../test/hg.pid`
@@ -1,41 +1,42 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 http_proxy= hg clone old-http://localhost:20059/ copy
3 http_proxy= hg clone old-http://localhost:20059/ copy > clonefail.out 2>&1
4 echo $?
4 echo $?
5 sed 's/[0-9]//g' < clonefail.out
5 ls copy
6 ls copy
6
7
7 # This server doesn't do range requests so it's basically only good for
8 # This server doesn't do range requests so it's basically only good for
8 # one pull
9 # one pull
9 cat > dumb.py <<EOF
10 cat > dumb.py <<EOF
10 import BaseHTTPServer, SimpleHTTPServer, signal
11 import BaseHTTPServer, SimpleHTTPServer, signal
11
12
12 def run(server_class=BaseHTTPServer.HTTPServer,
13 def run(server_class=BaseHTTPServer.HTTPServer,
13 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
14 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
14 server_address = ('localhost', 20059)
15 server_address = ('localhost', 20059)
15 httpd = server_class(server_address, handler_class)
16 httpd = server_class(server_address, handler_class)
16 httpd.serve_forever()
17 httpd.serve_forever()
17
18
18 signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
19 signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
19 run()
20 run()
20 EOF
21 EOF
21
22
22 python dumb.py 2>/dev/null &
23 python dumb.py 2>/dev/null &
23
24
24 mkdir remote
25 mkdir remote
25 cd remote
26 cd remote
26 hg init
27 hg init
27 echo foo > bar
28 echo foo > bar
28 hg add bar
29 hg add bar
29 hg commit -m"test" -d"0 0"
30 hg commit -m"test" -d"0 0"
30 hg tip
31 hg tip
31
32
32 cd ..
33 cd ..
33
34
34 http_proxy= hg clone old-http://localhost:20059/remote local
35 http_proxy= hg clone old-http://localhost:20059/remote local
35
36
36 cd local
37 cd local
37 hg verify
38 hg verify
38 cat bar
39 cat bar
39 http_proxy= hg pull
40 http_proxy= hg pull
40
41
41 kill $!
42 kill $!
@@ -1,23 +1,23 b''
1 255
1 abort: Connection refused
2 abort: Connection refused
2 255
3 ls: copy: No such file or directory
3 ls: copy: No such file or directory
4 changeset: 0:61c9426e69fe
4 changeset: 0:61c9426e69fe
5 tag: tip
5 tag: tip
6 user: test
6 user: test
7 date: Thu Jan 1 00:00:00 1970 +0000
7 date: Thu Jan 1 00:00:00 1970 +0000
8 summary: test
8 summary: test
9
9
10 requesting all changes
10 requesting all changes
11 adding changesets
11 adding changesets
12 adding manifests
12 adding manifests
13 adding file changes
13 adding file changes
14 added 1 changesets with 1 changes to 1 files
14 added 1 changesets with 1 changes to 1 files
15 checking changesets
15 checking changesets
16 checking manifests
16 checking manifests
17 crosschecking files in changesets and manifests
17 crosschecking files in changesets and manifests
18 checking files
18 checking files
19 1 files, 1 changesets, 1 total revisions
19 1 files, 1 changesets, 1 total revisions
20 foo
20 foo
21 pulling from old-http://localhost:20059/remote
21 pulling from old-http://localhost:20059/remote
22 searching for changes
22 searching for changes
23 no changes found
23 no changes found
General Comments 0
You need to be logged in to leave comments. Login now