.gitlab-ci.yml
author Sushil khanchi <sushilkhanchi97@gmail.com>
Sun, 29 Dec 2019 23:59:41 +0530
changeset 5239 13152b2fe8f7
parent 4986 1214f3d085a9
child 5076 43b448bb1a57
child 5227 b24de4b465ea
permissions -rw-r--r--
evolve: refactor content-divergence resolution logic > What is the case we are looking at? This is about refactoring the part of content-div resolution logic where it decides which cset should be relocated and where. > What is a "topologicial common ancestors" vs a "greatest common ancestors"? `tca` is an ancestor which we can decide/find by looking at the at graph visually for e.g ``` c3(*) c4(*) | | c2(x) c1(x) c5 | / \ | / c0 ``` (c5 is the successor of c2 and c1) now here, `tca` of c3 and c4 is: c0 `gca` of c3 and c4 is: c5 > What is the new top-level logic/behavior that makes it better? The old code had some unnecessary edge cases just because we were using `gca`, since it can point to a revision that is not a topological ancestor. For e.g see b779b40f996e Eventually, the code around this was getting messy unnecessarily. So I looked into it and found a simple and more robust approach. And in new code, it is simple and straightforward (and easy to understand), where we handle the following 4 cases when solving content-div: 1) when both are on the same parent => (no need to do anything special, and simply proceed) 2) both are on the different parent but a) `tca` is the parent of one of them or b) there is no non-obsolete revision between `tca` and one of the divergent cset. => (relocate one to the other side and proceed) 3) both are on different parents and `tca` is not the parent of any of them and there is at least one non-obsolete cset between tca and both the divergent cset i.e (tca::div1) and (tca::div2) both the ranges have at least one non-obs revision. => (this is the case which we don't handle yet, but the solution would be to prompt the user to choose an evolve destination.) 4) both are in the parent-child relation => (both are merged and new cset will be based on the successor of `tca`) Changes in test-evolve-issue5958.t demonstrate that new code also covered case4 because in a resolution of "two divergent csets with parent-child relation" there should be one cset as a result and no orphan revs (as you can see there was an orphan before this patch).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4925
dbeb04ee6679 heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4924
diff changeset
     6
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
     7
    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
     8
    script:
4959
edc29a909339 heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4958
diff changeset
     9
        - 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
    10
        - 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
    11
        - 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
    12
        - (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
    13
dbeb04ee6679 heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4924
diff changeset
    14
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
    15
    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
    16
    script:
4959
edc29a909339 heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4958
diff changeset
    17
        - 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
    18
        - 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
    19
        - 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
    20
        - (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
    21
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    22
tests-py3-cext:
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    23
    image: octobus/ci-py3-hgext3rd
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    24
    script:
4959
edc29a909339 heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4958
diff changeset
    25
        - 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
    26
        - 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
    27
        - 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
    28
        - (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
    29
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    30
tests-py3-pure:
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    31
    image: octobus/ci-py3-hgext3rd
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
    32
    script:
4959
edc29a909339 heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4958
diff changeset
    33
        - 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
    34
        - 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
    35
        - 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
    36
        - (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
    37
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    38
doc:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    39
    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
    40
    script:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    41
        - cd docs/
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    42
        - make
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    43
    variables:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    44
        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
    45
    artifacts:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    46
        paths:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
    47
            - html/*