hgext/mq.py
changeset 16655 6ca125af882f
parent 16654 490ed8972f1b
child 16656 4ae3ba9e4d7a
equal deleted inserted replaced
16654:490ed8972f1b 16655:6ca125af882f
  2523         q.savedirty()
  2523         q.savedirty()
  2524     finally:
  2524     finally:
  2525         wlock.release()
  2525         wlock.release()
  2526 
  2526 
  2527 @command("qgoto",
  2527 @command("qgoto",
  2528          [('f', 'force', None, _('overwrite any local changes')),
  2528          [('c', 'check', None, _('tolerate non-conflicting local changes')),
       
  2529           ('f', 'force', None, _('overwrite any local changes')),
  2529           ('', 'no-backup', None, _('do not save backup copies of files'))],
  2530           ('', 'no-backup', None, _('do not save backup copies of files'))],
  2530          _('hg qgoto [OPTION]... PATCH'))
  2531          _('hg qgoto [OPTION]... PATCH'))
  2531 def goto(ui, repo, patch, **opts):
  2532 def goto(ui, repo, patch, **opts):
  2532     '''push or pop patches until named patch is at top of stack
  2533     '''push or pop patches until named patch is at top of stack
  2533 
  2534 
  2534     Returns 0 on success.'''
  2535     Returns 0 on success.'''
  2535     q = repo.mq
  2536     q = repo.mq
  2536     patch = q.lookup(patch)
  2537     patch = q.lookup(patch)
  2537     nobackup = opts.get('no_backup')
  2538     nobackup = opts.get('no_backup')
       
  2539     check = opts.get('check')
  2538     if q.isapplied(patch):
  2540     if q.isapplied(patch):
  2539         ret = q.pop(repo, patch, force=opts.get('force'), nobackup=nobackup)
  2541         ret = q.pop(repo, patch, force=opts.get('force'), nobackup=nobackup,
       
  2542                     check=check)
  2540     else:
  2543     else:
  2541         ret = q.push(repo, patch, force=opts.get('force'), nobackup=nobackup)
  2544         ret = q.push(repo, patch, force=opts.get('force'), nobackup=nobackup,
       
  2545                      check=check)
  2542     q.savedirty()
  2546     q.savedirty()
  2543     return ret
  2547     return ret
  2544 
  2548 
  2545 @command("qguard",
  2549 @command("qguard",
  2546          [('l', 'list', None, _('list all patches and guards')),
  2550          [('l', 'list', None, _('list all patches and guards')),