Mercurial > dotfiles
comparison unixSoft/bin/apply-patchbomb @ 339:07053ec3c643
Merge
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 18 Jul 2014 20:16:20 -0400 |
parents | 4b661cede8ad |
children | 0b8457903012 |
comparison
equal
deleted
inserted
replaced
338:3f3d52956ff7 | 339:07053ec3c643 |
---|---|
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 |