Bug 1336642 - [RFE] git-branch-diff: wrapper script for git to visualize backports
Summary: [RFE] git-branch-diff: wrapper script for git to visualize backports
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Prasanna Kumar Kalever
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-17 06:33 UTC by Prasanna Kumar Kalever
Modified: 2017-03-27 18:11 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.9.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-27 18:11:09 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Prasanna Kumar Kalever 2016-05-17 06:33:44 UTC
Description of problem:

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"
  $ ./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.


Version-Release number of selected component (if applicable):
mainline

Comment 1 Vijay Bellur 2016-05-17 06:36:42 UTC
REVIEW: http://review.gluster.org/14230 (git-branch-diff: wrapper script for git to visualize backports) posted (#3) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 2 Vijay Bellur 2016-05-18 17:11:06 UTC
COMMIT: http://review.gluster.org/14230 committed in master by Jeff Darcy (jdarcy) 
------
commit b923f8c08f9401e8301ac53c79231051c2d0fb00
Author: Prasanna Kumar Kalever <prasanna.kalever>
Date:   Thu May 5 13:20:10 2016 +0530

    git-branch-diff: wrapper script for git to visualize backports
    
    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"
      $ ./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>
    Reviewed-on: http://review.gluster.org/14230
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Tested-by: Prasanna Kumar Kalever <pkalever>
    Reviewed-by: Raghavendra Talur <rtalur>
    CentOS-regression: Gluster Build System <jenkins.com>
    Smoke: Gluster Build System <jenkins.com>

Comment 3 Shyamsundar 2017-03-27 18:11:09 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.9.0, please open a new bug report.

glusterfs-3.9.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.