Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 3664:cabe62800120
Export changelog dict in localrepo.commit
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 08 Nov 2006 11:28:33 -0800 |
parents | 44247ecc2965 |
children | 6f6696962986 |
comparison
equal
deleted
inserted
replaced
3626:02e9355c3420 | 3664:cabe62800120 |
---|---|
579 return self.commit(files=files, text=text, user=user, date=date, | 579 return self.commit(files=files, text=text, user=user, date=date, |
580 p1=p1, p2=p2, wlock=wlock) | 580 p1=p1, p2=p2, wlock=wlock) |
581 | 581 |
582 def commit(self, files=None, text="", user=None, date=None, | 582 def commit(self, files=None, text="", user=None, date=None, |
583 match=util.always, force=False, lock=None, wlock=None, | 583 match=util.always, force=False, lock=None, wlock=None, |
584 force_editor=False, p1=None, p2=None): | 584 force_editor=False, p1=None, p2=None, extra={}): |
585 | 585 |
586 commit = [] | 586 commit = [] |
587 remove = [] | 587 remove = [] |
588 changed = [] | 588 changed = [] |
589 use_dirstate = (p1 is None) # not rawcommit | 589 use_dirstate = (p1 is None) # not rawcommit |
590 extra = extra.copy() | |
590 | 591 |
591 if use_dirstate: | 592 if use_dirstate: |
592 if files: | 593 if files: |
593 for f in files: | 594 for f in files: |
594 s = self.dirstate.state(f) | 595 s = self.dirstate.state(f) |
691 while lines and not lines[0]: | 692 while lines and not lines[0]: |
692 del lines[0] | 693 del lines[0] |
693 if not lines: | 694 if not lines: |
694 return None | 695 return None |
695 text = '\n'.join(lines) | 696 text = '\n'.join(lines) |
696 extra = {} | |
697 if branchname: | 697 if branchname: |
698 extra["branch"] = branchname | 698 extra["branch"] = branchname |
699 n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, | 699 n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, |
700 user, date, extra) | 700 user, date, extra) |
701 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, | 701 self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, |