Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Do not depend on calling file name in contrib/quilt-{push,pop} scripts.

Signed-off-by: Johann Felix Soden <johfel@gmx.de>
Signed-off-by: Stratos Psomadakis <psomas@cslab.ece.ntua.gr>
  • Loading branch information...
commit 77ae64564b98dd7204d279f72ccfa30f2b008dc0 1 parent f553bce
johfel authored December 28, 2011 psomas committed December 28, 2011
12  contrib/quilt-pop
@@ -9,10 +9,7 @@ def main(args):
9 9
     if not os.path.exists(quilt):
10 10
         sys.exit('Can\'t find quilt binary "%s"' % quilt)
11 11
 
12  
-    if os.path.basename(args[0]) == 'quilt-pop':
13  
-        unquilt()
14  
-    else:
15  
-        requilt()
  12
+    unquilt()
16 13
 
17 14
 def load_quilt_top():
18 15
     if not os.path.exists(saved): return None
@@ -32,11 +29,4 @@ def unquilt():
32 29
     if os.system(quilt + ' pop -a > /dev/null') >> 8:
33 30
         sys.exit('Failed popping quilt patches!')
34 31
 
35  
-def requilt():
36  
-    top = load_quilt_top()
37  
-    if not top: return
38  
-
39  
-    if os.system('quilt push %s > /dev/null' % top) >> 8:
40  
-        sys.exit('Failed pushing quilt patches! Reapply manually')
41  
-
42 32
 main(sys.argv)
19  contrib/quilt-push
@@ -9,29 +9,12 @@ def main(args):
9 9
     if not os.path.exists(quilt):
10 10
         sys.exit('Can\'t find quilt binary "%s"' % quilt)
11 11
 
12  
-    if os.path.basename(args[0]) == 'quilt-pop':
13  
-        unquilt()
14  
-    else:
15  
-        requilt()
  12
+    requilt()
16 13
 
17 14
 def load_quilt_top():
18 15
     if not os.path.exists(saved): return None
19 16
     return open(saved).read().strip()
20 17
 
21  
-def save_quilt_top(top):
22  
-    f = open(saved, 'w')
23  
-    f.write(top + '\n')
24  
-    f.close()
25  
-
26  
-def unquilt():
27  
-    top = os.popen(quilt + ' top', 'r').read().strip()
28  
-    if not top: return
29  
-
30  
-    save_quilt_top(top)
31  
-
32  
-    if os.system(quilt + ' pop -a > /dev/null') >> 8:
33  
-        sys.exit('Failed popping quilt patches!')
34  
-
35 18
 def requilt():
36 19
     top = load_quilt_top()
37 20
     if not top: return

0 notes on commit 77ae645

Please sign in to comment.
Something went wrong with that request. Please try again.