comparison hgext/mq.py @ 8711:1b95c6f13155

mq: fix commit prototype
author Matt Mackall <mpm@selenic.com>
date Wed, 03 Jun 2009 17:07:41 -0500
parents 25e9c71b89de
children bf17aeafb869
comparison
equal deleted inserted replaced
8710:bcb6e5bebd93 8711:1b95c6f13155
2411 if self.mq.applied and not force: 2411 if self.mq.applied and not force:
2412 parent = hex(self.dirstate.parents()[0]) 2412 parent = hex(self.dirstate.parents()[0])
2413 if parent in [s.rev for s in self.mq.applied]: 2413 if parent in [s.rev for s in self.mq.applied]:
2414 raise util.Abort(errmsg) 2414 raise util.Abort(errmsg)
2415 2415
2416 def commit(self, *args, **opts): 2416 def commit(self, text="", user=None, date=None, match=None,
2417 if len(args) >= 6: 2417 force=False, editor=False, extra={}):
2418 force = args[5]
2419 else:
2420 force = opts.get('force')
2421 self.abort_if_wdir_patched( 2418 self.abort_if_wdir_patched(
2422 _('cannot commit over an applied mq patch'), 2419 _('cannot commit over an applied mq patch'),
2423 force) 2420 force)
2424 2421
2425 return super(mqrepo, self).commit(*args, **opts) 2422 return super(mqrepo, self).commit(text, user, date, match, force,
2423 editor, extra)
2426 2424
2427 def push(self, remote, force=False, revs=None): 2425 def push(self, remote, force=False, revs=None):
2428 if self.mq.applied and not force and not revs: 2426 if self.mq.applied and not force and not revs:
2429 raise util.Abort(_('source has mq patches applied')) 2427 raise util.Abort(_('source has mq patches applied'))
2430 return super(mqrepo, self).push(remote, force, revs) 2428 return super(mqrepo, self).push(remote, force, revs)