summaryrefslogtreecommitdiffstats
path: root/extras/git-branch-diff.py
Commit message (Collapse)AuthorAgeFilesLines
* All: run codespell on the code and fix issues.Yaniv Kaul2018-07-221-2/+2
| | | | | | | | | | | | Please review, it's not always just the comments that were fixed. I've had to revert of course all calls to creat() that were changed to create() ... Only compile-tested! Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* core/various: python3 compat, prepare for python2 -> python3Kaleb S. KEITHLEY2018-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see https://review.gluster.org/#/c/19788/, https://review.gluster.org/#/c/19871/, https://review.gluster.org/#/c/19952/, https://review.gluster.org/#/c/20104/, https://review.gluster.org/#/c/20162/, https://review.gluster.org/#/c/20185/, https://review.gluster.org/#/c/20207/, https://review.gluster.org/#/c/20227/, https://review.gluster.org/#/c/20307/, https://review.gluster.org/#/c/20320/, https://review.gluster.org/#/c/20332/, and https://review.gluster.org/#/c/20364/ Fixes glupy.py python2isms, iteritems -> items, and some overlooked print() in georep/peer_mountbroker.in Note: Fedora packaging guidelines and SUSE rpmlint require explicit shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python are not allowed; they must be #!/usr/bin/python2 or #!/usr/bin/python3 Note: Selected small fixes from 2to3 utility. Specifically apply, basestring, funcattrs, has_key, idioms, map, numliterals, raise, set_literal, types, urllib, and zip have already been applied. Also version agnostic imports for urllib, cpickle, socketserver, _thread, queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1 Note: these 2to3 fixes report no changes are necessary: asserts, buffer, exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern, itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw, tuple_params, xreadlines. Change-Id: Idda031c1ec975417c79323aea33e7b694e752b2a updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* core/various: python3 compat, prepare for python2 -> python3Kaleb S. KEITHLEY2018-05-021-23/+24
| | | | | | | | | | see https://review.gluster.org/#/c/19788/ use print fn from __future__ Change-Id: If5075d8d9ca9641058fbc71df8a52aa35804cda4 updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* core/build/various: python3 compat, prepare for python2 -> python3Kaleb S. KEITHLEY2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note 1) we're not supposed to be using #!/usr/bin/env python, see https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Shebang_lines Note 2) we're also not supposed to be using "!/usr/bin/python, see https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out The previous patch (https://review.gluster.org/19767) tried to do too much in one patch, so it was abandoned. This patch does two things: 1) minor cleanup of configure(.ac) to explicitly use python2 2) change all the shebang lines to #!/usr/bin/python2 and add them where they were missing based on warnings emitted during rpmbuild. In a follow-up patch python2 will eventually be changed to python3. Before that python2-isms (e.g. print, string.join(), etc.) need to be converted to python3. Some of those can be rewritten in version agnostic python. E.g. print statements become print() with "from __future_ import print_function". The python 2to3 utility will be used for some of those. Also Aravinda has given guidance in the comments to the first patch for changes. updates: #411 Change-Id: I471730962b2526022115a1fc33629fb078b74338 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* git-branch-diff: wrapper script for git to visualize backportsPrasanna Kumar Kalever2016-05-181-0/+284
This script helps in visualizing backported and missed commits between two different branches, tags or commit ranges. In the list of missed commits, it will help you identify patches which are posted for reviews on gerrit server. While backporting commit to another branch only subject of the patch may remain unchanged, all others such as commit message, commit Id, change Id, bug Id, may be changed. This script works by taking commit subject as the key value for comparing two git branches, which can be local or remote. Help: $ ./extras/git-branch-diff.py --help usage: git-branch-diff.py [-h] [-s SOURCE] -t TARGET [-a AUTHOR] [-p PATH] [-o OPTIONS] git wrapper to diff local or remote branches/tags/commit-ranges optional arguments: -h, --help show this help message and exit -s SOURCE, --source SOURCE source pattern, it could be a branch, tag or a commit range -t TARGET, --target TARGET target pattern, it could be a branch, tag or a commit range -a AUTHOR, --author AUTHOR default: git config name/email, to provide multiple specify comma separated values -p PATH, --path PATH show source and target diff w.r.t given path, to provide multiple specify space in between them -o OPTIONS, --options OPTIONS add other git options such as --after=<>, --before=<> etc. experts use; Sample usages: $ ./extras/git-branch-diff.py -t origin/release-3.8 $ ./extras/git-branch-diff.py -s local_branch -t origin/release-3.7 $ ./extras/git-branch-diff.py -s 4517bf8..e66add8 -t origin/release-3.7 $ ./extras/git-branch-diff.py -s HEAD..c4efd39 -t origin/release-3.7 $ ./extras/git-branch-diff.py -t v3.7.11 --author="author@redhat.com" $ ./extras/git-branch-diff.py -t v3.7.11 --author="authorX, authorY, authorZ" $ ./extras/git-branch-diff.py -t origin/release-3.8 --path="xlators/" $ ./extras/git-branch-diff.py -t origin/release-3.8 --path="./xlators ./rpc" $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="*" $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="All" $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="Null" $ ./extras/git-branch-diff.py -t v3.7.11 --options "--after=2015-03-01 \ --before=2016-01-30" Example output: $ ./extras/git-branch-diff.py -t origin/release-3.8 --path="./rpc" ------------------------------------------------------------ [ ✔ ] Successfully Backported changes: {from: remotes/origin/master to: origin/release-3.8} [84e90b7] server/protocol: option for dynamic authorization of client permissions [5bf6522] rpc: By default set allow-insecure, bind-insecure to on [3af9b53] glusterd: try to connect on GF_PMAP_PORT_FOREIGN aswell [9442e7b] rpc: fix binding brick issue while bind-insecure is enabled [7370633] rpc: assign port only if it is unreserved [88a386b] rpc: fix gf_process_reserved_ports ------------------------------------------------------------ [ ✖ ] Missing patches in origin/release-3.8: All keys already loaded [50ca123] rpc: define client port range (under review) [89759de] glusterd: add defence mechanism to avoid brick port clashes (under review) ------------------------------------------------------------ Note: This script may ignore commits which have altered their commit subjects while backporting patches. Also this script doesn't have any intelligence to detect squashed commits. Change-Id: Ieb27e548c1945a208e2f5d390c99cac82d18a665 BUG: 1336642 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14230 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com>