##// END OF EJS Templates
Fix qfold after recent changes
Brendan Cully -
r2936:21bf8929 default
parent child Browse files
Show More
@@ -1470,20 +1470,21 b' def fold(ui, repo, *files, **opts):'
1470 1470 patches = []
1471 1471 messages = []
1472 1472 for f in files:
1473 patch = q.lookup(f)
1474 if patch in patches or patch == parent:
1475 ui.warn(_('Skipping already folded patch %s') % patch)
1476 if q.isapplied(patch):
1477 raise util.Abort(_('qfold cannot fold already applied patch %s') % patch)
1478 patches.append(patch)
1473 p = q.lookup(f)
1474 if p in patches or p == parent:
1475 ui.warn(_('Skipping already folded patch %s') % p)
1476 if q.isapplied(p):
1477 raise util.Abort(_('qfold cannot fold already applied patch %s') % p)
1478 patches.append(p)
1479 1479
1480 for patch in patches:
1480 for p in patches:
1481 1481 if not message:
1482 messages.append(q.readheaders(patch)[0])
1483 pf = q.join(patch)
1482 messages.append(q.readheaders(p)[0])
1483 pf = q.join(p)
1484 1484 (patchsuccess, files, fuzz) = q.patch(repo, pf)
1485 1485 if not patchsuccess:
1486 raise util.Abort(_('Error folding patch %s') % patch)
1486 raise util.Abort(_('Error folding patch %s') % p)
1487 patch.updatedir(ui, repo, files)
1487 1488
1488 1489 if not message:
1489 1490 message, comments, user = q.readheaders(parent)[0:3]
@@ -1496,10 +1497,7 b' def fold(ui, repo, *files, **opts):'
1496 1497 message = ui.edit(message, user or ui.username())
1497 1498
1498 1499 q.refresh(repo, msg=message)
1499
1500 for patch in patches:
1501 q.delete(repo, patch, keep=opts['keep'])
1502
1500 q.delete(repo, patches, keep=opts['keep'])
1503 1501 q.save_dirty()
1504 1502
1505 1503 def guard(ui, repo, *args, **opts):
General Comments 0
You need to be logged in to leave comments. Login now