Mercurial > hg
comparison hgext/keyword.py @ 8403:553909cd1baa
commit: drop unused p1 and p2 args
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 14 May 2009 13:20:40 -0500 |
parents | 46293a0c7e9f |
children | 223000a687b0 |
comparison
equal
deleted
inserted
replaced
8402:0ad521500424 | 8403:553909cd1baa |
---|---|
449 data = super(kwrepo, self).wread(filename) | 449 data = super(kwrepo, self).wread(filename) |
450 return kwt.wread(filename, data) | 450 return kwt.wread(filename, data) |
451 | 451 |
452 def commit(self, files=None, text='', user=None, date=None, | 452 def commit(self, files=None, text='', user=None, date=None, |
453 match=None, force=False, force_editor=False, | 453 match=None, force=False, force_editor=False, |
454 p1=None, p2=None, extra={}, empty_ok=False): | 454 extra={}, empty_ok=False): |
455 wlock = lock = None | 455 wlock = lock = None |
456 _p1 = _p2 = None | 456 _p1 = _p2 = None |
457 try: | 457 try: |
458 wlock = self.wlock() | 458 wlock = self.wlock() |
459 lock = self.lock() | 459 lock = self.lock() |
463 if name.split('.', 1)[0] == 'commit': | 463 if name.split('.', 1)[0] == 'commit': |
464 commithooks[name] = cmd | 464 commithooks[name] = cmd |
465 ui.setconfig('hooks', name, None) | 465 ui.setconfig('hooks', name, None) |
466 if commithooks: | 466 if commithooks: |
467 # store parents for commit hook environment | 467 # store parents for commit hook environment |
468 if p1 is None: | 468 _p1, _p2 = repo.dirstate.parents() |
469 _p1, _p2 = repo.dirstate.parents() | |
470 else: | |
471 _p1, _p2 = p1, p2 or nullid | |
472 _p1 = hex(_p1) | 469 _p1 = hex(_p1) |
473 if _p2 == nullid: | 470 if _p2 == nullid: |
474 _p2 = '' | 471 _p2 = '' |
475 else: | 472 else: |
476 _p2 = hex(_p2) | 473 _p2 = hex(_p2) |
477 | 474 |
478 n = super(kwrepo, self).commit(files, text, user, date, match, | 475 n = super(kwrepo, self).commit(files, text, user, date, match, |
479 force, force_editor, p1, p2, | 476 force, force_editor, |
480 extra, empty_ok) | 477 extra, empty_ok) |
481 | 478 |
482 # restore commit hooks | 479 # restore commit hooks |
483 for name, cmd in commithooks.iteritems(): | 480 for name, cmd in commithooks.iteritems(): |
484 ui.setconfig('hooks', name, cmd) | 481 ui.setconfig('hooks', name, cmd) |