Print conflict details with the new infrastructure (bug #11181)
[stgit] / stgit / commands / hide.py
index 1a38907..014febb 100644 (file)
@@ -16,23 +16,26 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 """
 
 import sys, os
-from optparse import OptionParser, make_option
-
+from stgit.argparse import opt
 from stgit.commands.common import *
 from stgit.utils import *
 from stgit.out import *
-from stgit import stack, git
-
-
-help = 'hide a patch in the series'
-usage = """%prog [options] <patch-range>
+from stgit import argparse, stack, git
 
+help = 'Hide a patch in the series'
+kind = 'stack'
+usage = ['[options] <patch-range>']
+description = """
 Hide a range of unapplied patches so that they are no longer shown in
 the plain 'series' command output."""
 
-directory = DirectoryHasRepository()
-options = [make_option('-b', '--branch',
-                       help = 'use BRANCH instead of the default one')]
+args = [argparse.patch_range(argparse.applied_patches,
+                             argparse.unapplied_patches)]
+options = [
+    opt('-b', '--branch', args = [argparse.stg_branches],
+        short = 'Use BRANCH instead of the default branch')]
+
+directory = DirectoryHasRepository(log = True)
 
 def func(parser, options, args):
     """Hide a range of patch in the series