git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick).

From
Yann Dirson <ydirson@altern.org>
Date
Jun 28, 2007, 21:44 UTC
Message-ID
<20070628214415.26983.73520.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070628214242.26983.99859.stgit@gandelf.nowhere.earth>
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 stgit/commands/common.py |    3 ++-
 stgit/commands/log.py    |    3 ++-
 stgit/commands/show.py   |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/stgit/commands/common.py b/stgit/commands/common.py
index b05979b..14dbf67 100644
--- a/stgit/commands/common.py
+++ b/stgit/commands/common.py
@@ -89,7 +89,8 @@ def git_id(rev):
             patch = series.get_current()
             if not patch:
                 raise CmdException, 'No patches applied'
-        if patch in series.get_applied() or patch in series.get_unapplied():
+        if patch in series.get_applied() or patch in series.get_unapplied() or \
+               patch in series.get_hidden():
             if patch_id in ['top', '', None]:
                 return series.get_patch(patch).get_top()
             elif patch_id == 'bottom':
diff --git a/stgit/commands/log.py b/stgit/commands/log.py
index e3e17f9..9259290 100644
--- a/stgit/commands/log.py
+++ b/stgit/commands/log.py
@@ -90,7 +90,8 @@ def func(parser, options, args):
             raise CmdException, 'No patches applied'
     elif len(args) == 1:
         name = args[0]
-        if not name in crt_series.get_applied() + crt_series.get_unapplied():
+        if not name in crt_series.get_applied() + crt_series.get_unapplied() + \
+           crt_series.get_hidden():
             raise CmdException, 'Unknown patch "%s"' % name
     else:
         parser.error('incorrect number of arguments')
diff --git a/stgit/commands/show.py b/stgit/commands/show.py
index 3bf4f20..2b22744 100644
--- a/stgit/commands/show.py
+++ b/stgit/commands/show.py
@@ -55,7 +55,8 @@ def func(parser, options, args):
     elif len(args) == 0:
         patches = ['HEAD']
     else:
-        patches = parse_patches(args, applied + unapplied, len(applied))
+        patches = parse_patches(args, applied + unapplied +\
+                                crt_series.get_hidden(), len(applied))
 
     if options.diff_opts:
         diff_flags = options.diff_opts.split()
Previous: Yann Dirson
Message 4 of 4 in “cleanup "show" and friends”
  1. 0/3 cleanup "show" and friendsYann Dirson, Jun 28, 2007
  2. 1/3 Allow "git show --branch".Yann Dirson, Jun 28, 2007
  3. 2/3 Disallow non-patch args to "stg show" (gna #8453).Yann Dirson, Jun 28, 2007
  4. 3/3 Make hidden patches visible to various commands (notably log, show, pick).Yann Dirson, Jun 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.