comparison unixSoft/bin/apply-patchbomb @ 333:4b661cede8ad

apply-patchbomb: create obsolete markers, keep partial applications
author Augie Fackler <raf@durin42.com>
date Thu, 05 Jun 2014 21:03:51 -0400
parents e8170eba88cd
children 0b8457903012
comparison
equal deleted inserted replaced
332:ec41fb19c4c8 333:4b661cede8ad
17 'com.apple.Mail') 17 'com.apple.Mail')
18 messages = list(sorted(mail.selection(), 18 messages = list(sorted(mail.selection(),
19 cmp=lambda x,y: cmp(x.subject(), y.subject()))) 19 cmp=lambda x,y: cmp(x.subject(), y.subject())))
20 for m in messages: 20 for m in messages:
21 print 'Applying', m.subject() 21 print 'Applying', m.subject()
22 p = subprocess.Popen(['hg', 'import', '-'], stdin=subprocess.PIPE) 22 p = subprocess.Popen(['hg', 'import', '--partial', '--obsolete', '-'], stdin=subprocess.PIPE)
23 p.stdin.write(m.source()) 23 p.stdin.write(m.source())
24 p.stdin.close() 24 p.stdin.close()
25 if p.wait() != 0: 25 if p.wait() != 0:
26 print 'hg import failed, bailing' 26 print 'hg import failed, bailing'
27 return 2 27 return 2