Mercurial > evolve
annotate .gitlab-ci.yml @ 5295:ebfd0d875600
evolve: handle relocation during divergence resolution producing no changes
When resolving divergence and the two divergent commits have different
parents, we start by rebasing one of them to have the same parent as
the other. That step can result in no changes to commit. When it does,
we would crash with a TypeError before this patch.
This patch fixes it by instead creating an empty commit in that
scenario. The existing code then continues to attempt to merge it,
which produces no changes, and no commit is created on top. The other
side of the divergence is marked as successor as usual, so orphans
from the side that became empty will be evolved to the right place
(see test).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 09 Dec 2019 11:09:11 -0800 |
parents | 43b448bb1a57 |
children | e5fe3ca5e6ad efb8ae4419b2 f4d991ac2cd6 |
rev | line source |
---|---|
4873
91116cec0a67
gitlab-ci: basic test with flake8
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 flake8: |
4923
d18908c5642a
heptapod-ci: point to our own docker images
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4874
diff
changeset
|
2 image: octobus/ci-py2-hgext3rd |
4873
91116cec0a67
gitlab-ci: basic test with flake8
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 script: |
4923
d18908c5642a
heptapod-ci: point to our own docker images
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4874
diff
changeset
|
4 - hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' -X hgext3rd/evolve/thirdparty | xargs -0 flake8 |
4926
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
5 |
5076
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
6 pytype: |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
7 image: octobus/ci-py3-hgext3rd |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
8 script: |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
9 - hg pull -R /ci/repos/mercurial/ |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
10 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
11 - hg -R /ci/repos/mercurial/ update "$hg_rev" |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
12 - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()') |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
13 - pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
14 when: manual |
43b448bb1a57
heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents:
4986
diff
changeset
|
15 |
4925
dbeb04ee6679
heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4924
diff
changeset
|
16 tests-py2-cext: |
4923
d18908c5642a
heptapod-ci: point to our own docker images
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4874
diff
changeset
|
17 image: octobus/ci-py2-hgext3rd |
4874
ab0d09c93532
gitlab-ci: be bold and try to run the full test in them
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4873
diff
changeset
|
18 script: |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
19 - hg pull -R /ci/repos/mercurial/ |
4966
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
20 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") |
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
21 - hg -R /ci/repos/mercurial/ update "$hg_rev" |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
22 - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always) |
4925
dbeb04ee6679
heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4924
diff
changeset
|
23 |
dbeb04ee6679
heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4924
diff
changeset
|
24 tests-py2-pure: |
dbeb04ee6679
heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4924
diff
changeset
|
25 image: octobus/ci-py2-hgext3rd |
dbeb04ee6679
heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4924
diff
changeset
|
26 script: |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
27 - hg pull -R /ci/repos/mercurial/ |
4966
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
28 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") |
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
29 - hg -R /ci/repos/mercurial/ update "$hg_rev" |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
30 - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure) |
4926
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
31 |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
32 tests-py3-cext: |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
33 image: octobus/ci-py3-hgext3rd |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
34 script: |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
35 - hg pull -R /ci/repos/mercurial/ |
4966
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
36 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") |
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
37 - hg -R /ci/repos/mercurial/ update "$hg_rev" |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
38 - (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always) |
4926
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
39 |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
40 tests-py3-pure: |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
41 image: octobus/ci-py3-hgext3rd |
0fad1d376814
heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4925
diff
changeset
|
42 script: |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
43 - hg pull -R /ci/repos/mercurial/ |
4966
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
44 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") |
4f3c87584a4a
heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents:
4959
diff
changeset
|
45 - hg -R /ci/repos/mercurial/ update "$hg_rev" |
4959
edc29a909339
heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4958
diff
changeset
|
46 - (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always --pure) |
4986
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
47 |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
48 doc: |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
49 image: octobus/ci-py2-evolve-doc |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
50 script: |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
51 - cd docs/ |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
52 - make |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
53 variables: |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
54 LANG: en_us.UTF-8 |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
55 artifacts: |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
56 paths: |
1214f3d085a9
ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents:
4966
diff
changeset
|
57 - html/* |