Commit graph

56 commits

Author SHA1 Message Date
Wladimir J. van der Laan 10d3ae102a devtools: Auto-set branch to merge to in github-merge
As we are already using the API to retrieve the pull request
title, also retrieve the base branch.

This makes sure that pull requests for 0.12 automatically end up in
0.12, and pull requests for master automatically end up in master,
and so on.

It is still possible to override the branch from the command line
or using the `githubmerge.branch` git option.
2016-04-02 08:13:49 +02:00
Wladimir J. van der Laan 5131005e5b
Merge #7723: build: python 3 compatibility
18f05c7 build: python 3 compatibility (Wladimir J. van der Laan)
2016-03-29 17:22:46 +02:00
Wladimir J. van der Laan 18f05c765c build: python 3 compatibility
Ubuntu 16.04 "xenial xerus" does not come with Python 2.x by default.
It is possible to install a python-2.7 package, but this has its own
problem: no `python` or `python2` symlink (see #7717).

This fixes the following scripts to work with python 3:
- `make check` (bctest,py, bitcoin-util-test.py)
- `make translate` (extract_strings_qt.py)
- `make symbols-check` (symbol-check.py)
- `make security-check` (security-check.py)

Explicitly call the python commands using $(PYTHON) instead
of relying on the interpreter line at the top of the scripts.
2016-03-29 17:20:16 +02:00
Wladimir J. van der Laan f11c5a3cbd devtools: make github-merge.py use py3
This makes github-merge.py the first developer tool to go
all Python 3 (for context see #7717).

The changes are straightforward as the script already was
`from __future__ import division,print_function,unicode_literals`.

However urllib2 changed name, and json will only accept unicode data not
bytes.

This retains py2 compatibility for now: not strictly necessary
as it's not used by the build system - but it was easy.
2016-03-23 13:15:20 +01:00
Gregory Maxwell 89d113e02a Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. 2016-02-01 12:32:57 +00:00
Wladimir J. van der Laan c8a6c11d6d devtools: Fix utf-8 support in messages for github-merge
Use 'utf-8' instead of the Python 2 default of 'ascii' to encode/decode
commit messages.
This can be removed when switching to Python 3, as 'utf-8' is the
default there.
Necessary for merging #7422 due to the ฿ in ฿tcDrak.
2016-01-27 11:45:06 +01:00
Cory Fields 475813ba5b release: add _IO_stdin_used to ignored exports
For details see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
2016-01-26 23:07:04 -05:00
Cory Fields cd27bf51e0 release: fix parsing of BIND_NOW with older readelf 2016-01-26 23:07:04 -05:00
Wladimir J. van der Laan 6a5932bf2a
Merge #7402: [devtools] github-merge get toplevel dir without extra whitespace
5ed2f16 [devtools] github-merge get toplevel dir without extra whitespace (Andrew C)
2016-01-25 15:42:16 +01:00
Andrew C 5ed2f16480 [devtools] github-merge get toplevel dir without extra whitespace
Fixes a bug in github merge when it runs the tests where the toplevel directory has an extra '\n' appended to the path string. Now it doesn't.
2016-01-25 09:02:05 -05:00
Wladimir J. van der Laan 17b5d3896f devtools: show pull and commit information in github-merge
Print the number and title of the pull, as well as the commits to be
merged.
2016-01-22 16:37:42 +01:00
Wladimir J. van der Laan da6d18b6c7 devtools: replace github-merge with python version
This is meant to be a direct translation of the bash script,
with the difference that it retrieves the PR title from github,
thus creating pull messages like:

    Merge #12345: Expose transaction temperature over RPC
2016-01-20 13:02:45 +01:00
Wladimir J. van der Laan 668906fcf2
Merge pull request #7280
faeda0e [travis] Run contrib/devtools/check-doc.py early (MarcoFalke)
fada0c9 [travis] Fail when documentation is outdated (MarcoFalke)
2016-01-19 09:41:32 +01:00
MarcoFalke faeda0e677 [travis] Run contrib/devtools/check-doc.py early 2016-01-18 14:00:02 +01:00
Wladimir J. van der Laan b8f485c472
Merge pull request #7304
fa074a6 [contrib] Prepare clang-format-diff for usage (MarcoFalke)
fa4f4b6 Add clang-format-diff.py from the LLVM svn (MarcoFalke)
2016-01-18 10:49:47 +01:00
calebogden 0331aa350c Fixing typos on security-check.py and torcontrol.cpp 2016-01-08 13:31:42 -08:00
MarcoFalke fa074a6fd0 [contrib] Prepare clang-format-diff for usage 2016-01-06 16:50:06 +01:00
MarcoFalke fa4f4b6974 Add clang-format-diff.py from the LLVM svn
------------------------------------------------------------------------
r249567 | djasper | 2015-10-07 19:00:20 +0200 (Wed, 07 Oct 2015) | 2 lines

clang-format: Add include sorting capabilities to sublime, emacs and
clang-format-diff.py.
------------------------------------------------------------------------
r231926 | djasper | 2015-03-11 15:58:38 +0100 (Wed, 11 Mar 2015) | 3 lines

clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.
------------------------------------------------------------------------
r223685 | djasper | 2014-12-08 20:39:03 +0100 (Mon, 08 Dec 2014) | 1 line

clang-format: Make clang-format-diff.py format java files.
------------------------------------------------------------------------
r221990 | djasper | 2014-11-14 14:27:28 +0100 (Fri, 14 Nov 2014) | 4 lines

clang-format: Give clang-format-diff.py a -v option.

With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.
------------------------------------------------------------------------
r216945 | ed | 2014-09-02 22:59:13 +0200 (Tue, 02 Sep 2014) | 6 lines

Use /usr/bin/env python instead of /usr/bin/python.

On operating systems like the BSDs, it is typically the case that
/usr/bin/python does not exist. We should therefore use /usr/bin/env
instead. This is also done in various other scripts in tools/.

------------------------------------------------------------------------
r208766 | djasper | 2014-05-14 11:36:11 +0200 (Wed, 14 May 2014) | 1 line

clang-format: Add clang-format-diff usage examples for SVN.
------------------------------------------------------------------------
r199750 | djasper | 2014-01-21 16:40:01 +0100 (Tue, 21 Jan 2014) | 3 lines

clang-format: Enable formatting for .proto and .protodevel files.

Support for protocol buffer files seems complete enough.
------------------------------------------------------------------------
r197668 | djasper | 2013-12-19 11:21:37 +0100 (Thu, 19 Dec 2013) | 1 line

Fix usage description of clang-format-diff.py.
------------------------------------------------------------------------
r197608 | alp | 2013-12-18 22:34:07 +0100 (Wed, 18 Dec 2013) | 7 lines

clang-format-diff.py: fix -regex/-iregex matching

While debating the finer points of file extension matching, we somehow missed
the bigger problem that the current code will match anything starting with the
default or user-specified pattern (e.g. lit.site.cfg.in).

Fix this by doing what find(1) does, implicitly wrapping the pattern with ^$.
------------------------------------------------------------------------
r197542 | alp | 2013-12-18 01:58:58 +0100 (Wed, 18 Dec 2013) | 3 lines

clang-format-diff.py: add the OpenCL file extension

It's handled correctly as a C-family language.
------------------------------------------------------------------------
r197378 | alexfh | 2013-12-16 11:57:30 +0100 (Mon, 16 Dec 2013) | 14 lines

Added -iregex for case-insensitive regex to filter file names.

Summary:
-regex and -iregex both mimic options of the find utility.
Made the default list of extensions case-insensitive, so that it's not only C
and CPP extensions are accepted in upper case.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2415
------------------------------------------------------------------------
r196917 | alp | 2013-12-10 14:51:53 +0100 (Tue, 10 Dec 2013) | 10 lines

clang-format-diff.py: Support -regex filter and more filename extensions

Add support for more filename extensions based on the list in the clang
plus JavaScript.

Also adds a -regex option so users can override defaults if they have unusual
file extensions or want to format everything in the diff.

Keeping with tradition the flag is modelled on Unix conventions, this time
matching the semantics of find(1).
------------------------------------------------------------------------
r196484 | alp | 2013-12-05 09:14:54 +0100 (Thu, 05 Dec 2013) | 4 lines

clang-format-diff.py: pass through errors to stderr, not stdout

Also use write() for unified diff output to avoid further processing by the
print function (e.g. trailing newline).
------------------------------------------------------------------------
r196336 | alp | 2013-12-04 01:48:22 +0100 (Wed, 04 Dec 2013) | 3 lines

clang-format-diff.py: Fix 'beintroduced' in help output

Also update docs to reflect recently changed -i inplace edit behaviour.
------------------------------------------------------------------------
r192505 | alexfh | 2013-10-11 23:32:01 +0200 (Fri, 11 Oct 2013) | 17 lines

Changed clang-format-diff.py to output diff by default. Added -i option to apply changes to files instead.

Summary:
"svn diff|clang-format-diff.py" will just output the diff.
Now it's possible to use:
  svn diff|clang-format-diff.py|patch -p0
as an equivalent to:
  svn diff|clang-format-diff.py -i
;)

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1840
------------------------------------------------------------------------
r192184 | djasper | 2013-10-08 17:54:36 +0200 (Tue, 08 Oct 2013) | 7 lines

clang-format: Don't exit with failure on empty files.

Also let clang-format-diff.py detect errors based on clang-format's
return code. Otherwise messages like "Can't find usable .clang-format,
falling back to LLVM style" can make it fail, which might be undesired.

Patch by Alp Toker. Thank you!
------------------------------------------------------------------------
r191820 | djasper | 2013-10-02 15:59:03 +0200 (Wed, 02 Oct 2013) | 18 lines

clang-format: Fix clang-format-diff.py according to diff specification.

Patch by Alp Toker. Many thanks!

Original descriptions:
clang-format-diff incorrectly modifies unchanged lines due to an error
in diff parsing.

The unified diff format has a default line change count of 1, and 0 may
be specified to indicate that no lines have been added. This patch
updates the parser to accurately reflect the diff specification.

This also has the benefit of stabilising the operation so it will
produce the same output when run multiple times on the same changeset,
which was previously not the case.

No tests added because this script is not currently tested (though we
should look into that!)
------------------------------------------------------------------------
r191137 | djasper | 2013-09-21 12:05:02 +0200 (Sat, 21 Sep 2013) | 3 lines

Fix clang-format-diff.py to accept -style again.

Copy and paste error in r190935..
------------------------------------------------------------------------
r190935 | djasper | 2013-09-18 14:14:09 +0200 (Wed, 18 Sep 2013) | 3 lines

Simplify clang-format-diff.py using new clang-format options.

clang-format's -lines parameter makes this significantly easier.
------------------------------------------------------------------------
r189765 | alexfh | 2013-09-02 18:39:23 +0200 (Mon, 02 Sep 2013) | 2 lines

Added WebKit style to the BasedOnStyle handling and to the relevant help messages.

------------------------------------------------------------------------
r182923 | djasper | 2013-05-30 13:50:20 +0200 (Thu, 30 May 2013) | 4 lines

Fix default value of clang-format-diff's -p option.

This way, it has the same default as 'patch' and also the example in the
code makes more sense as it is explicitly setting -p 1.
------------------------------------------------------------------------
r179676 | djasper | 2013-04-17 09:55:02 +0200 (Wed, 17 Apr 2013) | 2 lines

Small improvements to clang-format documentation and integration
scripts.
------------------------------------------------------------------------
r179377 | djasper | 2013-04-12 15:42:36 +0200 (Fri, 12 Apr 2013) | 1 line

Fix clang-format-diff.py script.
------------------------------------------------------------------------
r179098 | djasper | 2013-04-09 17:23:04 +0200 (Tue, 09 Apr 2013) | 5 lines

Improvements to clang-format integrations.

This adds an emacs editor integration (thanks to Ami Fischman). Also
pulls out the style into a variable for the vi integration and just
uses clang-formats defaults style in clang-format-diff.py.
------------------------------------------------------------------------
r177506 | djasper | 2013-03-20 10:53:23 +0100 (Wed, 20 Mar 2013) | 1 line

Add clang-format binary to cfe.
------------------------------------------------------------------------

s
2016-01-06 16:49:51 +01:00
Wladimir J. van der Laan 605c17844e
Merge pull request #7205
fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke)
fa24439 Bump copyright headers to 2015 (MarcoFalke)
fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2016-01-05 14:11:40 +01:00
MarcoFalke fada0c90b6 [travis] Fail when documentation is outdated 2016-01-04 19:24:07 +01:00
Wladimir J. van der Laan 45d13abf4e
Merge pull request #7253
0d59589 Bugfix: update-translations: Allow numerus translations to omit %n specifier (usually when it only has one possible value) (Luke Dashjr)
2016-01-04 12:00:36 +01:00
MarcoFalke fa71669452 [devtools] Use git pretty-format for year parsing 2015-12-26 17:53:42 +01:00
Luke Dashjr 0d595894f0 Bugfix: update-translations: Allow numerus translations to omit %n specifier (usually when it only has one possible value) 2015-12-25 13:15:01 +00:00
MarcoFalke fa6ad855e9 [devtools] Rewrite fix-copyright-headers.py 2015-12-13 18:07:36 +01:00
MarcoFalke fad246037f Update contrib/devtools/README.md
* Fix order
* Update subtree check
2015-12-02 15:20:40 +01:00
Wladimir J. van der Laan 93236c0455
qt: Final translation update before 0.12 fork
- Add new translations (finally, after a long time)
- update-translation script was not considering new translations - oops
  - fixed this, also remove (nearly) empty translations
- Update translation process, it was still describing the old repository
  structure
2015-12-02 14:28:35 +01:00
Wladimir J. van der Laan 9f251b7a9d devtools: add libraries for bitcoin-qt to symbol check
Forgot to add these.
Also add a short description for each required library.
2015-11-16 16:39:23 +01:00
MarcoFalke 0af8fe45ae devtools: Update README.md 2015-11-04 13:05:25 +01:00
Wladimir J. van der Laan fa1d252e82
Merge pull request #6790
8c15f33 [trivial] Update contrib/devtools/README.md (MarcoFalke)
338f62f [devtools] add clang-format.py (MarcoFalke)
2015-10-23 10:45:50 +02:00
Wladimir J. van der Laan 579b863cd7 devtools: Add security-check.py
Perform the following ELF security checks:

- PIE: Check for position independent executable (PIE), allowing for address space randomization
- NX: Check that no sections are writable and executable (including the stack)
- RELRO: Check for read-only relocations, binding at startup
- Canary: Check for use of stack canary

Also add a check to symbol-check.py that checks that only the subset of
allowed libraries is imported (to avoid incompatibilities).
2015-10-22 03:35:38 +02:00
MarcoFalke 8c15f33d15 [trivial] Update contrib/devtools/README.md 2015-10-15 20:28:29 +02:00
MarcoFalke 338f62f701 [devtools] add clang-format.py 2015-10-15 19:43:16 +02:00
MarcoFalke 3507992bcf [trivial] Make optimize-pngs.py also cover share/pixmaps
Also fix:
"Exception: tostring() has been removed. Please call tobytes() instead."
2015-10-09 17:09:05 +02:00
Wladimir J. van der Laan 3802ae7267 devtools: don't push if signing fails in github-merge
If a problem happens with gpg, exit prematurely so that it doesn't push
the branch upstream.
2015-09-18 06:03:17 +02:00
Marco 9142867572 [QT] cleanup icons
* Cleanup SVG code
* Unify design ("Typicons" seem to have round edges)
* Fix transparency issue with clock5.png
2015-08-04 12:06:12 +02:00
Pieter Wuille 5ff94c630e Add git-subtree-check.sh script 2015-04-02 17:52:52 -07:00
Wladimir J. van der Laan aaba10f275
Revert "Make nicer pull request merge messages"
This reverts commit 1078fb0885 (and thus
pull #5623). It has various issues:

- Pull request names get cut off at ", see e.g. a026a56

- Merge script no longer copes with pulls that have a milestone
  attached, due to a duplicate 'title' in JSON that is not handled by the
  ad-hoc parsing.
2015-02-20 09:59:33 +01:00
Wladimir J. van der Laan f69941620b
Merge #5623: Make nicer pull request merge messages
1078fb0 Make nicer pull request merge messages (BtcDrak)
2015-02-09 12:53:00 +01:00
Wladimir J. van der Laan 905711f0a1 contrib: improve optimize-pngs.py
- Check that image contents match pre- and post- crushing.
- Also remove use of external tool to compute sha256 in favor of hashlib.
- contrib: remove all use of shell=True in strip_pngs.py
  Using `shell=True` can be a security hazard. See e.g.
  https://docs.python.org/2/library/subprocess.html#subprocess.check_output
2015-01-14 17:19:04 +01:00
Jonas Schnelli 42f6a0c2b9 [Qt] optimize PNG files
- provide a python script
- add optimized png files
2015-01-14 17:18:48 +01:00
BtcDrak 1078fb0885
Make nicer pull request merge messages 2015-01-11 09:12:40 +00:00
Wladimir J. van der Laan 39c809942d contrib: make github-merge require signing
- Exit when there is no signing key configured
- Exit when user does not want to sign off
2014-12-20 13:58:51 +01:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Michael Ford 78253fcbad Remove references to X11 licence 2014-12-16 15:56:50 +08:00
Wladimir J. van der Laan 6e6a36ce30 contrib: show pull # in prompt for github-merge script 2014-12-09 10:16:58 +01:00
Wladimir J. van der Laan cd3269e38e
contrib: revert changes to github-merge.sh in #5038 2014-10-07 10:00:12 +02:00
Luke Dashjr 0b17964131 Bugfix: Replace bashisms with standard sh in tests/tools 2014-10-03 23:45:26 +00:00
Wladimir J. van der Laan da59f28335 Add deeper XML checking to update-translation script
- Catch problems such as mismatched formatting characters. Remove
  messages that can give problems at runtime.

- Also remove unfinished/untranslated messages, they just take up space
  in the ts and waste parsing time.

Fixes #4774.
2014-09-01 10:06:15 +02:00
Gavin Andresen c53b1ece1b
Fix github-merge with git version 2.1.0
Running git version 2.1.0 on OSX (homebrew), I get
  fatal: '1q': not a non-negative integer

I'm guessing git command-line parsing got more strict recently?
2014-08-19 13:47:37 -04:00
Wladimir J. van der Laan 27116e87cc
devtools: Exclude default exports from symbol-checker script
See discussion in #4663.
2014-08-17 10:07:46 +02:00