Mercurial > hg
annotate tests/test-pushvars.t @ 39270:37e56607cbb9
lfs: add a progress bar when searching for blobs to upload
The search itself can take an extreme amount of time if there are a lot of
revisions involved. I've got a local repo that took 6 minutes to push 1850
commits, and 60% of that time was spent here (there are ~70K files):
\ 58.1% wrapper.py: extractpointers line 297: pointers = extractpointers(...
| 57.7% wrapper.py: pointersfromctx line 352: for p in pointersfromctx(ct...
| 57.4% wrapper.py: pointerfromctx line 397: p = pointerfromctx(ctx, f, ...
\ 38.7% context.py: __contains__ line 368: if f not in ctx:
| 38.7% util.py: __get__ line 82: return key in self._manifest
| 38.7% context.py: _manifest line 1416: result = self.func(obj)
| 38.7% manifest.py: read line 472: return self._manifestctx.re...
\ 25.6% revlog.py: revision line 1562: text = rl.revision(self._node)
\ 12.8% revlog.py: _chunks line 2217: bins = self._chunks(chain, ...
| 12.0% revlog.py: decompressline 2112: ladd(decomp(buffer(data, ch...
\ 7.8% revlog.py: checkhash line 2232: self.checkhash(text, node, ...
| 7.8% revlog.py: hash line 2315: if node != self.hash(text, ...
| 7.8% revlog.py: hash line 2242: return hash(text, p1, p2)
\ 12.0% manifest.py: __init__ line 1565: self._data = manifestdict(t...
\ 16.8% context.py: filenode line 378: if not _islfs(fctx.filelog(...
| 15.7% util.py: __get__ line 706: return self._filelog
| 14.8% context.py: _filelog line 1416: result = self.func(obj)
| 14.8% localrepo.py: file line 629: return self._repo.file(self...
| 14.8% filelog.py: __init__ line 1134: return filelog.filelog(self...
| 14.5% revlog.py: __init__ line 24: censorable=True)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 24 Aug 2018 17:45:46 -0400 |
parents | 2405ca783672 |
children | d7304434390f |
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 $ PYTHONPATH=$TESTDIR/..:$PYTHONPATH |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 $ export PYTHONPATH |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
5 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
6 $ cat > $TESTTMP/pretxnchangegroup.sh << EOF |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 > #!/bin/sh |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 > env | egrep "^HG_USERVAR_(DEBUG|BYPASS_REVIEW)" | sort |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 > exit 0 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 > EOF |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 $ cat >> $HGRCPATH << EOF |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 > [hooks] |
33796
4f8c241b2bfa
test-pushvars: invoke shell script hook via `sh` for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
33693
diff
changeset
|
13 > pretxnchangegroup = sh $TESTTMP/pretxnchangegroup.sh |
33693
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 > EOF |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 $ hg init repo |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 $ hg clone -q repo child |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 $ cd child |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 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
|
21 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 $ echo b > a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 $ hg commit -Aqm a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
24 $ 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
|
25 pushing to $TESTTMP/repo |
33693
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 searching for changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 adding changesets |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
28 adding manifests |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
29 adding file changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
30 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
|
31 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
32 Setting pushvars.sever = true and then pushing. |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
33 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 $ echo [push] >> $HGRCPATH |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 $ echo "pushvars.server = true" >> $HGRCPATH |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 $ echo b >> a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
37 $ hg commit -Aqm a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
38 $ 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
|
39 pushing to $TESTTMP/repo |
33693
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 searching for changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
41 adding changesets |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
42 adding manifests |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
43 adding file changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 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
|
45 HG_USERVAR_BYPASS_REVIEW=true |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 HG_USERVAR_DEBUG=1 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 Test pushing var with empty right-hand side |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
49 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 $ echo b >> a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 $ hg commit -Aqm a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
52 $ 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
|
53 pushing to $TESTTMP/repo |
33693
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
54 searching for changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
55 adding changesets |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
56 adding manifests |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
57 adding file changes |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
58 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
|
59 HG_USERVAR_DEBUG= |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
61 Test pushing bad vars |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
62 |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
63 $ echo b >> a |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
64 $ hg commit -Aqm b |
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
65 $ 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
|
66 pushing to $TESTTMP/repo |
33885 | 67 searching for changes |
33693
db3dc11356ed
pushvars: move fb extension pushvars to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 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
|
69 [255] |