annotate tests/test-pushvars.t @ 52294:a3fa37bdb7ec

rust: normalize `_for_unchecked_rev` naming among revlogs and the index This normalizes the naming scheme between the `Revlog`, `Changelog`, etc. which is less suprising, though no real bugs could stem from this because of the type signature mismatch. The very high-level `Repo` object still uses an `UncheckedRevision` parameter for its methods because that's what most callers will want.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 29 Oct 2024 11:00:04 +0100
parents 2cdd3e85abf7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
1 Setup
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
2
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
3 $ cat > $TESTTMP/pretxnchangegroup.sh << EOF
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
4 > #!/bin/sh
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 42897
diff changeset
5 > env | grep -E "^HG_USERVAR_(DEBUG|BYPASS_REVIEW)" | sort
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
6 > exit 0
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
7 > EOF
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
8 $ cat >> $HGRCPATH << EOF
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
9 > [hooks]
33796
4f8c241b2bfa test-pushvars: invoke shell script hook via `sh` for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33693
diff changeset
10 > pretxnchangegroup = sh $TESTTMP/pretxnchangegroup.sh
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
11 > EOF
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
12
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
13 $ hg init repo
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
14 $ hg clone -q repo child
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
15 $ cd child
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
16
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
17 Test pushing vars to repo with pushvars.server not set
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
18
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
19 $ echo b > a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
20 $ hg commit -Aqm a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
21 $ hg push --pushvars "DEBUG=1" --pushvars "BYPASS_REVIEW=true"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33885
diff changeset
22 pushing to $TESTTMP/repo
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
23 searching for changes
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
24 adding changesets
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
25 adding manifests
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
26 adding file changes
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
27 added 1 changesets with 1 changes to 1 files
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
28
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
29 Setting pushvars.sever = true and then pushing.
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
30
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
31 $ echo [push] >> $HGRCPATH
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
32 $ echo "pushvars.server = true" >> $HGRCPATH
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
33 $ echo b >> a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
34 $ hg commit -Aqm a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
35 $ hg push --pushvars "DEBUG=1" --pushvars "BYPASS_REVIEW=true"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33885
diff changeset
36 pushing to $TESTTMP/repo
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
37 searching for changes
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
38 adding changesets
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
39 adding manifests
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
40 adding file changes
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
41 HG_USERVAR_BYPASS_REVIEW=true
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
42 HG_USERVAR_DEBUG=1
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 36157
diff changeset
43 added 1 changesets with 1 changes to 1 files
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
44
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
45 Test pushing var with empty right-hand side
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
46
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
47 $ echo b >> a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
48 $ hg commit -Aqm a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
49 $ hg push --pushvars "DEBUG="
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33885
diff changeset
50 pushing to $TESTTMP/repo
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
51 searching for changes
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
52 adding changesets
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
53 adding manifests
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
54 adding file changes
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 36157
diff changeset
55 HG_USERVAR_DEBUG=
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
56 added 1 changesets with 1 changes to 1 files
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
57
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
58 Test pushing bad vars
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
59
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
60 $ echo b >> a
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
61 $ hg commit -Aqm b
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
62 $ hg push --pushvars "DEBUG"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33885
diff changeset
63 pushing to $TESTTMP/repo
33885
800bb35d891e pushvars: do not mangle repo state
Jun Wu <quark@fb.com>
parents: 33796
diff changeset
64 searching for changes
33693
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
65 abort: unable to parse variable 'DEBUG', should follow 'KEY=VALUE' or 'KEY=' format
db3dc11356ed pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
66 [255]