Commit f466082c authored by Brad King's avatar Brad King

Merge topic 'contribute-through-gitlab'

140357ea CONTRIBUTING: Document contribution through the Kitware GitLab Instance
56b707dd README: Add section about reporting bugs
33f828d4 README: Convert from `.txt` to `.rst` markup
5f206c3a Tell Git to use a distinct conflict marker size in `.rst` files
17a1200c Convert developer setup scripts away from Gerrit Code Review
41a7fe5b Add pre-commit hook to check whether SetupForDevelopment must re-run
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !1
parents 71ba7b1a 140357ea
.git* export-ignore
.gitattributes -export-ignore
.hooks* export-ignore
/GitSetup export-ignore
/SetupForDevelopment.sh export-ignore eol=lf
/clang-format.bash export-ignore eol=lf
/.clang-format export-ignore
/CONTRIBUTING.rst conflict-marker-size=78
*.c whitespace=tab-in-indent,no-lf-at-eof
*.h whitespace=tab-in-indent,no-lf-at-eof
*.h.in whitespace=tab-in-indent,no-lf-at-eof
......@@ -16,3 +15,5 @@
*.hxx.in whitespace=tab-in-indent,no-lf-at-eof
*.txt whitespace=tab-in-indent,no-lf-at-eof
*.cmake whitespace=tab-in-indent,no-lf-at-eof
*.rst whitespace=tab-in-indent conflict-marker-size=79
[hooks "chain"]
pre-commit = GitSetup/pre-commit
Contributing to KWSys
*********************
Overview
========
Patches
=======
KWSys is kept in its own Git repository and shared by several projects
via copies in their source trees. Changes to KWSys should not be made
directly in a host project, except perhaps in maintenance branches.
Please visit
http://public.kitware.com/Wiki/KWSys/Git
KWSys uses `Kitware's GitLab Instance`_ to manage development and code review.
To contribute patches:
to contribute changes directly to KWSys upstream. Once changes are
reviewed, tested, and integrated there then the copies of KWSys within
dependent projects can be updated to get the changes.
#. Fork the upstream `KWSys Repository`_ into a personal account.
#. Base all new work on the upstream ``master`` branch.
#. Create commits making incremental, distinct, logically complete changes.
#. Push a topic branch to a personal repository fork on GitLab.
#. Create a GitLab Merge Request targeting the upstream ``master`` branch.
Issues
======
Once changes are reviewed, tested, and integrated to KWSys upstream then
copies of KWSys within dependent projects can be updated to get the changes.
KWSys has no independent issue tracker. After encountering an issue
(bug) please try to submit a patch using the above instructions.
Otherwise please report the issue to the tracker for the project that
hosts the copy of KWSys in which the problem was found.
.. _`Kitware's GitLab Instance`: https://gitlab.kitware.com
.. _`KWSys Repository`: https://gitlab.kitware.com/utils/kwsys
Code Style
==========
......@@ -36,7 +35,6 @@ See also the `clang-format.bash`_ script.
.. _`.clang-format`: .clang-format
.. _`clang-format.bash`: clang-format.bash
License
=======
......
[hooks]
url = http://public.kitware.com/GitSetup.git
[gerrit]
project = KWSys
site = http://review.source.kitware.com
pushurl = $username@review.source.kitware.com:KWSys
url = https://gitlab.kitware.com/utils/gitsetup.git
[upstream]
url = https://gitlab.kitware.com/utils/kwsys.git
#!/usr/bin/env bash
egrep-q() {
egrep "$@" >/dev/null 2>/dev/null
}
die() {
echo 'pre-commit hook failure' 1>&2
echo '-----------------------' 1>&2
echo '' 1>&2
echo "$@" 1>&2
exit 1
}
#-----------------------------------------------------------------------------
# Check that developmer setup is up-to-date.
lastSetupForDevelopment=$(git config --get hooks.SetupForDevelopment || echo 0)
eval $(grep '^SetupForDevelopment_VERSION=' "${BASH_SOURCE%/*}/../SetupForDevelopment.sh")
test -n "$SetupForDevelopment_VERSION" || SetupForDevelopment_VERSION=0
if test $lastSetupForDevelopment -lt $SetupForDevelopment_VERSION; then
die 'Developer setup in this work tree is out of date. Please re-run
./SetupForDevelopment.sh
'
fi
#!/usr/bin/env bash
echo "Adding 'git prepush' alias" &&
git config alias.prepush 'log --graph --stat origin/master..' &&
echo "Adding 'git gerrit-push' alias" &&
git config alias.gerrit-push "!bash GitSetup/git-gerrit-push" &&
gerrit_disabled="KWSys no longer uses Gerrit. Please use GitLab." &&
git config alias.gerrit-push '!sh -c "echo '"${gerrit_disabled}"'"' &&
true
KWSys
*****
Introduction
============
KWSys is the Kitware System Library. It provides platform-independent
APIs to many common system features that are implemented differently on
every platform. This library is intended to be shared among many
projects at the source level, so it has a configurable namespace.
Each project should configure KWSys to use a namespace unique to itself.
See comments in `CMakeLists.txt`_ for details.
.. _`CMakeLists.txt`: CMakeLists.txt
License
=======
KWSys is distributed under the OSI-approved BSD 3-clause License.
See `Copyright.txt`_ for details.
.. _`Copyright.txt`: Copyright.txt
Reporting Bugs
==============
KWSys has no independent issue tracker. After encountering an issue
(bug) please submit a patch using the instructions for `Contributing`_.
Otherwise please report the issue to the tracker for the project that
hosts the copy of KWSys in which the problem was found.
Contributing
============
See `CONTRIBUTING.rst`_ for instructions to contribute.
.. _`CONTRIBUTING.rst`: CONTRIBUTING.rst
KWSys provides a platform-independent API to many common system
features that are implemented differently on every platform. This
library is intended to be shared among many projects, so it has a
configurable namespace. Each project should configure KWSys to use a
namespace unique to itself. See comments in CMakeLists.txt for
details.
You are probably reading this file in the source tree of a surrounding
project. In that case, see "../README.kwsys" for details of using
KWSys in your project.
See CONTRIBUTING.rst for instructions to contribute KWSys changes.
......@@ -3,10 +3,18 @@
cd "${BASH_SOURCE%/*}" &&
GitSetup/setup-user && echo &&
GitSetup/setup-hooks && echo &&
GitSetup/setup-gerrit && echo &&
GitSetup/setup-aliases && echo &&
GitSetup/setup-upstream && echo &&
GitSetup/tips
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
# Disable Gerrit hook explicitly so the commit-msg hook will
# not complain even if some gerrit remotes are still configured.
git config hooks.GerritId false
# Record the version of this setup so Scripts/pre-commit can check it.
SetupForDevelopment_VERSION=2
git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment