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
7839249e
Commit
7839249e
authored
6 years ago
by
Boris Feld
Browse files
Options
Downloads
Patches
Plain Diff
test: use `printenv.py --line` in `test-push-http.t`
This makes the output easier to update and read.
parent
e857dbb0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test-push-http.t
+137
-23
137 additions, 23 deletions
tests/test-push-http.t
with
137 additions
and
23 deletions
tests/test-push-http.t
+
137
−
23
View file @
7839249e
...
...
@@ -74,8 +74,8 @@
$
cat
>>
.
hg
/
hgrc
<<
EOF
>
allow_push
=
*
>
[
hooks
]
>
changegroup
=
sh
-
c
"
printenv.py changegroup 0
"
>
pushkey
=
sh
-
c
"
printenv.py pushkey 0
"
>
changegroup
=
sh
-
c
"
printenv.py
--line
changegroup 0
"
>
pushkey
=
sh
-
c
"
printenv.py
--line
pushkey 0
"
>
txnclose
-
phase
.
test
=
sh
$TESTTMP
/
hook
.
sh
>
EOF
$
req
"
--debug --config extensions.blackbox=
"
...
...
@@ -94,8 +94,15 @@
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
running
hook
txnclose
-
phase
.
test:
sh
$TESTTMP
/
hook
.
sh
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
running
hook
changegroup:
sh
-
c
"
printenv.py changegroup 0
"
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
running
hook
changegroup:
sh
-
c
"
printenv.py --line changegroup 0
"
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -114,8 +121,15 @@
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
running
hook
txnclose
-
phase
.
test:
sh
$TESTTMP
/
hook
.
sh
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
running
hook
changegroup:
sh
-
c
"
printenv.py changegroup 0
"
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
running
hook
changegroup:
sh
-
c
"
printenv.py --line changegroup 0
"
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -125,8 +139,8 @@
$
cat
>>
.
hg
/
hgrc
<<
EOF
>
allow_push
=
*
>
[
hooks
]
>
changegroup
=
sh
-
c
"
printenv.py changegroup 0
"
>
pushkey
=
sh
-
c
"
printenv.py pushkey 0
"
>
changegroup
=
sh
-
c
"
printenv.py
--line
changegroup 0
"
>
pushkey
=
sh
-
c
"
printenv.py
--line
pushkey 0
"
>
txnclose
-
phase
.
test
=
sh
$TESTTMP
/
hook
.
sh
>
EOF
$
req
...
...
@@ -138,7 +152,15 @@
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
changegroup
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
changegroup
hook:
HG_BUNDLE2
=
1
remote:
HG_HOOKNAME
=
changegroup
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -157,8 +179,16 @@
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
(
bundle1
!
)
remote:
changegroup
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
(
bundle2
!
)
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
(
no
-
bundle2
!
)
remote:
changegroup
hook:
HG_BUNDLE2
=
1
(
bundle2
!
)
remote:
HG_HOOKNAME
=
changegroup
(
bundle2
!
)
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -176,8 +206,16 @@
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
(
bundle1
!
)
remote:
changegroup
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
changegroup
HG_HOOKTYPE
=
changegroup
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
(
bundle2
!
)
remote:
changegroup
hook:
HG_HOOKNAME
=
changegroup
(
no
-
bundle2
!
)
remote:
changegroup
hook:
HG_BUNDLE2
=
1
(
bundle2
!
)
remote:
HG_HOOKNAME
=
changegroup
(
bundle2
!
)
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -209,6 +247,14 @@
remote:
phase
-
move:
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:
draft
->
public
remote:
phase
-
move:
ba677d0156c1196c1a699fa53f390dcfc3ce3872:
->
public
remote:
changegroup
hook:
*
(
glob
)
remote:
HG_HOOKNAME
=
changegroup
(
bundle2
!
)
remote:
HG_HOOKTYPE
=
changegroup
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
$
hg
rollback
repository
tip
rolled
back
to
revision
0
(
undo
serve
)
...
...
@@ -221,7 +267,7 @@
>
push_ssl
=
false
>
allow_push
=
*
>
[
hooks
]
>
prepushkey
=
sh
-
c
"
printenv.py prepushkey 1
"
>
prepushkey
=
sh
-
c
"
printenv.py
--line
prepushkey 1
"
>
[
devel
]
>
legacy
.
exchange
=
phases
>
EOF
...
...
@@ -253,7 +299,21 @@
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob)
remote: prepushkey hook: HG_BUNDLE2=1
remote: HG_HOOKNAME=prepushkey
remote: HG_HOOKTYPE=prepushkey
remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote: HG_NAMESPACE=phases
remote: HG_NEW=0
remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote: HG_OLD=1
remote: HG_PENDING=$TESTTMP/test
remote: HG_PHASES_MOVED=1
remote: HG_SOURCE=serve
remote: HG_TXNID=TXN:$ID$
remote: HG_URL=remote:http:$LOCALIP: (glob)
remote:
remote: pushkey-abort: prepushkey hook exited with status 1
remote: transaction abort!
remote: rollback completed
...
...
@@ -267,7 +327,7 @@
$ cat >> .hg/hgrc <<EOF
> [hooks]
> prepushkey = sh -c "printenv.py prepushkey 0"
> prepushkey = sh -c "printenv.py
--line
prepushkey 0"
> EOF
We don
'
t
need
to
test
bundle1
because
it
succeeded
above
.
...
...
@@ -280,7 +340,21 @@
remote:
adding
manifests
remote:
adding
file
changes
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
prepushkey
HG_HOOKTYPE
=
prepushkey
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NAMESPACE
=
phases
HG_NEW
=
0
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_OLD
=
1
HG_PENDING
=
$TESTTMP
/
test
HG_PHASES_MOVED
=
1
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
remote:
HG_HOOKNAME
=
prepushkey
remote:
HG_HOOKTYPE
=
prepushkey
remote:
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NAMESPACE
=
phases
remote:
HG_NEW
=
0
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_OLD
=
1
remote:
HG_PENDING
=
$TESTTMP
/
test
remote:
HG_PHASES_MOVED
=
1
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
#endif
...
...
@@ -293,7 +367,7 @@
>
[
phases
]
>
publish
=
false
>
[
hooks
]
>
prepushkey
=
sh
-
c
"
printenv.py prepushkey 1
"
>
prepushkey
=
sh
-
c
"
printenv.py
--line
prepushkey 1
"
>
EOF
#if bundle1
...
...
@@ -304,7 +378,13 @@
remote:
adding
manifests
remote:
adding
file
changes
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
prepushkey
hook:
HG_HOOKNAME
=
prepushkey
HG_HOOKTYPE
=
prepushkey
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NAMESPACE
=
phases
HG_NEW
=
0
HG_OLD
=
1
remote:
prepushkey
hook:
HG_HOOKNAME
=
prepushkey
remote:
HG_HOOKTYPE
=
prepushkey
remote:
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NAMESPACE
=
phases
remote:
HG_NEW
=
0
remote:
HG_OLD
=
1
remote:
remote:
pushkey
-
abort:
prepushkey
hook
exited
with
status
1
updating
ba677d0156c1
to
public
failed
!
%
serve
errors
...
...
@@ -318,7 +398,21 @@
remote:
adding
manifests
remote:
adding
file
changes
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
prepushkey
HG_HOOKTYPE
=
prepushkey
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NAMESPACE
=
phases
HG_NEW
=
0
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_OLD
=
1
HG_PENDING
=
$TESTTMP
/
test
HG_PHASES_MOVED
=
1
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
remote:
HG_HOOKNAME
=
prepushkey
remote:
HG_HOOKTYPE
=
prepushkey
remote:
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NAMESPACE
=
phases
remote:
HG_NEW
=
0
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_OLD
=
1
remote:
HG_PENDING
=
$TESTTMP
/
test
remote:
HG_PHASES_MOVED
=
1
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
remote:
pushkey
-
abort:
prepushkey
hook
exited
with
status
1
remote:
transaction
abort
!
remote:
rollback
completed
...
...
@@ -331,7 +425,7 @@
$
cat
>>
.
hg
/
hgrc
<<
EOF
>
[
hooks
]
>
prepushkey
=
sh
-
c
"
printenv.py prepushkey 0
"
>
prepushkey
=
sh
-
c
"
printenv.py
--line
prepushkey 0
"
>
EOF
#if bundle1
...
...
@@ -339,7 +433,13 @@
pushing
to
http:
//local
host:$HGPORT
/
searching
for
changes
no
changes
found
remote:
prepushkey
hook:
HG_HOOKNAME
=
prepushkey
HG_HOOKTYPE
=
prepushkey
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NAMESPACE
=
phases
HG_NEW
=
0
HG_OLD
=
1
remote:
prepushkey
hook:
HG_HOOKNAME
=
prepushkey
remote:
HG_HOOKTYPE
=
prepushkey
remote:
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NAMESPACE
=
phases
remote:
HG_NEW
=
0
remote:
HG_OLD
=
1
remote:
%
serve
errors
[
1
]
#endif
...
...
@@ -352,7 +452,21 @@
remote:
adding
manifests
remote:
adding
file
changes
remote:
added
1
changesets
with
1
changes
to
1
files
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
HG_HOOKNAME
=
prepushkey
HG_HOOKTYPE
=
prepushkey
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NAMESPACE
=
phases
HG_NEW
=
0
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
HG_OLD
=
1
HG_PENDING
=
$TESTTMP
/
test
HG_PHASES_MOVED
=
1
HG_SOURCE
=
serve
HG_TXNID
=
TXN:$ID
$
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
prepushkey
hook:
HG_BUNDLE2
=
1
remote:
HG_HOOKNAME
=
prepushkey
remote:
HG_HOOKTYPE
=
prepushkey
remote:
HG_KEY
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NAMESPACE
=
phases
remote:
HG_NEW
=
0
remote:
HG_NODE
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_NODE_LAST
=
ba677d0156c1196c1a699fa53f390dcfc3ce3872
remote:
HG_OLD
=
1
remote:
HG_PENDING
=
$TESTTMP
/
test
remote:
HG_PHASES_MOVED
=
1
remote:
HG_SOURCE
=
serve
remote:
HG_TXNID
=
TXN:$ID
$
remote:
HG_URL
=
remote:http:$LOCALIP:
(
glob
)
remote:
%
serve
errors
#endif
...
...
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