Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
df57227a
Commit
df57227a
authored
14 years ago
by
Matt Mackall
Browse files
Options
Downloads
Patches
Plain Diff
tests: unify test-http
parent
981ce49a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test-http.out
+0
-47
0 additions, 47 deletions
tests/test-http.out
tests/test-http.t
+81
-36
81 additions, 36 deletions
tests/test-http.t
with
81 additions
and
83 deletions
tests/test-http.out
deleted
100644 → 0
+
0
−
47
View file @
981ce49a
adding foo
adding foo.d/bAr.hg.d/BaR
adding foo.d/baR.d.hg/bAR
adding foo.d/foo
abort: cannot start server at ':$HGPORT1':
% clone via stream
streaming all changes
XXX files to transfer, XXX bytes of data
transferred XXX bytes in XXX seconds (XXX XB/sec)
updating to branch default
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
4 files, 1 changesets, 4 total revisions
% try to clone via stream, should use pull instead
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
% clone via pull
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
4 files, 1 changesets, 4 total revisions
adding bar
% pull
changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/
pulling from http://localhost:$HGPORT1/
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
This diff is collapsed.
Click to expand it.
tests/test-http
→
tests/test-http
.t
100755 → 100644
+
81
−
36
View file @
df57227a
#!/bin/sh
...
...
@@ -2,3 +1,19 @@
cp
"
$TESTDIR
"
/printenv.py
.
$
cp
"
$TESTDIR
"
/
printenv
.
py
.
$
hg
init
test
$
cd
test
$
echo
foo
>
foo
$
mkdir
foo
.
d
foo
.
d
/bAr.hg.d foo.d/
baR
.
d
.
hg
$
echo
foo
>
foo
.
d
/
foo
$
echo
bar
>
foo
.
d
/bAr.hg.d/
BaR
$
echo
bar
>
foo
.
d
/baR.d.hg/
bAR
$
hg
commit
-
A
-
m 1
adding foo
adding foo.d/bAr.hg.d/BaR
adding foo.d/baR.d.hg/bAR
adding foo.d/foo
$ hg serve -p $HGPORT -d --pid-file=../hg1
.
pid
$
hg
--
config
server
.
uncompressed
=
False
serve
-
p
$HGPORT1
-
d
--
pid
-
file
=../
hg2
.
pid
Test
server
address
cannot
be
reused
...
...
@@ -4,9 +19,9 @@
hg init
test
cd test
echo
foo>foo
mkdir
foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
echo
foo>foo.d/foo
echo
bar>foo.d/bAr.hg.d/BaR
echo
bar>foo.d/baR.d.hg/bAR
$
hg
serve
-
p
$HGPORT1
2
>&
1
abort:
cannot
start
server
at
'
:*
':
Address
already
in
use
(
glob
)
[
255
]
$
cd
..
$
cat
hg1
.
pid
hg2
.
pid
>>
$DAEMON_PIDS
clone
via
stream
...
...
@@ -12,9 +27,16 @@
hg commit
-A
-m
1
hg serve
-p
$HGPORT
-d
--pid-file
=
../hg1.pid
hg
--config
server.uncompressed
=
False serve
-p
$HGPORT1
-d
--pid-file
=
../hg2.pid
# Test server address cannot be reused
hg serve
-p
$HGPORT1
2>&1 |
sed
-e
"s/abort: cannot start server at ':
$HGPORT1
':.*/abort: cannot start server at ':
\$
HGPORT1':/"
cd
..
cat
hg1.pid hg2.pid
>>
$DAEMON_PIDS
$
hg
clone
--
uncompressed
http:
//local
host:$HGPORT
/
copy
2
>&
1
streaming
all
changes
6
files
to
transfer
,
606
bytes
of
data
transferred
*
bytes
in
*
seconds
(
*B
/
sec
)
(
glob
)
updating
to
branch
default
4
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
verify
-
R
copy
checking
changesets
checking
manifests
crosschecking
files
in
changesets
and
manifests
checking
files
4
files
,
1
changesets
,
4
total
revisions
try
to
clone
via
stream
,
should
use
pull
instead
...
...
@@ -20,6 +42,10 @@
echo
% clone via stream
hg clone
--uncompressed
http://localhost:
$HGPORT
/ copy 2>&1 |
\
sed
-e
's/[0-9][0-9.]*/XXX/g'
-e
's/[KM]\(B\/sec\)/X\1/'
hg verify
-R
copy
$
hg
clone
--
uncompressed
http:
//local
host:$HGPORT1
/
copy2
requesting
all
changes
adding
changesets
adding
manifests
adding
file
changes
added
1
changesets
with
4
changes
to
4
files
updating
to
branch
default
4
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
...
...
@@ -25,8 +51,3 @@
echo
% try to clone via stream, should use pull instead
hg clone
--uncompressed
http://localhost:
$HGPORT1
/ copy2
echo
% clone via pull
hg clone http://localhost:
$HGPORT1
/ copy-pull
hg verify
-R
copy-pull
clone
via
pull
...
...
@@ -32,6 +53,21 @@
cd test
echo
bar
>
bar
hg commit
-A
-d
'1 0'
-m
2
cd
..
$
hg
clone
http:
//local
host:$HGPORT1
/
copy
-
pull
requesting
all
changes
adding
changesets
adding
manifests
adding
file
changes
added
1
changesets
with
4
changes
to
4
files
updating
to
branch
default
4
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
verify
-
R
copy
-
pull
checking
changesets
checking
manifests
crosschecking
files
in
changesets
and
manifests
checking
files
4
files
,
1
changesets
,
4
total
revisions
$
cd
test
$
echo
bar
>
bar
$
hg
commit
-
A
-
d
'
1 0
'
-
m 2
adding bar
$ cd ..
...
...
@@ -37,7 +73,16 @@
echo
% pull
cd
copy-pull
echo
'[hooks]'
>>
.hg/hgrc
echo
'changegroup = python ../printenv.py changegroup'
>>
.hg/hgrc
hg pull |
sed
-e
"s,:
$HGPORT1
/,:
\$
HGPORT1/,"
cd
..
pull
$ cd copy-pull
$ echo '[hooks]' >> .hg/hgrc
$ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
$ hg pull
changegroup hook: HG_NODE=5fed3813f7f5e182
4344
fdc9cf8f63bb662c292d
HG_SOURCE
=
pull
HG_URL
=
http:
//local
host:
*/*
(
glob
)
pulling
from
http:
//local
host:
*/
(
glob
)
searching
for
changes
adding
changesets
adding
manifests
adding
file
changes
added
1
changesets
with
1
changes
to
1
files
(
run
'
hg update
'
to
get
a
working
copy
)
$
cd
..
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment