Infrastructure for current directory handling
[stgit] / stgit / commands / uncommit.py
index 3cf2f0a..a23ae20 100644 (file)
@@ -48,6 +48,7 @@ given commit should be uncommitted.
 Only commits with exactly one parent can be uncommitted; in other
 words, you can't uncommit a merge."""
 
+directory = DirectoryHasRepository()
 options = [make_option('-n', '--number', type = 'int',
                        help = 'uncommit the specified number of commits'),
            make_option('-t', '--to',
@@ -65,7 +66,7 @@ def func(parser, options, args):
         if len(args) != 0:
             parser.error('cannot specify patch name with --to')
         patch_nr = patchnames = None
-        to_commit = git.rev_parse(options.to)
+        to_commit = git_id(options.to)
     elif options.number:
         if options.number <= 0:
             parser.error('invalid value passed to --number')
@@ -129,6 +130,7 @@ def func(parser, options, args):
                      name_email_date(commit.get_author())
         crt_series.new_patch(patchname,
                              can_edit = False, before_existing = True,
+                             commit = False,
                              top = commit_id, bottom = parent,
                              message = commit.get_log(),
                              author_name = author_name,