789 else: |
789 else: |
790 p1, p2 = p1, p2 or nullid |
790 p1, p2 = p1, p2 or nullid |
791 update_dirstate = (self.dirstate.parents()[0] == p1) |
791 update_dirstate = (self.dirstate.parents()[0] == p1) |
792 changes = [files, [], [], [], []] |
792 changes = [files, [], [], [], []] |
793 |
793 |
794 wctx = context.workingctx(self, (p1, p2), text, user, date, |
794 wctx = context.workingctx(self, (p1, p2), text, user, date, |
795 extra, changes) |
795 extra, changes) |
796 return self._commitctx(wctx, force, force_editor, empty_ok, |
796 return self._commitctx(wctx, force, force_editor, empty_ok, |
797 use_dirstate, update_dirstate) |
797 use_dirstate, update_dirstate) |
798 finally: |
798 finally: |
799 del lock, wlock |
799 del lock, wlock |
800 |
800 |
801 def commitctx(self, ctx): |
801 def commitctx(self, ctx): |
802 wlock = lock = None |
802 wlock = lock = None |
803 try: |
803 try: |
804 wlock = self.wlock() |
804 wlock = self.wlock() |
805 lock = self.lock() |
805 lock = self.lock() |
806 return self._commitctx(ctx, force=True, force_editor=False, |
806 return self._commitctx(ctx, force=True, force_editor=False, |
807 empty_ok=True, use_dirstate=False, |
807 empty_ok=True, use_dirstate=False, |
808 update_dirstate=False) |
808 update_dirstate=False) |
809 finally: |
809 finally: |
810 del lock, wlock |
810 del lock, wlock |
811 |
811 |
812 def _commitctx(self, wctx, force=False, force_editor=False, empty_ok=False, |
812 def _commitctx(self, wctx, force=False, force_editor=False, empty_ok=False, |