chiark / gitweb /
Fix more commands to run correctly in subdirectories
[stgit] / stgit / commands / edit.py
index 02970bc8623758e10b454e2af52d58d85f44a4ca..a4d8f963f2a288169ecb326a1f4b6f899c32fac3 100644 (file)
@@ -57,7 +57,7 @@ rejected patch is stored in the .stgit-failed.patch file (and also in
 these files using the '--file' and '--diff' options.
 """
 
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
 options = [make_option('-d', '--diff',
                        help = 'edit the patch diff',
                        action = 'store_true'),
@@ -203,13 +203,13 @@ def func(parser, options, args):
 
     check_local_changes()
     check_conflicts()
-    check_head_top_equal()
+    check_head_top_equal(crt_series)
 
     if pname != crt_pname:
         # Go to the patch to be edited
         applied = crt_series.get_applied()
         between = applied[:applied.index(pname):-1]
-        pop_patches(between)
+        pop_patches(crt_series, between)
 
     if options.author:
         options.authname, options.authemail = name_email(options.author)
@@ -241,4 +241,4 @@ def func(parser, options, args):
     if pname != crt_pname:
         # Push the patches back
         between.reverse()
-        push_patches(between)
+        push_patches(crt_series, between)