Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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 johfel authored committed
Showing with 2 additions and 29 deletions.
  1. +1 −11 contrib/quilt-pop
  2. +1 −18 contrib/quilt-push
View
12 contrib/quilt-pop
@@ -9,10 +9,7 @@ def main(args):
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 @@ def unquilt():
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)
View
19 contrib/quilt-push
@@ -9,29 +9,12 @@ def main(args):
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
Please sign in to comment.
Something went wrong with that request. Please try again.