Infrastructure for current directory handling
[stgit] / stgit / commands / rebase.py
index e47772c..bbb3e12 100644 (file)
@@ -29,14 +29,12 @@ usage = """%prog [options] <new-base-id>
 Pop all patches from current stack, move the stack base to the given
 <new-base-id> and push the patches back."""
 
+directory = DirectoryHasRepository()
 options = [make_option('-n', '--nopush',
                        help = 'do not push the patches back after rebasing',
                        action = 'store_true'),
            make_option('-m', '--merged',
                        help = 'check for patches merged upstream',
-                       action = 'store_true'),
-           make_option('--force',
-                       help = 'force rebase even if the stack based was moved by (un)commits',
                        action = 'store_true')]
 
 def func(parser, options, args):
@@ -54,9 +52,9 @@ def func(parser, options, args):
 
     # ensure an exception is raised before popping on non-existent target
     if git_id(args[0]) == None:
-        raise GitException, 'Unknown revision: %s' % git_id
+        raise GitException, 'Unknown revision: %s' % args[0]
         
-    applied = prepare_rebase(force=options.force)
+    applied = prepare_rebase()
     rebase(args[0])
     post_rebase(applied, options.nopush, options.merged)