Description: Do not depend on calling file name in contrib/quilt-{push,pop} 
 scripts.
Author: Johann Felix Soden <johfel@gmx.de>


--- a/contrib/quilt-pop
+++ b/contrib/quilt-pop
@@ -9,10 +9,7 @@
     if not os.path.exists(quilt):
         sys.exit('Can\'t find quilt binary "%s"' % quilt)
 
-    if os.path.basename(args[0]) == 'quilt-pop':
-        unquilt()
-    else:
-        requilt()
+    unquilt()
 
 def load_quilt_top():
     if not os.path.exists(saved): return None
@@ -32,11 +29,4 @@
     if os.system(quilt + ' pop -a > /dev/null') >> 8:
         sys.exit('Failed popping quilt patches!')
 
-def requilt():
-    top = load_quilt_top()
-    if not top: return
-
-    if os.system('quilt push %s > /dev/null' % top) >> 8:
-        sys.exit('Failed pushing quilt patches! Reapply manually')
-
 main(sys.argv)
--- a/contrib/quilt-push
+++ b/contrib/quilt-push
@@ -9,29 +9,12 @@
     if not os.path.exists(quilt):
         sys.exit('Can\'t find quilt binary "%s"' % quilt)
 
-    if os.path.basename(args[0]) == 'quilt-pop':
-        unquilt()
-    else:
-        requilt()
+    requilt()
 
 def load_quilt_top():
     if not os.path.exists(saved): return None
     return open(saved).read().strip()
 
-def save_quilt_top(top):
-    f = open(saved, 'w')
-    f.write(top + '\n')
-    f.close()
-
-def unquilt():
-    top = os.popen(quilt + ' top', 'r').read().strip()
-    if not top: return
-
-    save_quilt_top(top)
-
-    if os.system(quilt + ' pop -a > /dev/null') >> 8:
-        sys.exit('Failed popping quilt patches!')
-
 def requilt():
     top = load_quilt_top()
     if not top: return
