Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 6715:a3c41abfa828
context: add memctx for memory commits
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 19 Jun 2008 00:14:23 +0200 |
parents | 93f127b59793 |
children | 521c6c6f3b9b |
comparison
equal
deleted
inserted
replaced
6714:5f339b6a7eff | 6715:a3c41abfa828 |
---|---|
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: | |
799 del lock, wlock | |
800 | |
801 def commitctx(self, ctx): | |
802 wlock = lock = None | |
803 try: | |
804 wlock = self.wlock() | |
805 lock = self.lock() | |
806 return self._commitctx(ctx, force=True, force_editor=False, | |
807 empty_ok=True, use_dirstate=False, | |
808 update_dirstate=False) | |
798 finally: | 809 finally: |
799 del lock, wlock | 810 del lock, wlock |
800 | 811 |
801 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, |
802 use_dirstate=True, update_dirstate=True): | 813 use_dirstate=True, update_dirstate=True): |