Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/mq.py @ 2804:4b20daa25f15
Update mq to use new logmessage arglist from 2794:bd8a9a94139f
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 07 Aug 2006 14:12:03 -0700 |
parents | 987c31e2a08c |
children | 52516e48e3f3 30f59f4a327e |
comparison
equal
deleted
inserted
replaced
2803:987c31e2a08c | 2804:4b20daa25f15 |
---|---|
1281 | 1281 |
1282 -m or -l set the patch header as well as the commit message. | 1282 -m or -l set the patch header as well as the commit message. |
1283 If neither is specified, the patch header is empty and the | 1283 If neither is specified, the patch header is empty and the |
1284 commit message is 'New patch: PATCH'""" | 1284 commit message is 'New patch: PATCH'""" |
1285 q = repo.mq | 1285 q = repo.mq |
1286 message = commands.logmessage(**opts) | 1286 message = commands.logmessage(opts) |
1287 q.new(repo, patch, msg=message, force=opts['force']) | 1287 q.new(repo, patch, msg=message, force=opts['force']) |
1288 q.save_dirty() | 1288 q.save_dirty() |
1289 return 0 | 1289 return 0 |
1290 | 1290 |
1291 def refresh(ui, repo, **opts): | 1291 def refresh(ui, repo, **opts): |
1292 """update the current patch""" | 1292 """update the current patch""" |
1293 q = repo.mq | 1293 q = repo.mq |
1294 message = commands.logmessage(**opts) | 1294 message = commands.logmessage(opts) |
1295 if opts['edit']: | 1295 if opts['edit']: |
1296 if message: | 1296 if message: |
1297 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) | 1297 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) |
1298 patch = q.applied[-1].name | 1298 patch = q.applied[-1].name |
1299 (message, comment, user, date, hasdiff) = q.readheaders(patch) | 1299 (message, comment, user, date, hasdiff) = q.readheaders(patch) |
1326 if not files: | 1326 if not files: |
1327 raise util.Abort(_('qfold requires at least one patch name')) | 1327 raise util.Abort(_('qfold requires at least one patch name')) |
1328 if not q.check_toppatch(repo): | 1328 if not q.check_toppatch(repo): |
1329 raise util.Abort(_('No patches applied\n')) | 1329 raise util.Abort(_('No patches applied\n')) |
1330 | 1330 |
1331 message = commands.logmessage(**opts) | 1331 message = commands.logmessage(opts) |
1332 if opts['edit']: | 1332 if opts['edit']: |
1333 if message: | 1333 if message: |
1334 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) | 1334 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) |
1335 | 1335 |
1336 parent = q.lookup('qtip') | 1336 parent = q.lookup('qtip') |
1503 return 0 | 1503 return 0 |
1504 | 1504 |
1505 def save(ui, repo, **opts): | 1505 def save(ui, repo, **opts): |
1506 """save current queue state""" | 1506 """save current queue state""" |
1507 q = repo.mq | 1507 q = repo.mq |
1508 message = commands.logmessage(**opts) | 1508 message = commands.logmessage(opts) |
1509 ret = q.save(repo, msg=message) | 1509 ret = q.save(repo, msg=message) |
1510 if ret: | 1510 if ret: |
1511 return ret | 1511 return ret |
1512 q.save_dirty() | 1512 q.save_dirty() |
1513 if opts['copy']: | 1513 if opts['copy']: |