* [StGIT PATCH 0/3] cleanup "show" and friends
@ 2007-06-28 21:43 Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 1/3] Allow "git show --branch" Yann Dirson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yann Dirson @ 2007-06-28 21:43 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
The following series implements the suggestion for #8453 outlined in
my previous mail, and adds a minor improvement for hidden patches.
--
Yann Dirson <ydirson@altern.org> |
Debian-related: <dirson@debian.org> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [StGIT PATCH 1/3] Allow "git show --branch".
2007-06-28 21:43 [StGIT PATCH 0/3] cleanup "show" and friends Yann Dirson
@ 2007-06-28 21:44 ` Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 2/3] Disallow non-patch args to "stg show" (gna #8453) Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick) Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2007-06-28 21:44 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
stgit/commands/show.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/show.py b/stgit/commands/show.py
index ea4c874..c59ac68 100644
--- a/stgit/commands/show.py
+++ b/stgit/commands/show.py
@@ -30,7 +30,9 @@ Show the commit log and the diff corresponding to the given
patches. The output is similar to that generated by the 'git show'
command."""
-options = [make_option('-a', '--applied',
+options = [make_option('-b', '--branch',
+ help = 'use BRANCH instead of the default one'),
+ make_option('-a', '--applied',
help = 'show the applied patches',
action = 'store_true'),
make_option('-u', '--unapplied',
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [StGIT PATCH 2/3] Disallow non-patch args to "stg show" (gna #8453).
2007-06-28 21:43 [StGIT PATCH 0/3] cleanup "show" and friends Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 1/3] Allow "git show --branch" Yann Dirson
@ 2007-06-28 21:44 ` Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick) Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2007-06-28 21:44 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
Git-core refs and patch@branch args were not allowed in the
multiple-argument form of "stg show". For consistency we completely
disallow them: git-core refs are available from git-show, and "stg
show patch@branch" as "stg show patch -b branch".
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
stgit/commands/show.py | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/stgit/commands/show.py b/stgit/commands/show.py
index c59ac68..3bf4f20 100644
--- a/stgit/commands/show.py
+++ b/stgit/commands/show.py
@@ -55,12 +55,7 @@ def func(parser, options, args):
elif len(args) == 0:
patches = ['HEAD']
else:
- if len(args) == 1 and args[0].find('..') == -1 \
- and not crt_series.patch_exists(args[0]):
- # it might be just a commit id
- patches = args
- else:
- patches = parse_patches(args, applied + unapplied, len(applied))
+ patches = parse_patches(args, applied + unapplied, len(applied))
if options.diff_opts:
diff_flags = options.diff_opts.split()
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick).
2007-06-28 21:43 [StGIT PATCH 0/3] cleanup "show" and friends Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 1/3] Allow "git show --branch" Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 2/3] Disallow non-patch args to "stg show" (gna #8453) Yann Dirson
@ 2007-06-28 21:44 ` Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2007-06-28 21:44 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
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()
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-28 21:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 21:43 [StGIT PATCH 0/3] cleanup "show" and friends Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 1/3] Allow "git show --branch" Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 2/3] Disallow non-patch args to "stg show" (gna #8453) Yann Dirson
2007-06-28 21:44 ` [StGIT PATCH 3/3] Make hidden patches visible to various commands (notably log, show, pick) Yann Dirson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).