-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Maintenance of the integration branch
The upstream project is https://github.com/github/hub.
The script allows to merge pull-requests with the command line, with a nice syntax:
$ hub merge https://github.com/CGAL/cgal/pull/3367
See its README.md
file for more. hub remote add
is also very useful.
That software is packaged by most Linux distributions:
-
Fedora:
dnf install hub
-
Ubuntu, with a PPA:
add-apt-repository ppa:cpick/hub && apt update && apt install hub
-
ArchLinux:
pacman -S hub
First, SSH on the machine cgal.geometryfactory.com, and then:
/home/lrineau/bin/cgal_diff_results 4.14-I-89 4.14-Ic-48 -ICircular_kernel_3
The versions of CGAL to compare must be specified without the CGAL-
prefix. The option -I
options is to ignore several lines of results.
The script uses diff
, and pipes to less
. In less
, the /
key is used to search. I use the pattern:
^\+[^\+].* [^y]|CGAL-.*
to highlight the "title" lines, and the line starting with +
and ending with anything but y
.
Do not forget to have a look at the documentation test results as well!
git fetch --multiple cgal cgal-dev
git checkout integration
git reset --hard cgal/master
# Alternatively: do not reset, and use the version that was used the previous day.
hub merge https://github.com/CGAL/cgal/pull/3367
hub merge https://github.com/CGAL/cgal/pull/3368
# ...
The script ./Scripts/developer_scripts/list_pull_requests.py
is a Python script (compatible with Python 2.7 and Python 3.x).
Its usage is:
% ./Scripts/developer_scripts/list_pull_requests.py 'Under testing'
https://github.com/CGAL/cgal/pull/3464
https://github.com/CGAL/cgal/pull/3463
https://github.com/CGAL/cgal/pull/3454
https://github.com/CGAL/cgal/pull/3437
https://github.com/CGAL/cgal/pull/3323
https://github.com/CGAL/cgal/pull/3293
to list all pull-requests that have a given GitHub label, passed as the argument. The optional argument --unmerged
only lists the pull-request with the label that are not already merged in the current branch.
Usage:
for p in $(python3 ./Scripts/developer_scripts/list_pull_requests.py 'Under Testing' --unmerged); do hub merge $p || { echo $p; break; }; done
The part || { echo $p; break
is responsible for stopping the loop when a PR cannot be merged, after having displayed its URL.
Then open the PR, to:
- tell the author of the PR that there is a conflict,
- remove the 'Under Testing' label,
- and:
git merge --abort
# and restart the loop
In CGAL, the script ./Scripts/developer_scripts/git-show-content
can be used to see a summary of what was merged in the current branch, with the "weight" of the pull-requests.
Quick access
- Information for New Developers
- Developing with Git
- Structure of a CGAL Package
- Building
- Concurrency in CGAL
- License
- Documentation Guidelines
- Reviewing Process
- Testing
- Miscellaneous