Show More
@@ -807,9 +807,10 class queue(object): | |||||
807 | def apply(self, repo, series, list=False, update_status=True, |
|
807 | def apply(self, repo, series, list=False, update_status=True, | |
808 | strict=False, patchdir=None, merge=None, all_files=None, |
|
808 | strict=False, patchdir=None, merge=None, all_files=None, | |
809 | tobackup=None, keepchanges=False): |
|
809 | tobackup=None, keepchanges=False): | |
810 | wlock = lock = tr = None |
|
810 | wlock = dsguard = lock = tr = None | |
811 | try: |
|
811 | try: | |
812 | wlock = repo.wlock() |
|
812 | wlock = repo.wlock() | |
|
813 | dsguard = cmdutil.dirstateguard(repo, 'mq.apply') | |||
813 | lock = repo.lock() |
|
814 | lock = repo.lock() | |
814 | tr = repo.transaction("qpush") |
|
815 | tr = repo.transaction("qpush") | |
815 | try: |
|
816 | try: | |
@@ -818,21 +819,22 class queue(object): | |||||
818 | tobackup=tobackup, keepchanges=keepchanges) |
|
819 | tobackup=tobackup, keepchanges=keepchanges) | |
819 | tr.close() |
|
820 | tr.close() | |
820 | self.savedirty() |
|
821 | self.savedirty() | |
|
822 | dsguard.close() | |||
821 | return ret |
|
823 | return ret | |
822 | except AbortNoCleanup: |
|
824 | except AbortNoCleanup: | |
823 | tr.close() |
|
825 | tr.close() | |
824 | self.savedirty() |
|
826 | self.savedirty() | |
|
827 | dsguard.close() | |||
825 | raise |
|
828 | raise | |
826 | except: # re-raises |
|
829 | except: # re-raises | |
827 | try: |
|
830 | try: | |
828 | tr.abort() |
|
831 | tr.abort() | |
829 | finally: |
|
832 | finally: | |
830 | repo.invalidate() |
|
833 | repo.invalidate() | |
831 | repo.dirstate.invalidate() |
|
|||
832 | self.invalidate() |
|
834 | self.invalidate() | |
833 | raise |
|
835 | raise | |
834 | finally: |
|
836 | finally: | |
835 | release(tr, lock, wlock) |
|
837 | release(tr, lock, dsguard, wlock) | |
836 | self.removeundo(repo) |
|
838 | self.removeundo(repo) | |
837 |
|
839 | |||
838 | def _apply(self, repo, series, list=False, update_status=True, |
|
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