Mercurial > evolve
annotate contrib/merge-test-compat.sh @ 5780:e117cf7401db
doc: switch rst `=` section underlines to `-`
When using GENDOC_LOAD_CONFIGURED_EXTENSIONS=1, Mercurial's doc/gendoc.py can
load extensions from outside of just the hgext directory, and pull in this doc.
When added to the documentation, this should be nested inside of the following
extension hierarchy:
- Extensions
- evolve
The generated documentation has an established hierarchy of section headers, and
the above uses `"` for top level, and `=` for each extension. Since gendoc just
pastes it in verbatim, with `=` underlines, we get "Obsolescence Markers
Discovery", "Effect Flag Experiment", and "Template keywords" as siblings to the
evolve extension, instead of nested inside of it.
This is not required for the string below it (that shows up with
`hg help evolution`), as that is one level higher in the hierarchy (not nested
inside of an "Extensions" section), so `=` is appropriate there.
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 17 Feb 2021 14:00:43 -0800 |
parents | 17fac26833da |
children |
rev | line source |
---|---|
3133
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 #!/bin/bash |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 set -euox pipefail |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 unset GREP_OPTIONS |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 |
5080
6db9e2350948
contrib: shellcheck merge-test-compat.sh
Anton Shestakov <av6@dwimlabs.net>
parents:
3133
diff
changeset
|
6 compatbranches=$(hg branches --quiet | grep 'mercurial-' | grep -v ':' | sort -n --reverse) |
3133
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 prev='stable' |
5081
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
8 topic=${1:-'test-compat'} |
3133
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 for branch in $compatbranches; do |
5081
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
10 # Logic in the revsets below: |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
11 # 1. There is target topic on stable or compatibility branch: merge all |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
12 # those commits, they are related to our work and need to pass tests on all |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
13 # compatibility branches. |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
14 # 2. There is no target topic: avoid any commits that have topic set, they |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
15 # are definitely unrelated to what we're doing. |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
16 # In other words, if you want to test certain commits, assign them all to |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
17 # one topic and provide that topic as the first argument to this script. |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
18 uptarget="first(max(branch('$branch') and topic('$topic')) or max(branch('$branch') and not topic()))" |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
19 hg up -r "$uptarget" |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
20 hg topic "$topic" |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
21 mergetarget="first(max(branch('$prev') and topic('$topic')) or max(branch('$prev') and not topic()))" |
17fac26833da
contrib: make merge-test-compat.sh more topic-friendly
Anton Shestakov <av6@dwimlabs.net>
parents:
5080
diff
changeset
|
22 hg merge -r "$mergetarget" |
3133
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 hg commit -m "test-compat: merge $prev into $branch" |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 prev=$branch |
13a4c35f7a0b
util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 done |