Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/16314/?format=api
http://patches.dpdk.org/api/patches/16314/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1475245122-23719-1-git-send-email-thomas.monjalon@6wind.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1475245122-23719-1-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1475245122-23719-1-git-send-email-thomas.monjalon@6wind.com", "date": "2016-09-30T14:18:42", "name": "[dpdk-dev,v2] scripts: show fixes with release version of bug", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f5c17c4b5f0dff8ca5e917a6d365eb9b01a7c4cb", "submitter": { "id": 1, "url": "http://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1475245122-23719-1-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/16314/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/16314/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 58B8058C5;\n\tFri, 30 Sep 2016 16:18:48 +0200 (CEST)", "from mail-wm0-f49.google.com (mail-wm0-f49.google.com\n\t[74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 21646E07\n\tfor <dev@dpdk.org>; Fri, 30 Sep 2016 16:18:47 +0200 (CEST)", "by mail-wm0-f49.google.com with SMTP id b4so50155508wmb.0\n\tfor <dev@dpdk.org>; Fri, 30 Sep 2016 07:18:47 -0700 (PDT)", "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184]) by smtp.gmail.com with ESMTPSA id\n\tp13sm4434526wmd.1.2016.09.30.07.18.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 30 Sep 2016 07:18:46 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=xcNwiHzwD3l8+jCebWnhtPzDNb8n4Wbx4QGV1M8vtdg=;\n\tb=qimHYkoBdJwC8ezb7l2AHpeGWXZ/7j7WhF47pITKIUvK61M13qqmsKXTkUB6BX8cvy\n\tpXdCndExJRGQI1Pwne0hnFAhiJHaTVQzpCnnds6VAKX60847mHaZ2xZLaYpTM/anzWRN\n\t26Q+Xabbrb5yvlluZurnbuqFNlO70D2yK69Yj6bq5yAXvvCx7ufEsitq6uBBfNFA8GA5\n\t2IBJqc6kwoyLYrRfDPDgI5800DP/lkEVMpH+VvwnbXonTiz0uTDk8jH9jTO/2JOtYD/K\n\tmYtg44vZdFEvGNrSAaZkT/6M2X9CA6B1JCuNKqd2rxMWykAUFnV86IwJjFHLiBgI28Nd\n\tVgVw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=xcNwiHzwD3l8+jCebWnhtPzDNb8n4Wbx4QGV1M8vtdg=;\n\tb=IBrqzhmCJLKeBfqBF3CyzB72NeeP8Je8n1eXIaGJQtBuN4r2sFGuQZfJzGNXlgpXm4\n\tb726RaWWRos0wwFzUHdnWVE2isRcyxhyuWjtS+BfyJIE+fNAfhc1tKpiR+GGHuie8rJd\n\tzAuzdih4eyBrA+xJFIUUf7zJQfVoV7SUPldl1HRyhhwiTvcjuCeomY7yay97neM0s3O9\n\tO+XkQ24PoJ4MiYVB448DmHxKym4PR5si5pFVsoDk4OwVDZETet80i457PegOeZze3uLi\n\tWrVNeQz6UQQ3NzEgOTDEQE40rRZoZSjuTiZhAQoDTVhrjZN7gOte8/RERV9vmerfoF9j\n\tlsvw==", "X-Gm-Message-State": "AA6/9Rnl8fcxvqe99DA5ksZKlh6Qvy9Mri5s6hPVBkWxIxVNUj/CZPhGFOhKa8btiLWIisZC", "X-Received": "by 10.28.18.11 with SMTP id 11mr4321251wms.79.1475245126683;\n\tFri, 30 Sep 2016 07:18:46 -0700 (PDT)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Cc": "Yuanhan Liu <yuanhan.liu@linux.intel.com>", "Date": "Fri, 30 Sep 2016 16:18:42 +0200", "Message-Id": "<1475245122-23719-1-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.7.0", "In-Reply-To": "<1475142110-8294-1-git-send-email-thomas.monjalon@6wind.com>", "References": "<1475142110-8294-1-git-send-email-thomas.monjalon@6wind.com>", "Subject": "[dpdk-dev] [PATCH v2] scripts: show fixes with release version of\n\tbug", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This script can help to find commits to backport in stable branches.\n\nFixes are found if there is the word \"fix\" in the headline or\nif there is a tag Fixes: or Reverts: in the message.\nChained fixes of fixes are explored to find the oldest origin.\nFixes of not released bugs are ignored.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\nv2: add help, license and maintainers entry\n---\n MAINTAINERS | 1 +\n scripts/git-log-fixes.sh | 120 +++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 121 insertions(+)\n create mode 100755 scripts/git-log-fixes.sh", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 7c33ad4..e64b61d 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -28,6 +28,7 @@ F: scripts/check-maintainers.sh\n F: scripts/check-git-log.sh\n F: scripts/check-includes.sh\n F: scripts/checkpatches.sh\n+F: scripts/git-log-fixes.sh\n F: scripts/load-devel-config\n F: scripts/test-build.sh\n \ndiff --git a/scripts/git-log-fixes.sh b/scripts/git-log-fixes.sh\nnew file mode 100755\nindex 0000000..4824c7f\n--- /dev/null\n+++ b/scripts/git-log-fixes.sh\n@@ -0,0 +1,120 @@\n+#! /bin/sh -e\n+\n+# BSD LICENSE\n+#\n+# Copyright 2016 6WIND S.A.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of 6WIND S.A. nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+print_usage ()\n+{\n+\techo \"usage: $(basename $0) [-h] <git_range>\"\n+}\n+\n+print_help ()\n+{\n+\tprint_usage\n+\tcat <<- END_OF_HELP\n+\n+\tFind fixes to backport on previous versions.\n+\tIt looks for the word \"fix\" in the headline or a tag \"Fixes\" or \"Reverts\".\n+\tThe oldest bug origin is printed as well as partially fixed versions.\n+\tEND_OF_HELP\n+}\n+\n+usage_error () # <message>\n+{\n+\techo \"$*\" >&2\n+\tprint_usage >&2\n+\texit 1\n+}\n+\n+while getopts h ARG ; do\n+\tcase $ARG in\n+\t\th ) print_help ; exit 0 ;;\n+\t\t? ) print_usage >&2 ; exit 1 ;;\n+\tesac\n+done\n+shift $(($OPTIND - 1))\n+[ $# -ge 1 ] || usage_error 'range argument required'\n+range=\"$*\"\n+\n+# get major release version of a commit\n+commit_version () # <hash>\n+{\n+\ttag=$(git tag -l --contains $1 | head -n1)\n+\tif [ -z \"$tag\" ] ; then\n+\t\t# before -rc1 tag of release in progress\n+\t\tmake showversion | cut -d'.' -f-2\n+\telse\n+\t\techo $tag | sed 's,^v,,' | sed 's,-rc.*,,'\n+\tfi\n+}\n+\n+# get bug origin hashes of a fix\n+origin_filter () # <hash>\n+{\n+\tgit log --format='%b' -1 $1 |\n+\tsed -n 's,^ *\\([Ff]ixes\\|[Rr]everts\\): *\\([0-9a-f]*\\).*,\\2,p'\n+}\n+\n+# get oldest major release version of bug origins\n+origin_version () # <origin_hash> ...\n+{\n+\tfor origin in $* ; do\n+\t\t# check hash is valid\n+\t\tgit rev-parse -q --verify $1 >&- || continue\n+\t\t# get version of this bug origin\n+\t\tlocal origver=$(commit_version $origin)\n+\t\tlocal roothashes=$(origin_filter $origin)\n+\t\tif [ -n \"$roothashes\" ] ; then\n+\t\t\t# look chained fix of fix recursively\n+\t\t\tlocal rootver=\"$(origin_version $roothashes)\"\n+\t\t\t[ -n \"$rootver\" ] || continue\n+\t\t\techo \"$rootver (partially fixed in $origver)\"\n+\t\telse\n+\t\t\techo \"$origver\"\n+\t\tfi\n+\t# filter the oldest origin\n+\tdone | sort -uV | head -n1\n+}\n+\n+git log --oneline --reverse $range |\n+while read id headline ; do\n+\torigins=$(origin_filter $id)\n+\t[ -n \"$origins\" ] || echo \"$headline\" | grep -q fix || continue\n+\tversion=$(commit_version $id)\n+\tif [ -n \"$origins\" ] ; then\n+\t\torigver=\"$(origin_version $origins)\"\n+\t\t[ -n \"$origver\" ] || continue\n+\t\t# ignore fix of bug introduced in the same release\n+\t\t! echo \"$origver\" | grep -q \"^$version\" || continue\n+\telse\n+\t\torigver='N/A'\n+\tfi\n+\tprintf '%s %7s %s (%s)\\n' $version $id \"$headline\" \"$origver\"\n+done\n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 16314, "url": "