{"thread":{"id":"8767","subject":"[StGIT PATCH 1/3] Allow \"git show --branch\".","startedAt":"2007-06-28T21:43:59Z","lastAt":"2007-06-28T21:44:15Z","messageCount":4,"participants":["Yann Dirson"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"46003","messageId":"20070628214242.26983.99859.stgit@gandelf.nowhere.earth","threadId":"8767","inReplyTo":null,"subject":"[StGIT PATCH 0/3] cleanup \"show\" and friends","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-28T21:43:59Z","receivedAt":"2007-06-28T21:43:59Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"The following series implements the suggestion for #8453 outlined in\nmy previous mail, and adds a minor improvement for hidden patches.\n\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"},{"id":"46002","messageId":"20070628214404.26983.99522.stgit@gandelf.nowhere.earth","threadId":"8767","inReplyTo":"20070628214242.26983.99859.stgit@gandelf.nowhere.earth","subject":"[StGIT PATCH 1/3] Allow \"git show --branch\".","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-28T21:44:05Z","receivedAt":"2007-06-28T21:44:05Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Signed-off-by: Yann Dirson <ydirson@altern.org>\n---\n\n stgit/commands/show.py |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/commands/show.py b/stgit/commands/show.py\nindex ea4c874..c59ac68 100644\n--- a/stgit/commands/show.py\n+++ b/stgit/commands/show.py\n@@ -30,7 +30,9 @@ Show the commit log and the diff corresponding to the given\n patches. The output is similar to that generated by the 'git show'\n command.\"\"\"\n \n-options = [make_option('-a', '--applied',\n+options = [make_option('-b', '--branch',\n+                       help = 'use BRANCH instead of the default one'),\n+           make_option('-a', '--applied',\n                        help = 'show the applied patches',\n                        action = 'store_true'),\n            make_option('-u', '--unapplied',\n"},{"id":"46004","messageId":"20070628214410.26983.20341.stgit@gandelf.nowhere.earth","threadId":"8767","inReplyTo":"20070628214242.26983.99859.stgit@gandelf.nowhere.earth","subject":"[StGIT PATCH 2/3] Disallow non-patch args to \"stg show\" (gna #8453).","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-28T21:44:10Z","receivedAt":"2007-06-28T21:44:10Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Git-core refs and patch@branch args were not allowed in the\nmultiple-argument form of \"stg show\".  For consistency we completely\ndisallow them: git-core refs are available from git-show, and \"stg\nshow patch@branch\" as \"stg show patch -b branch\".\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n\n stgit/commands/show.py |    7 +------\n 1 files changed, 1 insertions(+), 6 deletions(-)\n\ndiff --git a/stgit/commands/show.py b/stgit/commands/show.py\nindex c59ac68..3bf4f20 100644\n--- a/stgit/commands/show.py\n+++ b/stgit/commands/show.py\n@@ -55,12 +55,7 @@ def func(parser, options, args):\n     elif len(args) == 0:\n         patches = ['HEAD']\n     else:\n-        if len(args) == 1 and args[0].find('..') == -1 \\\n-               and not crt_series.patch_exists(args[0]):\n-            # it might be just a commit id\n-            patches = args\n-        else:\n-            patches = parse_patches(args, applied + unapplied, len(applied))\n+        patches = parse_patches(args, applied + unapplied, len(applied))\n \n     if options.diff_opts:\n         diff_flags = options.diff_opts.split()\n"},{"id":"46005","messageId":"20070628214415.26983.73520.stgit@gandelf.nowhere.earth","threadId":"8767","inReplyTo":"20070628214242.26983.99859.stgit@gandelf.nowhere.earth","subject":"[StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick).","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-28T21:44:15Z","receivedAt":"2007-06-28T21:44:15Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Signed-off-by: Yann Dirson <ydirson@altern.org>\n---\n\n stgit/commands/common.py |    3 ++-\n stgit/commands/log.py    |    3 ++-\n stgit/commands/show.py   |    3 ++-\n 3 files changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/stgit/commands/common.py b/stgit/commands/common.py\nindex b05979b..14dbf67 100644\n--- a/stgit/commands/common.py\n+++ b/stgit/commands/common.py\n@@ -89,7 +89,8 @@ def git_id(rev):\n             patch = series.get_current()\n             if not patch:\n                 raise CmdException, 'No patches applied'\n-        if patch in series.get_applied() or patch in series.get_unapplied():\n+        if patch in series.get_applied() or patch in series.get_unapplied() or \\\n+               patch in series.get_hidden():\n             if patch_id in ['top', '', None]:\n                 return series.get_patch(patch).get_top()\n             elif patch_id == 'bottom':\ndiff --git a/stgit/commands/log.py b/stgit/commands/log.py\nindex e3e17f9..9259290 100644\n--- a/stgit/commands/log.py\n+++ b/stgit/commands/log.py\n@@ -90,7 +90,8 @@ def func(parser, options, args):\n             raise CmdException, 'No patches applied'\n     elif len(args) == 1:\n         name = args[0]\n-        if not name in crt_series.get_applied() + crt_series.get_unapplied():\n+        if not name in crt_series.get_applied() + crt_series.get_unapplied() + \\\n+           crt_series.get_hidden():\n             raise CmdException, 'Unknown patch \"%s\"' % name\n     else:\n         parser.error('incorrect number of arguments')\ndiff --git a/stgit/commands/show.py b/stgit/commands/show.py\nindex 3bf4f20..2b22744 100644\n--- a/stgit/commands/show.py\n+++ b/stgit/commands/show.py\n@@ -55,7 +55,8 @@ def func(parser, options, args):\n     elif len(args) == 0:\n         patches = ['HEAD']\n     else:\n-        patches = parse_patches(args, applied + unapplied, len(applied))\n+        patches = parse_patches(args, applied + unapplied +\\\n+                                crt_series.get_hidden(), len(applied))\n \n     if options.diff_opts:\n         diff_flags = options.diff_opts.split()\n"}]}