Skip to content
Snippets Groups Projects
Commit dde86bec authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

copies: tests and fix parallel computation of changed file information

The code was mixing variable name and misbehaving in some case. This changeset
fix it and also add a tests to validate it does not regress. Without the fix,
the parallel-upgrade misbehavior in random ways.

Differential Revision: https://phab.mercurial-scm.org/D10084
parent 87f8b3ad
No related branches found
No related tags found
No related merge requests found
......@@ -882,10 +882,10 @@
data = {}, False
if util.safehasattr(revlog, b'filteredrevs'): # this is a changelog
# Is the data previously shelved ?
sidedata = staging.pop(rev, None)
if sidedata is None:
data = staging.pop(rev, None)
if data is None:
# look at the queued result until we find the one we are lookig
# for (shelve the other ones)
r, data = sidedataq.get()
while r != rev:
staging[r] = data
......@@ -887,9 +887,9 @@
# look at the queued result until we find the one we are lookig
# for (shelve the other ones)
r, data = sidedataq.get()
while r != rev:
staging[r] = data
r, sidedata = sidedataq.get()
r, data = sidedataq.get()
tokens.release()
sidedata, has_copies_info = data
new_flag = 0
......
#testcases filelog compatibility changeset sidedata upgraded
#testcases filelog compatibility changeset sidedata upgraded upgraded-parallel
=====================================================
Test Copy tracing for chain of copies involving merge
......@@ -1486,6 +1486,44 @@
#endif
#if upgraded-parallel
$ cat >> $HGRCPATH << EOF
> [format]
> exp-use-side-data = yes
> exp-use-copies-side-data-changeset = yes
> [experimental]
> worker.repository-upgrade=yes
> [worker]
> enabled=yes
> numcpus=8
> EOF
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
share-safe: no no no
sparserevlog: yes yes yes
sidedata: no yes no
persistent-nodemap: no no no
copies-sdc: no yes no
plain-cl-delta: yes yes yes
compression: * (glob)
compression-level: default default default
$ hg debugupgraderepo --run --quiet
upgrade will perform the following actions:
requirements
preserved: * (glob)
added: exp-copies-sidedata-changeset, exp-sidedata-flag
processed revlogs:
- all-filelogs
- changelog
- manifest
#endif
#if no-compatibility no-filelog no-changeset
......@@ -3172,9 +3210,10 @@
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
......@@ -3175,12 +3214,13 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
......@@ -3181,9 +3221,10 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
The result from mEAm is the same for the subsequent merge:
......@@ -3193,9 +3234,10 @@
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
......@@ -3196,12 +3238,13 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
......@@ -3202,9 +3245,10 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
Subcase: chaining conflicting rename resolution
```````````````````````````````````````````````
......@@ -3221,9 +3265,10 @@
r (filelog !)
p (sidedata !)
p (upgraded !)
p (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
A v
r (filelog !)
p (sidedata !)
p (upgraded !)
......@@ -3224,12 +3269,13 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
A v
r (filelog !)
p (sidedata !)
p (upgraded !)
p (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
A v
r (filelog !)
p (sidedata !)
p (upgraded !)
......@@ -3230,9 +3276,10 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
A v
r (filelog !)
p (sidedata !)
p (upgraded !)
p (upgraded-parallel !)
The result from mQPm is the same for the subsequent merge:
......@@ -3250,6 +3297,7 @@
r (filelog !)
r (sidedata !)
r (upgraded !)
r (upgraded-parallel !)
Subcase: chaining salvage information during a merge
......@@ -3330,8 +3378,9 @@
a (filelog !)
h (sidedata !)
h (upgraded !)
h (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
A d
a (filelog !)
a (sidedata !)
a (upgraded !)
......@@ -3333,8 +3382,9 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
A d
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
Chained output
......@@ -3343,8 +3393,9 @@
a (filelog !)
h (sidedata !)
h (upgraded !)
h (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
A d
a (filelog !)
h (sidedata !)
h (upgraded !)
......@@ -3346,8 +3397,9 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
A d
a (filelog !)
h (sidedata !)
h (upgraded !)
h (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d
......@@ -3373,9 +3425,10 @@
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
......@@ -3376,9 +3429,10 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
A f
a (filelog !)
a (sidedata !)
a (upgraded !)
a (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f
A f
......@@ -3392,9 +3446,10 @@
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
......@@ -3395,12 +3450,13 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
......@@ -3401,6 +3457,7 @@
$ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
A f
a (filelog !)
b (sidedata !)
b (upgraded !)
b (upgraded-parallel !)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment