Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (22 sloc) 647 Bytes
import os, sys
quilt = '/usr/bin/quilt'
saved = '.saved-quilt-top'
def main(args):
if not os.path.exists(quilt):
sys.exit('Can\'t find quilt binary "%s"' % quilt)
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')
def unquilt():
top = os.popen(quilt + ' top', 'r').read().strip()
if not top: return
if os.system(quilt + ' pop -a > /dev/null') >> 8:
sys.exit('Failed popping quilt patches!')
Jump to Line
Something went wrong with that request. Please try again.