Rename "stg coalesce" to "stg squash"
[stgit] / stgit / commands / id.py
index 3819acc..566edcc 100644 (file)
@@ -15,15 +15,15 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 """
 
-from optparse import OptionParser, make_option
-
 from stgit.out import out
 from stgit.commands import common
 from stgit.lib import stack
+from stgit import argparse
 
-help = 'print the GIT hash value of a StGIT reference'
-usage = """%prog [options] [id]
-
+help = 'Print the git hash value of a StGit reference'
+kind = 'repo'
+usage = ['[options] [id]']
+description = """
 Print the SHA1 value of a Git id (defaulting to HEAD). In addition to
 the standard Git id's like heads and tags, this command also accepts
 '[<branch>:]<patch>' and '[<branch>:]{base}' showing the id of a patch
@@ -31,9 +31,12 @@ or the base of the stack. If no branch is specified, it defaults to the
 current one. The bottom of a patch is accessible with the
 '[<branch>:]<patch>^' format."""
 
-directory = common.DirectoryHasRepositoryLib()
+args = [argparse.applied_patches, argparse.unapplied_patches,
+        argparse.hidden_patches]
 options = []
 
+directory = common.DirectoryHasRepositoryLib()
+
 def func(parser, options, args):
     """Show the applied patches
     """