chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for branch in the patch id
[stgit]
/
stgit
/
commands
/
id.py
diff --git
a/stgit/commands/id.py
b/stgit/commands/id.py
index 4c07c4fa2d04c0c2ed123352541904f0c17f315b..1cf6ea67460f764a6e12b21e815e1d0cf7cd79ed 100644
(file)
--- a/
stgit/commands/id.py
+++ b/
stgit/commands/id.py
@@
-28,7
+28,9
@@
usage = """%prog [options] [id]
Print the hash value of a GIT id (defaulting to HEAD). In addition to
the standard GIT id's like heads and tags, this command also accepts
Print the hash value of a GIT id (defaulting to HEAD). In addition to
the standard GIT id's like heads and tags, this command also accepts
-'base' and '[<patch>]/(bottom | top)'."""
+'base[@<branch>]' and '[<patch>[@<branch>]][/(bottom | top)]'. If no
+'top' or 'bottom' are passed and <patch> is a valid patch name, 'top'
+will be used by default."""
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one')]
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one')]
@@
-44,4
+46,4
@@
def func(parser, options, args):
else:
parser.error('incorrect number of arguments')
else:
parser.error('incorrect number of arguments')
- print git_id(id_str
, strict = True
)
+ print git_id(id_str)