chiark / gitweb /
Infrastructure for current directory handling
[stgit] / stgit / commands / id.py
index 4226adf9be41fcc6d9889046bdc8ce02a416966d..3e28f2f13effc57695fb5d8a147511f52337c37f 100644 (file)
@@ -20,6 +20,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
 
 
@@ -32,6 +33,7 @@ the standard GIT id's like heads and tags, this command also accepts
 'top' or 'bottom' are passed and <patch> is a valid patch name, 'top'
 will be used by default."""
 
+directory = DirectoryHasRepository()
 options = [make_option('-b', '--branch',
                        help = 'use BRANCH instead of the default one')]
 
@@ -46,4 +48,4 @@ def func(parser, options, args):
     else:
         parser.error('incorrect number of arguments')
 
-    print git_id(id_str)
+    out.stdout(git_id(id_str))