Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: linux-3
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (22 sloc) 0.647 kb
#!/usr/bin/python
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)
unquilt()
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!')
main(sys.argv)
Jump to Line
Something went wrong with that request. Please try again.