##// END OF EJS Templates
mq: use dirstateguard instead of dirstate.invalidate (qpush)...
FUJIWARA Katsunori -
r24996:58308dde default
parent child Browse files
Show More
@@ -807,9 +807,10 b' class queue(object):'
807 807 def apply(self, repo, series, list=False, update_status=True,
808 808 strict=False, patchdir=None, merge=None, all_files=None,
809 809 tobackup=None, keepchanges=False):
810 wlock = lock = tr = None
810 wlock = dsguard = lock = tr = None
811 811 try:
812 812 wlock = repo.wlock()
813 dsguard = cmdutil.dirstateguard(repo, 'mq.apply')
813 814 lock = repo.lock()
814 815 tr = repo.transaction("qpush")
815 816 try:
@@ -818,21 +819,22 b' class queue(object):'
818 819 tobackup=tobackup, keepchanges=keepchanges)
819 820 tr.close()
820 821 self.savedirty()
822 dsguard.close()
821 823 return ret
822 824 except AbortNoCleanup:
823 825 tr.close()
824 826 self.savedirty()
827 dsguard.close()
825 828 raise
826 829 except: # re-raises
827 830 try:
828 831 tr.abort()
829 832 finally:
830 833 repo.invalidate()
831 repo.dirstate.invalidate()
832 834 self.invalidate()
833 835 raise
834 836 finally:
835 release(tr, lock, wlock)
837 release(tr, lock, dsguard, wlock)
836 838 self.removeundo(repo)
837 839
838 840 def _apply(self, repo, series, list=False, update_status=True,
General Comments 0
You need to be logged in to leave comments. Login now