Make sure the refid given to 'mail' has the angle brackets
[stgit] / stgit / commands / top.py
index 1d6ab5e..e7cb275 100644 (file)
@@ -21,6 +21,7 @@ from optparse import OptionParser, make_option
 
 from stgit.commands.common import *
 from stgit.utils import *
+from stgit.out import *
 from stgit import stack, git
 
 
@@ -29,7 +30,9 @@ usage = """%prog [options]
 
 Print the name of the current (topmost) patch."""
 
-options = []
+directory = DirectoryHasRepository()
+options = [make_option('-b', '--branch',
+                       help = 'use BRANCH instead of the default one')]
 
 
 def func(parser, options, args):
@@ -40,6 +43,6 @@ def func(parser, options, args):
 
     name = crt_series.get_current()
     if name:
-        print name
+        out.stdout(name)
     else:
         raise CmdException, 'No patches applied'